diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-06-07 14:09:47 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-06-08 18:45:43 -0700 |
commit | 5fd2169eabd77e6bfafaf456e58051a3bafb2bca (patch) | |
tree | 77048c3540c64cad77e5c140b6477a321190c586 /core/java/android/app/LoadedApk.java | |
parent | 4381f6421ca408d1dc66430ddfb107c5011bfe25 (diff) | |
download | frameworks_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/LoadedApk.java')
-rw-r--r-- | core/java/android/app/LoadedApk.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index 6287d33..2549c84 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -38,6 +38,7 @@ import android.os.RemoteException; import android.os.StrictMode; import android.util.AndroidRuntimeException; import android.util.Slog; +import android.view.CompatibilityInfoHolder; import java.io.File; import java.io.IOException; @@ -64,7 +65,7 @@ final class ServiceConnectionLeaked extends AndroidRuntimeException { * Local state maintained about a currently loaded .apk. * @hide */ -final class LoadedApk { +public final class LoadedApk { private final ActivityThread mActivityThread; private final ApplicationInfo mApplicationInfo; @@ -78,10 +79,10 @@ final class LoadedApk { private final ClassLoader mBaseClassLoader; private final boolean mSecurityViolation; private final boolean mIncludeCode; + public final CompatibilityInfoHolder mCompatibilityInfo = new CompatibilityInfoHolder(); Resources mResources; private ClassLoader mClassLoader; private Application mApplication; - CompatibilityInfo mCompatibilityInfo; private final HashMap<Context, HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>> mReceivers = new HashMap<Context, HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>>(); @@ -121,7 +122,7 @@ final class LoadedApk { mBaseClassLoader = baseLoader; mSecurityViolation = securityViolation; mIncludeCode = includeCode; - mCompatibilityInfo = compatInfo; + mCompatibilityInfo.set(compatInfo); if (mAppDir == null) { if (ActivityThread.mSystemContext == null) { @@ -129,7 +130,7 @@ final class LoadedApk { ContextImpl.createSystemContext(mainThread); ActivityThread.mSystemContext.getResources().updateConfiguration( mainThread.getConfiguration(), - mainThread.getDisplayMetricsLocked(false), + mainThread.getDisplayMetricsLocked(compatInfo, false), compatInfo); //Slog.i(TAG, "Created system resources " // + mSystemContext.getResources() + ": " @@ -157,7 +158,7 @@ final class LoadedApk { mIncludeCode = true; mClassLoader = systemContext.getClassLoader(); mResources = systemContext.getResources(); - mCompatibilityInfo = compatInfo; + mCompatibilityInfo.set(compatInfo); } public String getPackageName() { |