diff options
author | Adam Cohen <adamcohen@google.com> | 2013-04-18 13:37:05 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2013-04-18 13:55:25 -0700 |
commit | 128f27632343ed8ad8bba2d96f4ec69c0e369de7 (patch) | |
tree | 5f3a5905c52f941c482fa8b8a8a775334bbb9da3 /policy | |
parent | 7fa9667f63fe84a2d17ce899121f32bfcec98864 (diff) | |
download | frameworks_base-128f27632343ed8ad8bba2d96f4ec69c0e369de7.zip frameworks_base-128f27632343ed8ad8bba2d96f4ec69c0e369de7.tar.gz frameworks_base-128f27632343ed8ad8bba2d96f4ec69c0e369de7.tar.bz2 |
Fix system server crash when uninstalling paid LS widget that has been added (issue 8647398)
Change-Id: I4acf02dad6bd8347727ca4322d19e15b130a6621
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java | 10 |
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)); } |