summaryrefslogtreecommitdiff
path: root/packages/DynamicSystemInstallationService/src
diff options
context:
space:
mode:
authorPo-Chien Hsueh <pchsueh@google.com>2020-01-02 15:44:26 +0800
committerPo-Chien Hsueh <pchsueh@google.com>2020-01-02 15:44:26 +0800
commitede56ae7ea4574b6942e748f31f9ef862a7ec0bb (patch)
treea61ed3a36477f4691ae2eb70db00ad2c59064343 /packages/DynamicSystemInstallationService/src
parent5a049f5cf22d2eb5c7c4974fbf282427cb418ece (diff)
Remove notification right after clicking on cancel
After aosp/1188881, DynamicSystemManager.remove() is blocked for about 30 seconds. To give users feedbacks faster when they click on the [Cancel] button, This CL removes the progress notification earlier. Bug: 145891864 Test: Clicking on the [Cancel] button Change-Id: I4e43775b2de6eaa50d4a1cc073a5057f22f6d8d5
Diffstat (limited to 'packages/DynamicSystemInstallationService/src')
-rw-r--r--packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java
index 9e49826f70c3..c2ce84023869 100644
--- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java
+++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java
@@ -262,10 +262,11 @@ public class DynamicSystemInstallationService extends Service
return;
}
+ stopForeground(true);
mJustCancelledByUser = true;
if (mInstallTask.cancel(false)) {
- // Will cleanup and post status in onResult()
+ // Will stopSelf() in onResult()
Log.d(TAG, "Cancel request filed successfully");
} else {
Log.e(TAG, "Trying to cancel installation while it's already completed.");