Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2895,6 +2895,9 @@ mirror the content of the default display. --> <bool name="config_localDisplaysMirrorContent">true</bool> <!-- When true, udfps vote is ignored. This feature is disabled by default. --> <bool name="config_ignoreUdfpsVote">false</bool> <!-- Controls if local secondary displays should be private or not. Value specified in the array represents physical port address of each display and display in this list will be marked as private. {@see android.view.Display#FLAG_PRIVATE} --> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -414,6 +414,7 @@ <java-symbol type="bool" name="config_guestUserAutoCreated" /> <java-symbol type="bool" name="config_guestUserAllowEphemeralStateChange" /> <java-symbol type="bool" name="config_localDisplaysMirrorContent" /> <java-symbol type="bool" name="config_ignoreUdfpsVote" /> <java-symbol type="array" name="config_localPrivateDisplayPorts" /> <java-symbol type="integer" name="config_defaultDisplayDefaultColorMode" /> <java-symbol type="bool" name="config_enableAppWidgetService" /> Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +21 −11 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ import android.view.accessibility.AccessibilityManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.logging.InstanceId; import com.android.internal.util.LatencyTracker; Loading Loading @@ -171,6 +172,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull private final SecureSettings mSecureSettings; @NonNull private final UdfpsUtils mUdfpsUtils; @NonNull private final InputManager mInputManager; private final boolean mIgnoreRefreshRate; // Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple // sensors, this, in addition to a lot of the code here, will be updated. Loading Loading @@ -816,6 +818,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { mExecution = execution; mVibrator = vibrator; mInflater = inflater; mIgnoreRefreshRate = mContext.getResources() .getBoolean(R.bool.config_ignoreUdfpsVote); // The fingerprint manager is queried for UDFPS before this class is constructed, so the // fingerprint manager should never be null. mFingerprintManager = checkNotNull(fingerprintManager); Loading Loading @@ -1069,6 +1073,18 @@ public class UdfpsController implements DozeReceiver, Dumpable { return mOnFingerDown; } private void dispatchOnUiReady(long requestId) { if (mAlternateTouchProvider != null) { mBiometricExecutor.execute(() -> { mAlternateTouchProvider.onUiReady(); mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE); }); } else { mFingerprintManager.onUiReady(requestId, mSensorProps.sensorId); mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE); } } private void onFingerDown( long requestId, int x, Loading Loading @@ -1146,17 +1162,11 @@ public class UdfpsController implements DozeReceiver, Dumpable { Trace.endAsyncSection("UdfpsController.e2e.onPointerDown", 0); final UdfpsView view = mOverlay.getOverlayView(); if (view != null && isOptical()) { view.configureDisplay(() -> { if (mAlternateTouchProvider != null) { mBiometricExecutor.execute(() -> { mAlternateTouchProvider.onUiReady(); mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE); }); if (mIgnoreRefreshRate) { dispatchOnUiReady(requestId); } else { mFingerprintManager.onUiReady(requestId, mSensorProps.sensorId); mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE); view.configureDisplay(() -> dispatchOnUiReady(requestId)); } }); } for (Callback cb : mCallbacks) { Loading services/core/java/com/android/server/display/mode/DisplayModeDirector.java +9 −1 Original line number Diff line number Diff line Loading @@ -2643,7 +2643,15 @@ public class DisplayModeDirector { public void observe() { StatusBarManagerInternal statusBar = LocalServices.getService(StatusBarManagerInternal.class); if (statusBar != null) { if (statusBar == null) { return; } // Allow UDFPS vote by registering callback, only // if the device is configured to not ignore UDFPS vote. boolean ignoreUdfpsVote = mContext.getResources() .getBoolean(R.bool.config_ignoreUdfpsVote); if (!ignoreUdfpsVote) { statusBar.setUdfpsRefreshRateCallback(this); } } Loading Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2895,6 +2895,9 @@ mirror the content of the default display. --> <bool name="config_localDisplaysMirrorContent">true</bool> <!-- When true, udfps vote is ignored. This feature is disabled by default. --> <bool name="config_ignoreUdfpsVote">false</bool> <!-- Controls if local secondary displays should be private or not. Value specified in the array represents physical port address of each display and display in this list will be marked as private. {@see android.view.Display#FLAG_PRIVATE} --> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -414,6 +414,7 @@ <java-symbol type="bool" name="config_guestUserAutoCreated" /> <java-symbol type="bool" name="config_guestUserAllowEphemeralStateChange" /> <java-symbol type="bool" name="config_localDisplaysMirrorContent" /> <java-symbol type="bool" name="config_ignoreUdfpsVote" /> <java-symbol type="array" name="config_localPrivateDisplayPorts" /> <java-symbol type="integer" name="config_defaultDisplayDefaultColorMode" /> <java-symbol type="bool" name="config_enableAppWidgetService" /> Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +21 −11 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ import android.view.accessibility.AccessibilityManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.logging.InstanceId; import com.android.internal.util.LatencyTracker; Loading Loading @@ -171,6 +172,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull private final SecureSettings mSecureSettings; @NonNull private final UdfpsUtils mUdfpsUtils; @NonNull private final InputManager mInputManager; private final boolean mIgnoreRefreshRate; // Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple // sensors, this, in addition to a lot of the code here, will be updated. Loading Loading @@ -816,6 +818,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { mExecution = execution; mVibrator = vibrator; mInflater = inflater; mIgnoreRefreshRate = mContext.getResources() .getBoolean(R.bool.config_ignoreUdfpsVote); // The fingerprint manager is queried for UDFPS before this class is constructed, so the // fingerprint manager should never be null. mFingerprintManager = checkNotNull(fingerprintManager); Loading Loading @@ -1069,6 +1073,18 @@ public class UdfpsController implements DozeReceiver, Dumpable { return mOnFingerDown; } private void dispatchOnUiReady(long requestId) { if (mAlternateTouchProvider != null) { mBiometricExecutor.execute(() -> { mAlternateTouchProvider.onUiReady(); mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE); }); } else { mFingerprintManager.onUiReady(requestId, mSensorProps.sensorId); mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE); } } private void onFingerDown( long requestId, int x, Loading Loading @@ -1146,17 +1162,11 @@ public class UdfpsController implements DozeReceiver, Dumpable { Trace.endAsyncSection("UdfpsController.e2e.onPointerDown", 0); final UdfpsView view = mOverlay.getOverlayView(); if (view != null && isOptical()) { view.configureDisplay(() -> { if (mAlternateTouchProvider != null) { mBiometricExecutor.execute(() -> { mAlternateTouchProvider.onUiReady(); mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE); }); if (mIgnoreRefreshRate) { dispatchOnUiReady(requestId); } else { mFingerprintManager.onUiReady(requestId, mSensorProps.sensorId); mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE); view.configureDisplay(() -> dispatchOnUiReady(requestId)); } }); } for (Callback cb : mCallbacks) { Loading
services/core/java/com/android/server/display/mode/DisplayModeDirector.java +9 −1 Original line number Diff line number Diff line Loading @@ -2643,7 +2643,15 @@ public class DisplayModeDirector { public void observe() { StatusBarManagerInternal statusBar = LocalServices.getService(StatusBarManagerInternal.class); if (statusBar != null) { if (statusBar == null) { return; } // Allow UDFPS vote by registering callback, only // if the device is configured to not ignore UDFPS vote. boolean ignoreUdfpsVote = mContext.getResources() .getBoolean(R.bool.config_ignoreUdfpsVote); if (!ignoreUdfpsVote) { statusBar.setUdfpsRefreshRateCallback(this); } } Loading