Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use support library's ExifInterface. #1748

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ ext {
supportLibrariesVersion = '26.0.1'

dep = [
androidPlugin : 'com.android.tools.build:gradle:3.0.1',
okhttp : "com.squareup.okhttp3:okhttp:$okhttpVersion",
mockWebServer : "com.squareup.okhttp3:mockwebserver:$okhttpVersion",
pollexor : 'com.squareup:pollexor:2.0.4',
supportV4 : "com.android.support:support-v4:$supportLibrariesVersion",
supportAnnotations : "com.android.support:support-annotations:$supportLibrariesVersion",
junit : 'junit:junit:4.12',
truth : 'com.google.truth:truth:0.36',
robolectric : 'org.robolectric:robolectric:3.1',
mockito : 'org.mockito:mockito-core:1.9.5'
androidPlugin : 'com.android.tools.build:gradle:3.0.1',
okhttp : "com.squareup.okhttp3:okhttp:$okhttpVersion",
mockWebServer : "com.squareup.okhttp3:mockwebserver:$okhttpVersion",
pollexor : 'com.squareup:pollexor:2.0.4',
supportV4 : "com.android.support:support-v4:$supportLibrariesVersion",
supportAnnotations : "com.android.support:support-annotations:$supportLibrariesVersion",
supportExifInterface : "com.android.support:exifinterface:$supportLibrariesVersion",
junit : 'junit:junit:4.12',
truth : 'com.google.truth:truth:0.36',
robolectric : 'org.robolectric:robolectric:3.1',
mockito : 'org.mockito:mockito-core:1.9.5'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who thought column alignment was a good idea 🤦‍♂️

(Don't let it be me... don't let it be me...)

]

isCi = "true" == System.getenv('CI')
Expand Down
3 changes: 2 additions & 1 deletion picasso/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ android {

dependencies {
api dep.okhttp
compileOnly dep.supportAnnotations
api dep.supportAnnotations
implementation dep.supportExifInterface
testImplementation dep.junit
testImplementation dep.truth
testImplementation dep.supportV4
Expand Down
14 changes: 7 additions & 7 deletions picasso/src/main/java/com/squareup/picasso/BitmapHunter.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
import okio.Okio;
import okio.Source;

import static android.media.ExifInterface.ORIENTATION_FLIP_HORIZONTAL;
import static android.media.ExifInterface.ORIENTATION_FLIP_VERTICAL;
import static android.media.ExifInterface.ORIENTATION_ROTATE_180;
import static android.media.ExifInterface.ORIENTATION_ROTATE_270;
import static android.media.ExifInterface.ORIENTATION_ROTATE_90;
import static android.media.ExifInterface.ORIENTATION_TRANSPOSE;
import static android.media.ExifInterface.ORIENTATION_TRANSVERSE;
import static android.support.media.ExifInterface.ORIENTATION_FLIP_HORIZONTAL;
import static android.support.media.ExifInterface.ORIENTATION_FLIP_VERTICAL;
import static android.support.media.ExifInterface.ORIENTATION_ROTATE_180;
import static android.support.media.ExifInterface.ORIENTATION_ROTATE_270;
import static android.support.media.ExifInterface.ORIENTATION_ROTATE_90;
import static android.support.media.ExifInterface.ORIENTATION_TRANSPOSE;
import static android.support.media.ExifInterface.ORIENTATION_TRANSVERSE;
import static com.squareup.picasso.MemoryPolicy.shouldReadFromMemoryCache;
import static com.squareup.picasso.Picasso.LoadedFrom.MEMORY;
import static com.squareup.picasso.Picasso.Priority;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
package com.squareup.picasso;

import android.content.Context;
import android.media.ExifInterface;
import android.support.media.ExifInterface;
import android.net.Uri;
import java.io.IOException;
import okio.Okio;
import okio.Source;

import static android.content.ContentResolver.SCHEME_FILE;
import static android.media.ExifInterface.ORIENTATION_NORMAL;
import static android.media.ExifInterface.TAG_ORIENTATION;
import static android.support.media.ExifInterface.ORIENTATION_NORMAL;
import static android.support.media.ExifInterface.TAG_ORIENTATION;
import static com.squareup.picasso.Picasso.LoadedFrom.DISK;

class FileRequestHandler extends ContentStreamRequestHandler {
Expand Down
10 changes: 5 additions & 5 deletions picasso/src/test/java/com/squareup/picasso/BitmapHunterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
import org.robolectric.shadows.ShadowMatrix;

import static android.graphics.Bitmap.Config.ARGB_8888;
import static android.media.ExifInterface.ORIENTATION_FLIP_HORIZONTAL;
import static android.media.ExifInterface.ORIENTATION_FLIP_VERTICAL;
import static android.media.ExifInterface.ORIENTATION_ROTATE_90;
import static android.media.ExifInterface.ORIENTATION_TRANSPOSE;
import static android.media.ExifInterface.ORIENTATION_TRANSVERSE;
import static android.support.media.ExifInterface.ORIENTATION_FLIP_HORIZONTAL;
import static android.support.media.ExifInterface.ORIENTATION_FLIP_VERTICAL;
import static android.support.media.ExifInterface.ORIENTATION_ROTATE_90;
import static android.support.media.ExifInterface.ORIENTATION_TRANSPOSE;
import static android.support.media.ExifInterface.ORIENTATION_TRANSVERSE;
import static com.google.common.truth.Truth.assertThat;
import static com.squareup.picasso.BitmapHunter.forRequest;
import static com.squareup.picasso.BitmapHunter.transformResult;
Expand Down