summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ContextImpl.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-06-07 14:09:47 -0700
committerDianne Hackborn <hackbod@google.com>2011-06-08 18:45:43 -0700
commit5fd2169eabd77e6bfafaf456e58051a3bafb2bca (patch)
tree77048c3540c64cad77e5c140b6477a321190c586 /core/java/android/app/ContextImpl.java
parent4381f6421ca408d1dc66430ddfb107c5011bfe25 (diff)
downloadframeworks_base-5fd2169eabd77e6bfafaf456e58051a3bafb2bca.zip
frameworks_base-5fd2169eabd77e6bfafaf456e58051a3bafb2bca.tar.gz
frameworks_base-5fd2169eabd77e6bfafaf456e58051a3bafb2bca.tar.bz2
Work on issue #4518815: Compatibility mode introduces compatibility regression...
...for Market App iRunner There were a lot of serious issues with how we updated (or often didn't update) the display and resource state when switching compatibility mode in conjunction with restarting and updating application components. This addresses everything I could find. Unfortunately it does *not* fix this particular app. I am starting to think this is just an issue in the app. This change does fix a number of other problems I could repro, such as switching the compatibility mode of an IME. Also a few changes here and there to get rid of $#*&^!! debug logs. Change-Id: Ib15572eac9ec93b4b9966ddcbbc830ce9dec1317
Diffstat (limited to 'core/java/android/app/ContextImpl.java')
-rw-r--r--core/java/android/app/ContextImpl.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 73170bb..20dc792 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -425,11 +425,19 @@ class ContextImpl extends Context {
registerService(WINDOW_SERVICE, new ServiceFetcher() {
public Object getService(ContextImpl ctx) {
- CompatibilityInfo ci = ctx.mResources.getCompatibilityInfo();
- return WindowManagerImpl.getDefault(ci);
+ return WindowManagerImpl.getDefault(ctx.mPackageInfo.mCompatibilityInfo);
}});
}
+ static ContextImpl getImpl(Context context) {
+ Context nextContext;
+ while ((context instanceof ContextWrapper) &&
+ (nextContext=((ContextWrapper)context).getBaseContext()) != null) {
+ context = nextContext;
+ }
+ return (ContextImpl)context;
+ }
+
// The system service cache for the system services that are
// cached per-ContextImpl. Package-scoped to avoid accessor
// methods.