Always re-register AlarmManager broadcast and send widget update when package is unstopped
Updates AppWidgetServiceImpl to always re-register AlarmManager broadcast and send APPWIDGET_UPDATE when the package is unstopped, even if we have not observed a change in masked state. We may have received a PACKAGE_RESTARTED, but did not mask the widget (masked == false) because the package was already unstopped by the time we queried PackageManager.isPackageStoppedForUser. In that case, the PendingIntents for this widget will have still been cancelled, and we need to trigger a widget update so that the provider can create new PendingIntents for their widget. Also, the broadcast has been cleared from AlarmManager and must be re-registered. Bug: 435687711 Test: force-close Google app and verify expected search widget behavior Flag: EXEMPT bug fix Change-Id: I928bb2e18c8d66bc984593f367f4416228cf3e90
Loading
Please register or sign in to comment