Only cancel notification if update isn't installed
* Even if the package is removed on A/B devices we still want to show the reboot notification Change-Id: I980d36766a1427874b65b11674a8f0ae4ce1db88
This commit is contained in:
@@ -126,10 +126,13 @@ public class UpdaterService extends Service {
|
|||||||
if (extras != null && downloadId.equals(
|
if (extras != null && downloadId.equals(
|
||||||
extras.getString(UpdaterController.EXTRA_DOWNLOAD_ID))) {
|
extras.getString(UpdaterController.EXTRA_DOWNLOAD_ID))) {
|
||||||
mNotificationBuilder.setExtras(null);
|
mNotificationBuilder.setExtras(null);
|
||||||
|
UpdateInfo update = mUpdaterController.getUpdate(downloadId);
|
||||||
|
if (update.getStatus() != UpdateStatus.INSTALLED) {
|
||||||
mNotificationManager.cancel(NOTIFICATION_ID);
|
mNotificationManager.cancel(NOTIFICATION_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
IntentFilter intentFilter = new IntentFilter();
|
IntentFilter intentFilter = new IntentFilter();
|
||||||
intentFilter.addAction(UpdaterController.ACTION_DOWNLOAD_PROGRESS);
|
intentFilter.addAction(UpdaterController.ACTION_DOWNLOAD_PROGRESS);
|
||||||
|
Reference in New Issue
Block a user