Requirement: Set the switch to turn on or off screen touch
accomplish:
1.Open the file
./frameworks/base/core/java/android/view/ViewGroup.java
2. Find the public boolean dispatchTouchEvent(MotionEvent ev) method and add the following code at the beginning
if(SystemProperties.get("system.touchevent.disable").equals("1")){
Slog.e(TAG,"system disable touch event.");
return true;
}
3. Package and re-burn, or adb push out/xxxx/framework/ /system/ and restart
4. Pass
adb shell setprop system.touchevent.disable 1 //Enable screen touch
adb shell setprop system.touchevent.disable 0 //Turn off screen touch
To enable/disable the touch function of the screen