diff options
author | Clark Scheff <clark@cyngn.com> | 2014-08-08 15:44:25 -0700 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2014-08-11 15:33:01 +0000 |
commit | 579d5df2cedf96bb9c261a91debf8d0b4f547012 (patch) | |
tree | 1256573c5a01f6935a4c3b65cd3287461dbd6104 /src | |
parent | 7e53384ad27e75f9193e0be74a310f3c5f7422a9 (diff) | |
download | packages_apps_ThemeChooser-579d5df2cedf96bb9c261a91debf8d0b4f547012.zip packages_apps_ThemeChooser-579d5df2cedf96bb9c261a91debf8d0b4f547012.tar.gz packages_apps_ThemeChooser-579d5df2cedf96bb9c261a91debf8d0b4f547012.tar.bz2 |
Reload themes when handling intent and mPager != null
If the chooser is paused and a new intent comes in to display a
particular theme we need to reload the pages in case the intent
was for a newly installed theme.
Change-Id: I853c33e692c73d3ba07ea0ad8ae0a55f0a2b5475
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyngn/theme/chooser/ChooserActivity.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/cyngn/theme/chooser/ChooserActivity.java b/src/com/cyngn/theme/chooser/ChooserActivity.java index 20abc14..63f2cc7 100644 --- a/src/com/cyngn/theme/chooser/ChooserActivity.java +++ b/src/com/cyngn/theme/chooser/ChooserActivity.java @@ -223,6 +223,11 @@ public class ChooserActivity extends FragmentActivity private void handleIntent(Intent intent) { if (Intent.ACTION_MAIN.equals(intent.getAction()) && intent.hasExtra(EXTRA_PKGNAME)) { mSelectedTheme = intent.getStringExtra(EXTRA_PKGNAME); + if (mPager != null) { + mAdapter = new ThemesAdapter(this); + mPager.setAdapter(mAdapter); + getSupportLoaderManager().restartLoader(LOADER_ID_INSTALLED_THEMES, null, this); + } } else { mSelectedTheme = null; } |