Merge "DSUService: stopSelf() only if no ongoing installation" am: 0fb5c3f306 am: 3121af69d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1609094 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I90fbd6d9de36955f55d55e0bc61941670cfba35c
This commit is contained in:
@@ -394,15 +394,19 @@ public class DynamicSystemInstallationService extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void executeNotifyIfInUseCommand() {
|
private void executeNotifyIfInUseCommand() {
|
||||||
int status = getStatus();
|
switch (getStatus()) {
|
||||||
|
case STATUS_IN_USE:
|
||||||
if (status == STATUS_IN_USE) {
|
|
||||||
startForeground(NOTIFICATION_ID,
|
startForeground(NOTIFICATION_ID,
|
||||||
buildNotification(STATUS_IN_USE, CAUSE_NOT_SPECIFIED));
|
buildNotification(STATUS_IN_USE, CAUSE_NOT_SPECIFIED));
|
||||||
} else if (status == STATUS_READY) {
|
break;
|
||||||
|
case STATUS_READY:
|
||||||
startForeground(NOTIFICATION_ID,
|
startForeground(NOTIFICATION_ID,
|
||||||
buildNotification(STATUS_READY, CAUSE_NOT_SPECIFIED));
|
buildNotification(STATUS_READY, CAUSE_NOT_SPECIFIED));
|
||||||
} else {
|
break;
|
||||||
|
case STATUS_IN_PROGRESS:
|
||||||
|
break;
|
||||||
|
case STATUS_NOT_STARTED:
|
||||||
|
default:
|
||||||
stopSelf();
|
stopSelf();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user