Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ede56ae7 authored by Po-Chien Hsueh's avatar Po-Chien Hsueh
Browse files

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
parent 5a049f5c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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.");