fix NPE in shutdown thread

null reboot reason is used when it's a simple reboot.

Change-Id: I9d3110ca733a1b0401721fde907924c101997c4f
This commit is contained in:
Guang Zhu
2015-05-28 20:50:03 -07:00
parent 832654a857
commit 9bb765448d

View File

@@ -238,7 +238,7 @@ public final class ShutdownThread extends Thread {
// throw up an indeterminate system dialog to indicate radio is
// shutting down.
ProgressDialog pd = new ProgressDialog(context);
if (mRebootReason.equals(PowerManager.REBOOT_RECOVERY)) {
if (PowerManager.REBOOT_RECOVERY.equals(mRebootReason)) {
pd.setTitle(context.getText(com.android.internal.R.string.reboot_to_recovery_title));
} else {
pd.setTitle(context.getText(com.android.internal.R.string.power_off));