Workaround for wallpaper crash. (5191436)
- Adding a little time to the tab transition
Change-Id: Ia7615d93f471845e568742df828cde43c1b917c4
diff --git a/res/values/config.xml b/res/values/config.xml
index 37710b6..e88a83e 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -31,7 +31,7 @@
<integer name="config_appsCustomizeWorkspaceShrinkTime">1000</integer>
<!-- Tab transition animation duration -->
- <integer name="config_tabTransitionDuration">200</integer>
+ <integer name="config_tabTransitionDuration">250</integer>
<!-- The slope, in percent, of the drag movement needed to drag an item out of
AppsCustomize (y / x * 100%) -->
diff --git a/src/com/android/launcher2/WallpaperChooserDialogFragment.java b/src/com/android/launcher2/WallpaperChooserDialogFragment.java
index c9e21f2..6e39da2 100644
--- a/src/com/android/launcher2/WallpaperChooserDialogFragment.java
+++ b/src/com/android/launcher2/WallpaperChooserDialogFragment.java
@@ -307,9 +307,15 @@
mBitmap.recycle();
}
- mBitmap = b;
- mWallpaperDrawable.setBitmap(b);
- getView().postInvalidate();
+ View v = getView();
+ if (v != null) {
+ mBitmap = b;
+ mWallpaperDrawable.setBitmap(b);
+ v.postInvalidate();
+ } else {
+ mBitmap = null;
+ mWallpaperDrawable.setBitmap(null);
+ }
mLoader = null;
} else {
b.recycle();