Skip to content

Commit

Permalink
Adds a reboot option to the power menu.
Browse files Browse the repository at this point in the history
Conflicts:

	mid/com/android/internal/policy/impl/ShutdownThread.java
	phone/com/android/internal/policy/impl/ShutdownThread.java
  • Loading branch information
hyperb1iss authored and EddieRingle committed Jun 29, 2010
1 parent fa03b9f commit c8e74df
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mid/com/android/internal/policy/impl/GlobalActions.java
Expand Up @@ -142,6 +142,21 @@ public boolean showBeforeProvisioning() {
},
// next: silent mode
mSilentModeToggle,
// next: reboot
new SinglePressAction(com.android.internal.R.drawable.ic_lock_power_off, R.string.global_action_reboot) {

public void onPress() {
ShutdownThread.reboot(mContext, true);
}

public boolean showDuringKeyguard() {
return true;
}

public boolean showBeforeProvisioning() {
return true;
}
},
// last: power off
new SinglePressAction(com.android.internal.R.drawable.ic_lock_power_off, R.string.global_action_power_off) {

Expand Down
16 changes: 16 additions & 0 deletions phone/com/android/internal/policy/impl/GlobalActions.java
Expand Up @@ -197,6 +197,22 @@ public boolean showBeforeProvisioning() {
mSilentModeToggle,
// next: airplane mode
mAirplaneModeOn,
// next: reboot
new SinglePressAction(com.android.internal.R.drawable.ic_lock_power_off, R.string.global_action_reboot) {

public void onPress() {
ShutdownThread.reboot(mContext, true);
}

public boolean showDuringKeyguard() {
return true;
}

public boolean showBeforeProvisioning() {
return true;
}
},

// last: power off
new SinglePressAction(
com.android.internal.R.drawable.ic_lock_power_off,
Expand Down

0 comments on commit c8e74df

Please sign in to comment.