1.修改配置:
frameworks\base\services\core\java\com\android\server\power\PowerManagerService.java
mSupportsDoubleTapWakeConfig = resources.getBoolean(com.android.internal.R.bool.config_supportDoubleTapWake);
if (mSupportsDoubleTapWakeConfig) { boolean doubleTapWakeEnabled = Settings.Secure.getIntForUser(resolver, Settings.Secure.DOUBLE_TAP_TO_WAKE, DEFAULT_DOUBLE_TAP_TO_WAKE, UserHandle.USER_CURRENT) != 0; if (doubleTapWakeEnabled != mDoubleTapWakeEnabled) { mDoubleTapWakeEnabled = doubleTapWakeEnabled; nativeSetFeature(POWER_FEATURE_DOUBLE_TAP_TO_WAKE, mDoubleTapWakeEnabled ? 1 : 0); } }
frameworks\base\core\res\res\values\config.xml
<!-- Whether device supports double tap to wake --> <bool name="config_supportDoubleTapWake">true</bool>
// Power features defined in hardware/libhardware/include/hardware/power.h. private static final int POWER_FEATURE_DOUBLE_TAP_TO_WAKE = 1; // Default setting for double tap to wake. private static final int DEFAULT_DOUBLE_TAP_TO_WAKE = 0;
标签:TAP,点亮,DOUBLE,mDoubleTapWakeEnabled,WAKE,doubleTapWakeEnabled,Android,双击 From: https://www.cnblogs.com/wanglongjiang/p/17579266.html