summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-31 17:59:49 -0700
committerDianne Hackborn <hackbod@google.com>2011-05-31 18:04:14 -0700
commit2f0b17573d4324832f7a20402a3d2b5920bc4866 (patch)
treeeb85b9344237741f21f4989950677692b3bdbbda /policy
parent8ede62745faa02265f927941d1195b6c1bf05ebb (diff)
downloadframeworks_base-2f0b17573d4324832f7a20402a3d2b5920bc4866.zip
frameworks_base-2f0b17573d4324832f7a20402a3d2b5920bc4866.tar.gz
frameworks_base-2f0b17573d4324832f7a20402a3d2b5920bc4866.tar.bz2
Fix issue #4502672: Wrong xml resources used for homescreen widgets.
There was a race in the system process between applying the initial configuration and executing code in higher-level system services like the app widget service that relies on the config. For some reason it starting showing up more after my code changes; it should now be completely fixed. Also fix the activity starting window to run in compatibility mode if its application is going to be in compatibility mode. And some various cleanup and small fixes. Change-Id: I0566933bf1bbb4259c1d99a60c0a3c19af1542e5
Diffstat (limited to 'policy')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 60066e0..36201ac 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -29,6 +29,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
+import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.ContentObserver;
@@ -1110,9 +1111,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
/** {@inheritDoc} */
- public View addStartingWindow(IBinder appToken, String packageName,
- int theme, CharSequence nonLocalizedLabel,
- int labelRes, int icon, int windowFlags) {
+ public View addStartingWindow(IBinder appToken, String packageName, int theme,
+ CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
+ int icon, int windowFlags) {
if (!SHOW_STARTING_ANIMATIONS) {
return null;
}
@@ -1158,8 +1159,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
+ if (!compatInfo.supportsScreen()) {
+ win.addFlags(WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW);
+ }
+
win.setLayout(WindowManager.LayoutParams.MATCH_PARENT,
- WindowManager.LayoutParams.MATCH_PARENT);
+ WindowManager.LayoutParams.MATCH_PARENT);
final WindowManager.LayoutParams params = win.getAttributes();
params.token = appToken;