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

Commit fe9d370f authored by Pawit Pornkitprasan's avatar Pawit Pornkitprasan
Browse files

Extended Power Menu: Initialize reboot reason to the first reason

Without doing this, the string "null" will be sent to the reboot command
and can cause the reboot recovery pre-command to get confused on devices
that use it. (On Galaxy S, it will default into booting into recovery)

Change-Id: Id94863d56c45ff10d3ded7f62e3f2ef7b8cd0e69
parent 67a59617
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -147,6 +147,9 @@ public final class ShutdownThread extends Thread {
                                return true;
                                return true;
                            }
                            }
                        });
                        });
                // Initialize to the first reason
                String actions[] = context.getResources().getStringArray(com.android.internal.R.array.shutdown_reboot_actions);
                mRebootReason = actions[0];
            } else {
            } else {
                dialog = new AlertDialog.Builder(context)
                dialog = new AlertDialog.Builder(context)
                        .setIcon(android.R.drawable.ic_dialog_alert)
                        .setIcon(android.R.drawable.ic_dialog_alert)