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

Commit c61b11cb authored by Renan Strauss's avatar Renan Strauss Committed by Diogo Ferreira
Browse files

framework: Prevent the reboot option from popping up when it's not supposed to.

If you press reboot then cancel and press shutdown, the reboot menu appears.
This logic fixes that.

Change-Id: I596781714c8ed5191cb2486bca6b204a1a82287f
parent e97f0c52
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -121,7 +121,12 @@ public final class ShutdownThread extends Thread {
                                beginShutdownSequence(context);
                            }
                        })
                        .setNegativeButton(com.android.internal.R.string.no, null)
                        .setNegativeButton(com.android.internal.R.string.yes, new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int which) {
                                mReboot = false;
                                dialog.cancel();
                            }
                        })
                        .create();
            } else {
                dialog = new AlertDialog.Builder(context)