Fixing FLAG_PROVIDER_NOT_READY not being cleared in LoaderTask

If a widget is installed, the provider is always ready. The flag was not
being cleared all the time (similar to PackageUpdatedTask).

Bug: 62496671
Change-Id: Ia1c0cb3b312a20ed6451baeccb632a5e5f0e3edc
This commit is contained in:
Sunny Goyal
2017-06-14 11:02:27 -07:00
parent 7847d10f38
commit 571e12da66

View File

@@ -576,7 +576,8 @@ public class LoaderTask implements Runnable {
// available or not available. We do not need to track
// any future restore updates.
int status = c.restoreFlag &
~LauncherAppWidgetInfo.FLAG_RESTORE_STARTED;
~LauncherAppWidgetInfo.FLAG_RESTORE_STARTED &
~LauncherAppWidgetInfo.FLAG_PROVIDER_NOT_READY;
if (!wasProviderReady) {
// If provider was not previously ready, update the
// status and UI flag.
@@ -584,9 +585,6 @@ public class LoaderTask implements Runnable {
// Id would be valid only if the widget restore broadcast was received.
if (isIdValid) {
status |= LauncherAppWidgetInfo.FLAG_UI_NOT_READY;
} else {
status &= ~LauncherAppWidgetInfo
.FLAG_PROVIDER_NOT_READY;
}
}
appWidgetInfo.restoreStatus = status;