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

Commit 3121af69 authored by Yo Chiang's avatar Yo Chiang Committed by Automerger Merge Worker
Browse files

Merge "DSUService: stopSelf() only if no ongoing installation" am: 0fb5c3f3

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1609094

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9ec7b60e0a5d964db91e84bb1ebb4c751eda5cf5
parents 00a8690d 0fb5c3f3
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -394,15 +394,19 @@ public class DynamicSystemInstallationService extends Service
    }

    private void executeNotifyIfInUseCommand() {
        int status = getStatus();

        if (status == STATUS_IN_USE) {
        switch (getStatus()) {
            case STATUS_IN_USE:
                startForeground(NOTIFICATION_ID,
                        buildNotification(STATUS_IN_USE, CAUSE_NOT_SPECIFIED));
        } else if (status == STATUS_READY) {
                break;
            case STATUS_READY:
                startForeground(NOTIFICATION_ID,
                        buildNotification(STATUS_READY, CAUSE_NOT_SPECIFIED));
        } else {
                break;
            case STATUS_IN_PROGRESS:
                break;
            case STATUS_NOT_STARTED:
            default:
                stopSelf();
        }
    }