Skip to content

Commit

Permalink
Extended Power Menu: Initialize reboot reason to the first reason
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pawitp authored and Faryaab committed Apr 17, 2012
1 parent faa71d6 commit 79db503
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/java/com/android/internal/app/ShutdownThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ public boolean onKey (DialogInterface dialog, int keyCode, KeyEvent event) {
return true;
}
});
// Initialize to the first reason
String actions[] = context.getResources().getStringArray(com.android.internal.R.array.shutdown_reboot_actions);
mRebootReason = actions[0];
} else {
dialog = new AlertDialog.Builder(context)
.setIcon(android.R.drawable.ic_dialog_alert)
Expand Down

0 comments on commit 79db503

Please sign in to comment.