Loading services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +2 −16 Original line number Diff line number Diff line Loading @@ -3014,7 +3014,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku private void onUserStopped(int userId) { synchronized (mLock) { boolean providersChanged = false; boolean crossProfileWidgetsChanged = false; // Remove widgets that have both host and provider in the user. Loading Loading @@ -3050,16 +3049,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku } } // Remove the providers and notify hosts in other profiles. final int providerCount = mProviders.size(); for (int i = providerCount - 1; i >= 0; i--) { Provider provider = mProviders.get(i); if (provider.getUserId() == userId) { crossProfileWidgetsChanged |= !provider.widgets.isEmpty(); providersChanged = true; deleteProviderLocked(provider); } } // Leave the providers present as hosts will show the widgets // masked while the user is stopped. // Remove grants for this user. final int grantCount = mPackagesWithBindWidgetPermission.size(); Loading @@ -3082,11 +3073,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku mNextAppWidgetIds.removeAt(nextIdIndex); } // Announce removed provider changes to all hosts in the group. if (providersChanged) { scheduleNotifyGroupHostsForProvidersChangedLocked(userId); } // Save state if removing a profile changed the group state. // Nothing will be saved if the group parent was removed. if (crossProfileWidgetsChanged) { Loading Loading
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +2 −16 Original line number Diff line number Diff line Loading @@ -3014,7 +3014,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku private void onUserStopped(int userId) { synchronized (mLock) { boolean providersChanged = false; boolean crossProfileWidgetsChanged = false; // Remove widgets that have both host and provider in the user. Loading Loading @@ -3050,16 +3049,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku } } // Remove the providers and notify hosts in other profiles. final int providerCount = mProviders.size(); for (int i = providerCount - 1; i >= 0; i--) { Provider provider = mProviders.get(i); if (provider.getUserId() == userId) { crossProfileWidgetsChanged |= !provider.widgets.isEmpty(); providersChanged = true; deleteProviderLocked(provider); } } // Leave the providers present as hosts will show the widgets // masked while the user is stopped. // Remove grants for this user. final int grantCount = mPackagesWithBindWidgetPermission.size(); Loading @@ -3082,11 +3073,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku mNextAppWidgetIds.removeAt(nextIdIndex); } // Announce removed provider changes to all hosts in the group. if (providersChanged) { scheduleNotifyGroupHostsForProvidersChangedLocked(userId); } // Save state if removing a profile changed the group state. // Nothing will be saved if the group parent was removed. if (crossProfileWidgetsChanged) { Loading