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

Commit 38c6f960 authored by Keyan Mobli's avatar Keyan Mobli Committed by Gerrit Code Review
Browse files

Merge "Fix bug in Power Off menu." into gingerbread

parents 5ed1fb17 5e452905
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.os.storage.IMountShutdownObserver;

import com.android.internal.telephony.ITelephony;
import android.util.Log;
import android.view.KeyEvent;
import android.view.WindowManager;

public final class ShutdownThread extends Thread {
@@ -129,6 +130,15 @@ public final class ShutdownThread extends Thread {
                            }
                        })
                        .create();
                        dialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
                            public boolean onKey (DialogInterface dialog, int keyCode, KeyEvent event) {
                                if (keyCode == KeyEvent.KEYCODE_BACK) {
                                    mReboot = false;
                                    dialog.cancel();
                                }
                                return true;
                            }
                        });
            } else {
                dialog = new AlertDialog.Builder(context)
                        .setIcon(android.R.drawable.ic_dialog_alert)