Home | History | Annotate | Download | only in contacts

Lines Matching defs:FAR

34      * This interface abstracts two possible states for the proximity sensor, near and far.
39 /** Called when the proximity sensor transitions from the far to the near state. */
41 /** Called when the proximity sensor transitions from the near to the far state. */
46 NEAR, FAR
66 * listener the next time the sensor reaches the {@link State#FAR} state if currently in the
80 * Before registering and after unregistering we are always in the {@link State#FAR} state.
84 * If this flag is set to true, we are waiting to reach the {@link State#FAR} state and
95 // Initialize at far state.
96 mLastState = State.FAR;
106 // Convert the sensor into a NEAR/FAR state.
113 // If we are waiting to reach the far state and we are now in it, unregister.
114 if (mWaitingForFarState && mLastState == State.FAR) {
124 case FAR:
137 // Determine if the current value corresponds to the NEAR or FAR state.
139 // equal to the maximum, we are always in the FAR state.
140 return (value > FAR_THRESHOLD || value == mMaxValue) ? State.FAR : State.NEAR;
144 * Unregister the next time the sensor reaches the {@link State#FAR} state.
147 if (mLastState == State.FAR) {
148 // We are already in the far state, just unregister now.
159 // We should no longer be waiting for the far state if we are registering again.
168 // Always go back to the FAR state. That way, when we register again we will get a
170 mLastState = State.FAR;
172 // Notify the listener if we changed the state to FAR while unregistering.
173 if (lastState != State.FAR) {
218 * If {@code waitForFarState} is true, if the sensor is not currently in the {@link State#FAR}
220 * actually reaches the {@link State#FAR} state.
223 * callback immediately if the sensor is currently not in the {@link State#FAR} state.