diff --git a/WallpaperPicker/src/com/android/gallery3d/exif/ExifInterface.java b/WallpaperPicker/src/com/android/gallery3d/exif/ExifInterface.java index a1cf0fc852..9247e879f1 100644 --- a/WallpaperPicker/src/com/android/gallery3d/exif/ExifInterface.java +++ b/WallpaperPicker/src/com/android/gallery3d/exif/ExifInterface.java @@ -1247,7 +1247,7 @@ public class ExifInterface { if (l == null || l.length <= 0) { return null; } - return new Long(l[0]); + return Long.valueOf(l[0]); } /** @@ -1266,7 +1266,7 @@ public class ExifInterface { if (l == null || l.length <= 0) { return null; } - return new Integer(l[0]); + return Integer.valueOf(l[0]); } /** @@ -1285,7 +1285,7 @@ public class ExifInterface { if (l == null || l.length <= 0) { return null; } - return new Byte(l[0]); + return Byte.valueOf(l[0]); } /** diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java index 142a9cb10e..affad0f45e 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 diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java index 93320919e1..1ba5b4b2e9 100644 --- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java +++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java @@ -665,7 +665,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { } @Thunk void initializeScrollForRtl() { - if (mWallpaperScrollContainer.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) { + if (Utilities.isRtl(getResources())) { final ViewTreeObserver observer = mWallpaperScrollContainer.getViewTreeObserver(); observer.addOnGlobalLayoutListener(new OnGlobalLayoutListener() { public void onGlobalLayout() { @@ -838,7 +838,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { int rotation = BitmapUtils.getRotationFromExif(context, uri); return createThumbnail(defaultSize, context, uri, null, null, 0, rotation, false); } 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 diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml index d5dd91ab42..f0f7bbb9f4 100644 --- a/res/layout-land/launcher.xml +++ b/res/layout-land/launcher.xml @@ -18,7 +18,6 @@ diff --git a/res/layout-port/migration_cling.xml b/res/layout-port/migration_cling.xml index 81689d38b3..3f696a216c 100644 --- a/res/layout-port/migration_cling.xml +++ b/res/layout-port/migration_cling.xml @@ -48,6 +48,7 @@ android:layout_height="wrap_content" android:layout_below="@+id/ic_cling_migration" android:layout_marginStart="@dimen/cling_migration_content_margin" + android:layout_marginLeft="@dimen/cling_migration_content_margin" android:orientation="vertical" android:paddingLeft="24dp" android:paddingRight="24dp" > diff --git a/res/layout/apps_list_view.xml b/res/layout/apps_list_view.xml index ef20323c1e..5e50191eaf 100644 --- a/res/layout/apps_list_view.xml +++ b/res/layout/apps_list_view.xml @@ -56,6 +56,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="start|center_vertical" + android:layout_marginLeft="4dp" android:layout_marginStart="4dp" android:paddingTop="13dp" android:paddingBottom="13dp" @@ -86,6 +87,7 @@ android:layout_height="wrap_content" android:layout_gravity="end|center_vertical" android:layout_marginEnd="6dp" + android:layout_marginRight="6dp" android:paddingTop="13dp" android:paddingBottom="13dp" android:contentDescription="@string/apps_view_search_bar_hint" diff --git a/res/layout/search_drop_target_bar.xml b/res/layout/search_drop_target_bar.xml index 69f42bb4cb..b0435aa0e9 100644 --- a/res/layout/search_drop_target_bar.xml +++ b/res/layout/search_drop_target_bar.xml @@ -36,6 +36,7 @@ @@ -49,6 +50,7 @@ @@ -62,6 +64,7 @@ diff --git a/res/layout/widgets_list_row_view.xml b/res/layout/widgets_list_row_view.xml index 2cbdb5cfff..be62ee9fc2 100644 --- a/res/layout/widgets_list_row_view.xml +++ b/res/layout/widgets_list_row_view.xml @@ -58,6 +58,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/widget_row_padding" + android:layout_marginLeft="@dimen/widget_row_padding" android:orientation="horizontal" android:divider="@drawable/widgets_row_divider" android:showDividers="middle" diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml index 8a255c91bc..c5a76d595b 100644 --- a/res/values-land/styles.xml +++ b/res/values-land/styles.xml @@ -28,7 +28,7 @@ - - - - +