summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-11-21 14:29:15 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-11-21 14:29:15 -0800
commit0d08a49af9bf1724bc2470f8defecc8baf7d9475 (patch)
tree88f47c81118d5fbb3ae83fc25b2016c57a2c2d99 /policy/src
parent1c3c626cd9d5271a78650439477f4a5f602578c2 (diff)
parent6d6f1e8d89e320edb2c765f8e8cfd4bcd0ec89a6 (diff)
downloadframeworks_base-0d08a49af9bf1724bc2470f8defecc8baf7d9475.zip
frameworks_base-0d08a49af9bf1724bc2470f8defecc8baf7d9475.tar.gz
frameworks_base-0d08a49af9bf1724bc2470f8defecc8baf7d9475.tar.bz2
am 6d6f1e8d: am 545043e5: Fix reboot loop caused by keyguard appwidget cleanup
* commit '6d6f1e8d89e320edb2c765f8e8cfd4bcd0ec89a6': Fix reboot loop caused by keyguard appwidget cleanup
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
index 0e25c84..84f3d61 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
@@ -81,6 +81,7 @@ public class KeyguardHostView extends KeyguardViewBase {
private int mAppWidgetToShow;
private boolean mCheckAppWidgetConsistencyOnBootCompleted = false;
+ private boolean mCleanupAppWidgetsOnBootCompleted = false;
protected OnDismissAction mDismissAction;
@@ -155,6 +156,12 @@ public class KeyguardHostView extends KeyguardViewBase {
}
private void cleanupAppWidgetIds() {
+ // Since this method may delete a widget (which we can't do until boot completed) we
+ // may have to defer it until after boot complete.
+ if (!KeyguardUpdateMonitor.getInstance(mContext).hasBootCompleted()) {
+ mCleanupAppWidgetsOnBootCompleted = true;
+ return;
+ }
// Clean up appWidgetIds that are bound to lockscreen, but not actually used
// This is only to clean up after another bug: we used to not call
// deleteAppWidgetId when a user manually deleted a widget in keyguard. This code
@@ -190,6 +197,10 @@ public class KeyguardHostView extends KeyguardViewBase {
mSwitchPageRunnable.run();
mCheckAppWidgetConsistencyOnBootCompleted = false;
}
+ if (mCleanupAppWidgetsOnBootCompleted) {
+ cleanupAppWidgetIds();
+ mCleanupAppWidgetsOnBootCompleted = false;
+ }
}
};