summaryrefslogtreecommitdiffstats
path: root/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-05-14 00:07:08 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-05-14 12:28:07 -0700
commit7066003b2032a49ae5e59dab9b706259bdeb7e6e (patch)
tree3e3720740c905cf22dc1c96e6123c1bb7bec60e5 /WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
parent5a92b2356f1c5f79207c4e9bd47d7b0b5bcf6f78 (diff)
downloadandroid_packages_apps_Trebuchet-7066003b2032a49ae5e59dab9b706259bdeb7e6e.tar.gz
android_packages_apps_Trebuchet-7066003b2032a49ae5e59dab9b706259bdeb7e6e.tar.bz2
android_packages_apps_Trebuchet-7066003b2032a49ae5e59dab9b706259bdeb7e6e.zip
Various lint error fixes.
> Fixing some RTL errors by specifying both marginStart and marginLeft > Moving all layout direction checks to Utilities > Explicitely adding @TargetApi before every method Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
Diffstat (limited to 'WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java')
-rw-r--r--WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
index 142a9cb10..affad0f45 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
@@ -190,7 +190,7 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
}
});
} catch (SecurityException securityException) {
- if (isDestroyed()) {
+ if (isActivityDestroyed()) {
// Temporarily granted permissions are revoked when the activity
// finishes, potentially resulting in a SecurityException here.
// Even though {@link #isDestroyed} might also return true in different
@@ -221,6 +221,12 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
return false;
}
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
+ protected boolean isActivityDestroyed() {
+ return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
+ && isDestroyed();
+ }
+
@Thunk void addReusableBitmap(TileSource src) {
synchronized (mReusableBitmaps) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT