1 frameworks/base/core/java/android/view/WindowManagerPolicy.java
public void rebootMode(boolean confirm);
2 /frameworks/base/policy/src/com/android/internal/policy/impl/GlobalActions.java
new SinglePressAction(
+ com.android.internal.R.drawable.ic_popup_sync_1,
+ R.string.factorytest_reboot){
+
+ @Override
+ public void onPress() {
+ mWindowManagerFuncs.rebootMode(true);
+ }
+
+ public boolean showDuringKeyguard() {
+ return true;
+ }
+
+ public boolean showBeforeProvisioning() {
+ return true;
+ }
+
+ });
3.1
- final int resourceId = mRebootSafeMode
- ? com.android.internal.R.string.reboot_safemode_confirm
- : (longPressBehavior == 2
- ? com.android.internal.R.string.shutdown_confirm_question
- : com.android.internal.R.string.shutdown_confirm);
-
+ // add by xuxin 20130821-1357 +
+ int resourceId = -1,titleId = -1;
+ if(mReboot){
+ resourceId = com.android.internal.R.string.reboot_confirm;
+ titleId = com.android.internal.R.string.factorytest_reboot;
+ }else{
+ resourceId = mRebootSafeMode
+ ? com.android.internal.R.string.reboot_safemode_confirm
+ : (longPressBehavior == 2
+ ? com.android.internal.R.string.shutdown_confirm_question
+ : com.android.internal.R.string.shutdown_confirm);
+ titleId = mRebootSafeMode
+ ? com.android.internal.R.string.reboot_safemode_title
+ : com.android.internal.R.string.power_off;
+ }
3.2
- .setTitle(mRebootSafeMode
- ? com.android.internal.R.string.reboot_safemode_title
- : com.android.internal.R.string.power_off)
+ // add by xuxin 20130821-1357 +
+ .setTitle(titleId)
+ @Override
+ public void rebootMode(boolean confirm) {
+ ShutdownThread.reboot(mContext, null,confirm);
+ }