diff options
author | Yo Chiang <yochiang@google.com> | 2020-10-05 16:41:18 +0800 |
---|---|---|
committer | Yo Chiang <yochiang@google.com> | 2020-10-05 08:57:50 +0000 |
commit | 569c31cef61f05e9b83e1afac8eab4ddb246255a (patch) | |
tree | 408aefa9bd1e4ee6ca451afe61633720cb3a03a4 /packages/DynamicSystemInstallationService/src | |
parent | 09893737401f27616f7ae04e5113bc7738869c5a (diff) |
Dismiss DSU notification in executeDiscardCommand()
Dismiss notification even if there is no active DSU installation.
Bug: 170072953
Test: Install a DSU system.
Reboot into guest system and reboot back to host system.
`adb shell gsi_tool wipe`
Press "Discard" in the DSU notification, the notifiction is dismissed.
Change-Id: I6f217c4ba287e4789d61182a12485db60f9605c9
Diffstat (limited to 'packages/DynamicSystemInstallationService/src')
-rw-r--r-- | packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java index 9ff868467531..f7f3cbb7d332 100644 --- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java +++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java @@ -321,6 +321,9 @@ public class DynamicSystemInstallationService extends Service if (!isDynamicSystemInstalled() && (getStatus() != STATUS_READY)) { Log.e(TAG, "Trying to discard AOT while there is no complete installation"); + // Stop foreground state and dismiss stale notification. + stopForeground(STOP_FOREGROUND_REMOVE); + resetTaskAndStop(); return; } |