summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-04-19 20:26:02 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-19 20:26:02 +0000
commit12a7f76c8687053d139d670631e7cef7031f8c48 (patch)
tree1054d4eb1af2912cb483596a417f6d9ddefd46bc /policy
parent0935f258dc2fd1eeadf9d502abbd1e409f68ac67 (diff)
parent128f27632343ed8ad8bba2d96f4ec69c0e369de7 (diff)
downloadframeworks_base-12a7f76c8687053d139d670631e7cef7031f8c48.zip
frameworks_base-12a7f76c8687053d139d670631e7cef7031f8c48.tar.gz
frameworks_base-12a7f76c8687053d139d670631e7cef7031f8c48.tar.bz2
Merge "Fix system server crash when uninstalling paid LS widget that has been added (issue 8647398)" into jb-mr2-dev
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java10
1 files changed, 7 insertions, 3 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 7fcf1d5..fbeca4f 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
@@ -1589,7 +1589,13 @@ public class KeyguardHostView extends KeyguardViewBase {
@Override
public void cleanUp() {
-
+ // Make sure we let go of all widgets and their package contexts promptly. If we don't do
+ // this, and the associated application is uninstalled, it can cause a soft reboot.
+ int count = mAppWidgetContainer.getChildCount();
+ for (int i = 0; i < count; i++) {
+ KeyguardWidgetFrame frame = mAppWidgetContainer.getWidgetPageAt(i);
+ frame.removeAllViews();
+ }
}
/**
@@ -1609,8 +1615,6 @@ public class KeyguardHostView extends KeyguardViewBase {
return !configDisabled || isTestHarness || fileOverride;
}
-
-
public void goToUserSwitcher() {
mAppWidgetContainer.setCurrentPage(getWidgetPosition(R.id.keyguard_multi_user_selector));
}