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

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

Better response when fail to reboot to AOT

Display a Toast message when hitting native error rebooting into
AndroidOnTap.

Bug: 123673280
Test: adb shell am
Change-Id: I1b8acb2c19fb2c365c4c005e3866c79ef930aadc
parent 34de5af4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -30,6 +30,9 @@
    <!-- Action on notification: Reboot to AndroidOnTap [CHAR LIMIT=16] -->
    <string name="notification_action_reboot_to_dynandroid">Reboot</string>

    <!-- Toast when installed AndroidOnTap is discarded [CHAR LIMIT=64] -->
    <!-- Toast when installed DynamicAndroid is discarded [CHAR LIMIT=64] -->
    <string name="toast_dynandroid_discarded">Installed AndroidOnTap is discarded.</string>
    <!-- Toast when we fail to launch into DynamicAndroid [CHAR LIMIT=64] -->
    <string name="toast_failed_to_reboot_to_dynandroid">Failed to reboot into AndroidOnTap.</string>

</resources>
+6 −1
Original line number Diff line number Diff line
@@ -278,10 +278,15 @@ public class DynamicAndroidInstallationService extends Service
        }

        if (!mInstallTask.commit()) {
            // TODO: b/123673280 better UI response
            Log.e(TAG, "Failed to commit installation because of native runtime error.");
            mNM.cancel(NOTIFICATION_ID);

            Toast.makeText(this,
                    getString(R.string.toast_failed_to_reboot_to_dynandroid),
                    Toast.LENGTH_LONG).show();

            mDynAndroid.remove();

            return;
        }