summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/Window.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/view/Window.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/view/Window.java')
-rw-r--r--core/java/android/view/Window.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 5236a9e..e07085c 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -16,6 +16,7 @@
package android.view;
+import android.app.Application;
import android.content.Context;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
@@ -25,6 +26,7 @@ import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.IBinder;
+import android.util.Slog;
import android.view.accessibility.AccessibilityEvent;
/**
@@ -463,11 +465,16 @@ public abstract class Window {
mWindowManager = new LocalWindowManager(wm, hardwareAccelerated);
}
+ static CompatibilityInfoHolder getCompatInfo(Context context) {
+ Application app = (Application)context.getApplicationContext();
+ return app != null ? app.mLoadedApk.mCompatibilityInfo : new CompatibilityInfoHolder();
+ }
+
private class LocalWindowManager extends WindowManagerImpl.CompatModeWrapper {
private final boolean mHardwareAccelerated;
LocalWindowManager(WindowManager wm, boolean hardwareAccelerated) {
- super(wm, mContext.getResources().getCompatibilityInfo());
+ super(wm, getCompatInfo(mContext));
mHardwareAccelerated = hardwareAccelerated;
}