Merge "Post a notification if reboot to DSU failed" am: 5432af8406 am: dcdec0017e am: 3a3ec27223 am: 07f7f83826 am: 2f624e15fd

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

Change-Id: Ie6f06c9bd5a68fdfec663d1cac0d2c3cecec1223
This commit is contained in:
Yo Chiang
2020-08-20 09:49:16 +00:00
committed by Automerger Merge Worker

View File

@@ -352,16 +352,18 @@ public class DynamicSystemInstallationService extends Service
if (powerManager != null) {
powerManager.reboot("dynsystem");
}
} else {
Log.e(TAG, "Failed to enable DynamicSystem because of native runtime error.");
mNM.cancel(NOTIFICATION_ID);
Toast.makeText(this,
getString(R.string.toast_failed_to_reboot_to_dynsystem),
Toast.LENGTH_LONG).show();
mDynSystem.remove();
return;
}
Log.e(TAG, "Failed to enable DynamicSystem because of native runtime error.");
Toast.makeText(this,
getString(R.string.toast_failed_to_reboot_to_dynsystem),
Toast.LENGTH_LONG).show();
postStatus(STATUS_NOT_STARTED, CAUSE_ERROR_EXCEPTION, null);
resetTaskAndStop();
mDynSystem.remove();
}
private void executeRebootToNormalCommand() {