Skip to content

Commit

Permalink
Merge pull request #1748 from NightlyNexus/eric.2018-02-28.exifinterface
Browse files Browse the repository at this point in the history
Use support library's ExifInterface.
  • Loading branch information
JakeWharton authored Feb 28, 2018
2 parents 42e01c6 + cd8031d commit 359710d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 26 deletions.
21 changes: 11 additions & 10 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ ext {
supportLibrariesVersion = '27.1.0'

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'
]

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 @@ -33,7 +33,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

0 comments on commit 359710d

Please sign in to comment.