Loading core/java/com/android/internal/app/ShutdownThread.java +11 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,17 @@ public final class ShutdownThread extends Thread { dialog = new AlertDialog.Builder(context) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle(com.android.internal.R.string.reboot_system) .setMessage(com.android.internal.R.string.reboot_confirm) .setSingleChoiceItems(com.android.internal.R.array.shutdown_reboot_options, 0, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { if (which < 0) return; String actions[] = context.getResources().getStringArray(com.android.internal.R.array.shutdown_reboot_actions); if (actions != null && which < actions.length) mRebootReason = actions[which]; } }) .setPositiveButton(com.android.internal.R.string.yes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { mReboot = true; Loading core/res/res/values/arrays.xml +16 −0 Original line number Diff line number Diff line Loading @@ -142,4 +142,20 @@ <item><xliff:g id="id">ime</xliff:g></item> </string-array> <!-- Defines the shutdown options shown in the reboot dialog. --> <array name="shutdown_reboot_options"> <item>Reboot</item> <item>Recovery</item> <item>Bootloader</item> </array> <!-- Do not translate. Defines the shutdown actions passed to the kernel. The first item should be empty for regular reboot. --> <string-array name="shutdown_reboot_actions"> <item></item> <item>recovery</item> <item>bootloader</item> </string-array> </resources> Loading
core/java/com/android/internal/app/ShutdownThread.java +11 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,17 @@ public final class ShutdownThread extends Thread { dialog = new AlertDialog.Builder(context) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle(com.android.internal.R.string.reboot_system) .setMessage(com.android.internal.R.string.reboot_confirm) .setSingleChoiceItems(com.android.internal.R.array.shutdown_reboot_options, 0, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { if (which < 0) return; String actions[] = context.getResources().getStringArray(com.android.internal.R.array.shutdown_reboot_actions); if (actions != null && which < actions.length) mRebootReason = actions[which]; } }) .setPositiveButton(com.android.internal.R.string.yes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { mReboot = true; Loading
core/res/res/values/arrays.xml +16 −0 Original line number Diff line number Diff line Loading @@ -142,4 +142,20 @@ <item><xliff:g id="id">ime</xliff:g></item> </string-array> <!-- Defines the shutdown options shown in the reboot dialog. --> <array name="shutdown_reboot_options"> <item>Reboot</item> <item>Recovery</item> <item>Bootloader</item> </array> <!-- Do not translate. Defines the shutdown actions passed to the kernel. The first item should be empty for regular reboot. --> <string-array name="shutdown_reboot_actions"> <item></item> <item>recovery</item> <item>bootloader</item> </string-array> </resources>