summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-08-25 13:19:08 -0700
committerDianne Hackborn <hackbod@google.com>2011-08-25 13:19:08 -0700
commit295e3c27e4e3762a002382fc1657f5f0070a3410 (patch)
tree223d206abb4cfa67e2c46d3d43a354a8fd80e24e /policy
parent12bde60b39affbfdcb7ef6317e0a5f99c3f41b10 (diff)
downloadframeworks_base-295e3c27e4e3762a002382fc1657f5f0070a3410.zip
frameworks_base-295e3c27e4e3762a002382fc1657f5f0070a3410.tar.gz
frameworks_base-295e3c27e4e3762a002382fc1657f5f0070a3410.tar.bz2
Fix issue #5214105 and work on issue #5109947.
Change-Id: Iff2cfec5280a314989d915aa830c16124f921611 5214105: taking a screenshot while "Android is upgrading..." crashes device 5109947: Race condition between retrieving a content provider and updating its oom adj
Diffstat (limited to 'policy')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index be129a8..dfd1b00 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -124,6 +124,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS;
import android.view.WindowManagerImpl;
import android.view.WindowManagerPolicy;
import android.view.KeyCharacterMap.FallbackAction;
+import android.view.accessibility.AccessibilityEvent;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.media.IAudioService;
@@ -3104,7 +3105,29 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mHandler.post(new Runnable() {
@Override public void run() {
if (mBootMsgDialog == null) {
- mBootMsgDialog = new ProgressDialog(mContext);
+ mBootMsgDialog = new ProgressDialog(mContext) {
+ // This dialog will consume all events coming in to
+ // it, to avoid it trying to do things too early in boot.
+ @Override public boolean dispatchKeyEvent(KeyEvent event) {
+ return true;
+ }
+ @Override public boolean dispatchKeyShortcutEvent(KeyEvent event) {
+ return true;
+ }
+ @Override public boolean dispatchTouchEvent(MotionEvent ev) {
+ return true;
+ }
+ @Override public boolean dispatchTrackballEvent(MotionEvent ev) {
+ return true;
+ }
+ @Override public boolean dispatchGenericMotionEvent(MotionEvent ev) {
+ return true;
+ }
+ @Override public boolean dispatchPopulateAccessibilityEvent(
+ AccessibilityEvent event) {
+ return true;
+ }
+ };
mBootMsgDialog.setTitle(R.string.android_upgrading_title);
mBootMsgDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mBootMsgDialog.setIndeterminate(true);