Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c5cfe81 authored by David van Tonder's avatar David van Tonder Committed by Gerrit Code Review
Browse files

Merge "Keyguard: fix not shown overlay widgets from system" into cm-11.0

parents 367dc1e3 40495bbe
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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);
@@ -1303,7 +1310,6 @@ public class KeyguardHostView extends KeyguardViewBase {

    private void addWidgetsFromSettings() {
        if (mSafeModeEnabled || widgetsDisabled()) {
            addDefaultStatusWidget(0);
            return;
        }