List of usage examples for android.os PowerManager RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY
int RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY
To view the source code for android.os PowerManager RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY.
Click Source Link
From source file:com.android.dialer.voicemail.VoicemailPlaybackPresenter.java
private void disableProximitySensor(boolean waitForFarState) { if (mProximityWakeLock == null) { return;/*w w w . j av a2 s. c om*/ } if (mProximityWakeLock.isHeld()) { Log.i(TAG, "Releasing proximity wake lock"); int flags = waitForFarState ? PowerManager.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY : 0; mProximityWakeLock.release(flags); } else { Log.i(TAG, "Proximity wake lock already released"); } }