Loading packages/SystemUI/src/com/android/systemui/util/sensors/ProximityCheck.java +3 −2 Original line number Diff line number Diff line Loading @@ -86,11 +86,12 @@ public class ProximityCheck implements Runnable { } private void onProximityEvent(ThresholdSensorEvent proximityEvent) { mCallbacks.forEach( List<Consumer<Boolean>> oldCallbacks = mCallbacks; mCallbacks = new ArrayList<>(); oldCallbacks.forEach( booleanConsumer -> booleanConsumer.accept( proximityEvent == null ? null : proximityEvent.getBelow())); mCallbacks.clear(); unregister(); mRegistered.set(false); } Loading Loading
packages/SystemUI/src/com/android/systemui/util/sensors/ProximityCheck.java +3 −2 Original line number Diff line number Diff line Loading @@ -86,11 +86,12 @@ public class ProximityCheck implements Runnable { } private void onProximityEvent(ThresholdSensorEvent proximityEvent) { mCallbacks.forEach( List<Consumer<Boolean>> oldCallbacks = mCallbacks; mCallbacks = new ArrayList<>(); oldCallbacks.forEach( booleanConsumer -> booleanConsumer.accept( proximityEvent == null ? null : proximityEvent.getBelow())); mCallbacks.clear(); unregister(); mRegistered.set(false); } Loading