在Android TV连接鼠标后,发现滑动鼠标无法使设备待机(进入休眠状态)
我们需要将WAKE_REASON_WAKE_MOTION屏蔽
文件:frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
修改方式:
WindowManagerPolicy {
if (!wakeInTheaterMode && theaterModeEnabled) {
return false;
}
-
if(reason == PowerManager.WAKE_REASON_WAKE_MOTION){
-
return false;
-
}
if (theaterModeEnabled) {
Settings.Global.putInt(mContext.getContentResolver(),