sanders: Uncomment proximity overlays

This commit is contained in:
jhenrique09
2017-10-31 16:18:26 -03:00
committed by therootlord
parent ce90f35b64
commit df31b1f81e

View File

@@ -141,13 +141,11 @@ public class KeyHandler implements DeviceKeyHandler {
mGestureWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
"GestureWakeLock");
/* final Resources resources = mContext.getResources();
final Resources resources = mContext.getResources();
mProximityTimeOut = resources.getInteger(
com.android.internal.R.integer.config_proximityCheckTimeout);
mProximityWakeSupported = resources.getBoolean(
com.android.internal.R.bool.config_proximityCheckOnWake);*/
mProximityTimeOut = 100;
mProximityWakeSupported = true;
com.android.internal.R.bool.config_proximityCheckOnWake);
if (mProximityWakeSupported) {
mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
@@ -687,12 +685,10 @@ public class KeyHandler implements DeviceKeyHandler {
if (!mFPScreenOffGesturesHandler.hasMessages(FP_ACTION_REQUEST)) {
Message msg = mFPScreenOffGesturesHandler.obtainMessage(FP_ACTION_REQUEST);
msg.arg1 = scanCode;
/* boolean defaultProximity = mContext.getResources().getBoolean(
boolean defaultProximity = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_proximityCheckOnWakeEnabledByDefault);
boolean proximityWakeCheckEnabled = Settings.System.getInt(mContext.getContentResolver(),
Settings.System.PROXIMITY_ON_WAKE, defaultProximity ? 1 : 0) == 1;*/
boolean defaultProximity = true;
boolean proximityWakeCheckEnabled = true;
Settings.System.PROXIMITY_ON_WAKE, defaultProximity ? 1 : 0) == 1;
if (mProximityWakeSupported && proximityWakeCheckEnabled && mProximitySensor != null) {
mFPScreenOffGesturesHandler.sendMessageDelayed(msg, mProximityTimeOut);
registerFPScreenOffListener(scanCode);