1.添加string显示字符
在frameworks\base\core\res\res\values\strings.xml
2. 在alps\frameworks\base\core\res\res\drawable-hdpi 中添加图标:
3.\frameworks\base\core\res\res\values\symbols.xml添加不同类型的xml配置
<java-symboltype="drawable" name="ic_reboot_power" /><!--addreboot icon lhw -->
\frameworks\base\policy\src\com\android\internal\policy\impl\GlobalActions.java
mItems = newArrayList<Action>();
// first: power off
mItems.add(
new SinglePressAction(
com.android.internal.R.drawable.ic_lock_power_off,
R.string.global_action_power_off) {
public void onPress() {
// shutdown by makingsure radio and power are handled accordingly.
mWindowManagerFuncs.shutdown(true);
}
public boolean onLongPress() {
mWindowManagerFuncs.rebootSafeMode(true);
return true;
}
public boolean showDuringKeyguard() {
return true;
}
public booleanshowBeforeProvisioning() {
return true;
}
});
//add reboot lhw start
mItems.add(//同上添加
newSinglePressAction(
com.android.internal.R.drawable.ic_reboot_power,
R.string.factorytest_reboot) {
Intent i = new Intent(Intent.ACTION_REBOOT);
i.setAction(Intent.ACTION_REBOOT);
i.putExtra("nowait", 1);
i.putExtra("interval", 1);
i.putExtra("window", 0);
sendBroadcast(i);