diff options
author | Josh Guilfoyle <Josh.Guilfoyle@T-Mobile.com> | 2010-12-23 15:53:10 -0800 |
---|---|---|
committer | Josh Guilfoyle <Josh.Guilfoyle@T-Mobile.com> | 2010-12-23 22:33:29 -0800 |
commit | 2eb3f3d1e48b1504b3cb6f3e9146bf5b9801cca0 (patch) | |
tree | 3e16d741086213eb8e4c423eafd855cebaac6f51 /policy/src/com/android | |
parent | ce9c0447f946d8fe20d020f01b6548c815579848 (diff) | |
download | frameworks_base-2eb3f3d1e48b1504b3cb6f3e9146bf5b9801cca0.zip frameworks_base-2eb3f3d1e48b1504b3cb6f3e9146bf5b9801cca0.tar.gz frameworks_base-2eb3f3d1e48b1504b3cb6f3e9146bf5b9801cca0.tar.bz2 |
Always create a package-specific context in the PhoneWindowManager.
This is necessary to support dynamic theming.
Diffstat (limited to 'policy/src/com/android')
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 43936a4..02eadc7 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -866,16 +866,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean setTheme = false; //Log.i(TAG, "addStartingWindow " + packageName + ": nonLocalizedLabel=" // + nonLocalizedLabel + " theme=" + Integer.toHexString(theme)); - if (theme != 0 || labelRes != 0) { - try { - context = context.createPackageContext(packageName, 0); - if (theme != 0) { - context.setTheme(theme); - setTheme = true; - } - } catch (PackageManager.NameNotFoundException e) { - // Ignore + try { + context = context.createPackageContext(packageName, 0); + if (theme != 0) { + context.setTheme(theme); + setTheme = true; } + } catch (PackageManager.NameNotFoundException e) { + // Ignore } if (!setTheme) { context.setTheme(com.android.internal.R.style.Theme); |