stopSelf() if there is no installed system image

On BOOT_COMPLETED, the installation checks if there is an installed
system image and shows a notification if there is.

However, if there isn't. The installation should stop itself.

Bug: 128960337
Test: boot and adb shell ps
Change-Id: I422e308020cd5ec127ea265079926c1b74547d4b
This commit is contained in:
Po-Chien Hsueh
2019-04-10 15:30:16 +08:00
parent 9a1627f521
commit 67697394a2

View File

@@ -326,6 +326,8 @@ public class DynamicSystemInstallationService extends Service
} else if (status == STATUS_READY) {
startForeground(NOTIFICATION_ID,
buildNotification(STATUS_READY, CAUSE_NOT_SPECIFIED));
} else {
stopSelf();
}
}