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

Commit 89e1cbe5 authored by Patrick Jacques's avatar Patrick Jacques
Browse files

Fix issue #1814 - Reboot DialogInterface

Apply fix from comment #5 by hmorud to correct power off
after cancelling reboot prompt.

1. Hold the power button
2. Choose Reboot
3. Click Cancel
4. Choose Power Off

Phone reboots instead of powering off.

- http://code.google.com/p/cyanogenmod/issues/detail?id=1814

author: hmorud
parent a1b262ea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ public final class ShutdownThread extends Thread {
                        .setMessage(com.android.internal.R.string.reboot_confirm)
                        .setPositiveButton(com.android.internal.R.string.yes, new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int which) {
                               mReboot = true;
                                beginShutdownSequence(context);
                            }
                        })
@@ -127,6 +128,7 @@ public final class ShutdownThread extends Thread {
                dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
            }
            dialog.show();
           mReboot = false;
        } else {
            beginShutdownSequence(context);
        }