Loading packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java +7 −1 Original line number Diff line number Diff line Loading @@ -235,9 +235,16 @@ public class KeyguardHostView extends KeyguardViewBase { // that are triggered by deleteAppWidgetId, which is why we're doing this int[] appWidgetIdsInKeyguardSettings = mLockPatternUtils.getAppWidgets(); int[] appWidgetIdsBoundToHost = mAppWidgetHost.getAppWidgetIds(); int fallbackWidgetId = mLockPatternUtils.getFallbackAppWidgetId(); for (int i = 0; i < appWidgetIdsBoundToHost.length; i++) { int appWidgetId = appWidgetIdsBoundToHost[i]; if (!contains(appWidgetIdsInKeyguardSettings, appWidgetId)) { if (appWidgetId == fallbackWidgetId) { // Reset fallback widget id in the event that widgets have been // enabled, and fallback widget is being deleted mLockPatternUtils.writeFallbackAppWidgetId( AppWidgetManager.INVALID_APPWIDGET_ID); } Log.d(TAG, "Found a appWidgetId that's not being used by keyguard, deleting id " + appWidgetId); mAppWidgetHost.deleteAppWidgetId(appWidgetId); Loading Loading @@ -1303,7 +1310,6 @@ public class KeyguardHostView extends KeyguardViewBase { private void addWidgetsFromSettings() { if (mSafeModeEnabled || widgetsDisabled()) { addDefaultStatusWidget(0); return; } Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java +7 −1 Original line number Diff line number Diff line Loading @@ -235,9 +235,16 @@ public class KeyguardHostView extends KeyguardViewBase { // that are triggered by deleteAppWidgetId, which is why we're doing this int[] appWidgetIdsInKeyguardSettings = mLockPatternUtils.getAppWidgets(); int[] appWidgetIdsBoundToHost = mAppWidgetHost.getAppWidgetIds(); int fallbackWidgetId = mLockPatternUtils.getFallbackAppWidgetId(); for (int i = 0; i < appWidgetIdsBoundToHost.length; i++) { int appWidgetId = appWidgetIdsBoundToHost[i]; if (!contains(appWidgetIdsInKeyguardSettings, appWidgetId)) { if (appWidgetId == fallbackWidgetId) { // Reset fallback widget id in the event that widgets have been // enabled, and fallback widget is being deleted mLockPatternUtils.writeFallbackAppWidgetId( AppWidgetManager.INVALID_APPWIDGET_ID); } Log.d(TAG, "Found a appWidgetId that's not being used by keyguard, deleting id " + appWidgetId); mAppWidgetHost.deleteAppWidgetId(appWidgetId); Loading Loading @@ -1303,7 +1310,6 @@ public class KeyguardHostView extends KeyguardViewBase { private void addWidgetsFromSettings() { if (mSafeModeEnabled || widgetsDisabled()) { addDefaultStatusWidget(0); return; } Loading