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

Unverified Commit 8013f67c authored by Michael Bestas's avatar Michael Bestas
Browse files

fixup! frameworks: Add support for advanced restart options

Change-Id: Ie0b89264c46ddc008df7d478a1c934daea2c5e67
parent f423f8ba
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -1038,7 +1038,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
    final class RestartAction extends SinglePressAction implements LongPressAction {
        RestartAction() {
            super(R.drawable.ic_restart, shouldShowRestartSubmenu()
                    ? com.android.systemui.R.string.global_action_restart_more
                    ? com.android.systemui.res.R.string.global_action_restart_more
                    : R.string.global_action_restart);
        }

@@ -1086,7 +1086,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
    private final class RestartSystemAction extends SinglePressAction implements LongPressAction {
        public RestartSystemAction() {
            super(R.drawable.ic_restart,
                    com.android.systemui.R.string.global_action_restart_system);
                    com.android.systemui.res.R.string.global_action_restart_system);
        }

        @Override
@@ -1116,8 +1116,8 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene

    private final class RestartRecoveryAction extends SinglePressAction {
        private RestartRecoveryAction() {
            super(com.android.systemui.R.drawable.ic_lock_restart_recovery,
                    com.android.systemui.R.string.global_action_restart_recovery);
            super(com.android.systemui.res.R.drawable.ic_lock_restart_recovery,
                    com.android.systemui.res.R.string.global_action_restart_recovery);
        }

        @Override
@@ -1138,8 +1138,8 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene

    private final class RestartBootloaderAction extends SinglePressAction {
        private RestartBootloaderAction() {
            super(com.android.systemui.R.drawable.ic_lock_restart_bootloader,
                    com.android.systemui.R.string.global_action_restart_bootloader);
            super(com.android.systemui.res.R.drawable.ic_lock_restart_bootloader,
                    com.android.systemui.res.R.string.global_action_restart_bootloader);
        }

        @Override
@@ -1160,8 +1160,8 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene

    private final class RestartFastbootAction extends SinglePressAction {
        private RestartFastbootAction() {
            super(com.android.systemui.R.drawable.ic_lock_restart_fastboot,
                    com.android.systemui.R.string.global_action_restart_fastboot);
            super(com.android.systemui.res.R.drawable.ic_lock_restart_fastboot,
                    com.android.systemui.res.R.string.global_action_restart_fastboot);
        }

        @Override
@@ -1182,8 +1182,8 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene

    private final class RestartDownloadAction extends SinglePressAction {
        private RestartDownloadAction() {
            super(com.android.systemui.R.drawable.ic_lock_restart_bootloader,
                    com.android.systemui.R.string.global_action_restart_download);
            super(com.android.systemui.res.R.drawable.ic_lock_restart_bootloader,
                    com.android.systemui.res.R.string.global_action_restart_download);
        }

        @Override
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ public class GlobalActionsPowerDialog {
        ViewGroup listView = (ViewGroup) LayoutInflater.from(context).inflate(
                com.android.systemui.res.R.layout.global_actions_power_dialog_flow, null);

        Flow flow = listView.findViewById(com.android.systemui.R.id.power_flow);
        Flow flow = listView.findViewById(com.android.systemui.res.R.id.power_flow);

        for (int i = 0; i < adapter.getCount(); i++) {
            View action = adapter.getView(i, null, listView);
+6 −6
Original line number Diff line number Diff line
@@ -144,17 +144,17 @@ public class ShutdownUi {
        if (reason != null && reason.startsWith(PowerManager.REBOOT_RECOVERY_UPDATE)) {
            return R.string.reboot_to_update_reboot;
        } else if (reason != null && !custom && reason.equals(PowerManager.REBOOT_RECOVERY)) {
            return com.android.systemui.R.string.global_action_restart_progress;
            return com.android.systemui.res.R.string.global_action_restart_progress;
        } else if (reason != null && reason.equals(PowerManager.REBOOT_RECOVERY)) {
            return com.android.systemui.R.string.global_action_restart_recovery_progress;
            return com.android.systemui.res.R.string.global_action_restart_recovery_progress;
        } else if (reason != null && reason.equals(PowerManager.REBOOT_BOOTLOADER)) {
            return com.android.systemui.R.string.global_action_restart_bootloader_progress;
            return com.android.systemui.res.R.string.global_action_restart_bootloader_progress;
        } else if (reason != null && reason.equals(PowerManager.REBOOT_DOWNLOAD)) {
            return com.android.systemui.R.string.global_action_restart_download_progress;
            return com.android.systemui.res.R.string.global_action_restart_download_progress;
        } else if (reason != null && reason.equals(PowerManager.REBOOT_FASTBOOT)) {
            return com.android.systemui.R.string.global_action_restart_fastboot_progress;
            return com.android.systemui.res.R.string.global_action_restart_fastboot_progress;
        } else if (isReboot) {
            return com.android.systemui.R.string.global_action_restart_progress;
            return com.android.systemui.res.R.string.global_action_restart_progress;
        } else {
            return R.string.shutdown_progress;
        }