frameworks/base/core/res/res/values/config.xml
屏蔽power按键短按休眠
+ <integer name="config_shortPressOnPowerBehavior">0</integer>
frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
+import android.provider.Settings.SettingNotFoundException;
+ import java.io.PrintStream;
+ private boolean wake = false;
+ private int brightness_val = 0;
+ private boolean modifyFile(int string,String path) {
+ PrintStream stream=null;
+ try {
+ stream=new PrintStream(path);
+ stream.print(string);
+ android.util.Log.d(TAG,"Write brightness success!");
+ return true;
+ } catch (FileNotFoundException e) {
+ android.util.Log.d(TAG,"Write brightness faile!&#