summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJosh Guilfoyle <Josh.Guilfoyle@T-Mobile.com>2010-12-23 15:53:10 -0800
committerJosh Guilfoyle <Josh.Guilfoyle@T-Mobile.com>2010-12-23 22:33:29 -0800
commit2eb3f3d1e48b1504b3cb6f3e9146bf5b9801cca0 (patch)
tree3e16d741086213eb8e4c423eafd855cebaac6f51 /policy
parentce9c0447f946d8fe20d020f01b6548c815579848 (diff)
downloadframeworks_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')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java16
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);