Skip to content

Commit 07639fd

Browse files
TheScarasticGenkzsz11
authored andcommitted
Don't start fingerprint for FOD devices early
commit 5cece53 causes fingerprint to start early while going to sleep and this is not the expected behaviour for devices with FOD since we have to apply DIM and HBM simultaneously which causes device to give flicker effect while putting phone to sleep. Change-Id: I67b4cdbc92556b54c6e865f2332732a35f2eec57
1 parent 1e08081 commit 07639fd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
import com.android.systemui.util.DeviceConfigProxy;
101101
import com.android.systemui.util.InjectionInflationController;
102102

103+
import com.android.internal.util.custom.fod.FodUtils;
104+
103105
import java.io.FileDescriptor;
104106
import java.io.PrintWriter;
105107
import java.util.ArrayList;
@@ -380,6 +382,8 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
380382
private IKeyguardDrawnCallback mDrawnCallback;
381383
private CharSequence mCustomMessage;
382384

385+
private boolean mHasFod;
386+
383387
private final DeviceConfig.OnPropertiesChangedListener mOnPropertiesChangedListener =
384388
new DeviceConfig.OnPropertiesChangedListener() {
385389
@Override
@@ -748,6 +752,7 @@ public KeyguardViewMediator(
748752
QuickStepContract.isGesturalMode(navigationModeController.addListener(mode -> {
749753
mInGestureNavigationMode = QuickStepContract.isGesturalMode(mode);
750754
}));
755+
mHasFod = FodUtils.hasFodSupport(context);
751756
}
752757

753758
public void userActivity() {
@@ -878,7 +883,9 @@ public void onStartedGoingToSleep(int why) {
878883
// explicitly DO NOT want to call
879884
// mKeyguardViewControllerLazy.get().setKeyguardGoingAwayState(false)
880885
// here, since that will mess with the device lock state.
881-
mUpdateMonitor.dispatchKeyguardGoingAway(false);
886+
if (!mHasFod) {
887+
mUpdateMonitor.dispatchKeyguardGoingAway(false);
888+
}
882889

883890
// Lock immediately based on setting if secure (user has a pin/pattern/password).
884891
// This also "locks" the device when not secure to provide easy access to the

0 commit comments

Comments
 (0)