diff options
author | Andy Mast <andy@cyngn.com> | 2014-12-04 10:47:07 -0800 |
---|---|---|
committer | Andy Mast <andy@cyngn.com> | 2014-12-04 19:19:33 +0000 |
commit | 71f7e1dca0c89564e9c9ece9cbf67916b989585c (patch) | |
tree | 4c9d1fd7d9a02a63bc26bc6031ecbde1adab2097 /src/com | |
parent | aa270fb86840efeb5c8a7c6e68547e7fdb9901ed (diff) | |
download | packages_apps_ThemeChooser-71f7e1dca0c89564e9c9ece9cbf67916b989585c.tar.gz packages_apps_ThemeChooser-71f7e1dca0c89564e9c9ece9cbf67916b989585c.tar.bz2 packages_apps_ThemeChooser-71f7e1dca0c89564e9c9ece9cbf67916b989585c.zip |
Don't animate in views if theme is applying from store
An NPE will occur if a theme which is already applied is being
applied again from the store. What happens is a component view
(eg styles) is being loaded and and asked to animate, but the view
itself does not have a drawable cache yet.
REF: CHOOSER-9
Change-Id: If3d1df1f00097335de03a77dda73325b2b424977
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/cyngn/theme/chooser/ThemeFragment.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/com/cyngn/theme/chooser/ThemeFragment.java b/src/com/cyngn/theme/chooser/ThemeFragment.java index 76b14e2..ea33a8c 100644 --- a/src/com/cyngn/theme/chooser/ThemeFragment.java +++ b/src/com/cyngn/theme/chooser/ThemeFragment.java @@ -1321,6 +1321,7 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb mCurrentCursor = c; mCurrentLoaderId = loader.getId(); c.moveToFirst(); + boolean animate = !mApplyThemeOnPopulated; switch (mCurrentLoaderId) { case LOADER_ID_ALL: if (mProcessingResources && !isThemeProcessing()) { @@ -1342,37 +1343,37 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb }); break; case LOADER_ID_STATUS_BAR: - loadStatusBar(c, true); + loadStatusBar(c, animate); break; case LOADER_ID_FONT: - loadFont(c, true); + loadFont(c, animate); break; case LOADER_ID_ICONS: - loadIcons(c, true); + loadIcons(c, animate); break; case LOADER_ID_WALLPAPER: - loadWallpaper(c, true); + loadWallpaper(c, animate); break; case LOADER_ID_NAVIGATION_BAR: - loadNavBar(c, true); + loadNavBar(c, animate); break; case LOADER_ID_LOCKSCREEN: - loadLockScreen(c, true); + loadLockScreen(c, animate); break; case LOADER_ID_STYLE: - loadStyle(c, true); + loadStyle(c, animate); break; case LOADER_ID_BOOT_ANIMATION: loadBootAnimation(c); break; case LOADER_ID_RINGTONE: - loadAudible(RingtoneManager.TYPE_RINGTONE, c, true); + loadAudible(RingtoneManager.TYPE_RINGTONE, c, animate); break; case LOADER_ID_NOTIFICATION: - loadAudible(RingtoneManager.TYPE_NOTIFICATION, c, true); + loadAudible(RingtoneManager.TYPE_NOTIFICATION, c, animate); break; case LOADER_ID_ALARM: - loadAudible(RingtoneManager.TYPE_ALARM, c, true); + loadAudible(RingtoneManager.TYPE_ALARM, c, animate); break; } } |