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

Commit 1e162aed authored by TreeHugger Robot's avatar TreeHugger Robot Committed by android-build-merger
Browse files

Merge "Fix widget not being masked when freshly added." into nyc-dev am: 9c63f3c5

am: 6fdf1cdc

* commit '6fdf1cdc':
  Fix widget not being masked when freshly added.

Change-Id: I28900662bf408214c1a9fbc9b9bde84c56696c05
parents ed530f58 6fdf1cdc
Loading
Loading
Loading
Loading
+15 −16
Original line number Diff line number Diff line
@@ -613,10 +613,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
                            | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
                }
            }
        } finally {
            Binder.restoreCallingIdentity(identity);
        }

            for (int j = 0; j < widgetCount; j++) {
                Widget widget = provider.widgets.get(j);
                if (targetWidget != null && targetWidget != widget) continue;
@@ -630,6 +626,9 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
                    scheduleNotifyUpdateAppWidgetLocked(widget, widget.getEffectiveViewsLocked());
                }
            }
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
    }

    private void unmaskWidgetsViewsLocked(Provider provider) {
@@ -1062,8 +1061,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            widget.provider = provider;
            widget.options = (options != null) ? cloneIfLocalBinder(options) : new Bundle();

            onWidgetProviderAddedOrChangedLocked(widget);

            // We need to provide a default value for the widget category if it is not specified
            if (!widget.options.containsKey(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY)) {
                widget.options.putInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY,
@@ -1072,6 +1069,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku

            provider.widgets.add(widget);

            onWidgetProviderAddedOrChangedLocked(widget);

            final int widgetCount = provider.widgets.size();
            if (widgetCount == 1) {
                // Tell the provider that it's ready.