From 2d2fc07f9472c6bd00822dcc53c5e167fa94cbdd Mon Sep 17 00:00:00 2001 From: Dhina17 Date: Mon, 11 Nov 2024 13:21:35 +0530 Subject: [PATCH] Settings: Hide the nav bar during udfps fp enrolling On some devices, udfps is kinda near to nav bar so the enroll circle ends up behind the nav bar and that looks not good. Change-Id: I5184f8e8c34693d145199c2081e543656d8d702c Signed-off-by: Pranav Vashi --- .../fingerprint/FingerprintEnrollEnrolling.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java index f6dafedf78e..0e6c8060541 100644 --- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java +++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java @@ -355,6 +355,20 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling { } } + @Override + protected void onResume() { + super.onResume(); + // Ignore if it's not udfps. + if (!mCanAssumeUdfps) { + return; + } + View decorView = getWindow().getDecorView(); + // Hide the navigation bar and make the layout stable. + // so that the content doesn't resize as the navigation bar hides and shows. + int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE; + decorView.setSystemUiVisibility(uiOptions); + } + private void setHelpAnimation() { final RelativeLayout progressLottieLayout = findViewById(R.id.progress_lottie); mHelpAnimation = mSfpsEnrollmentFeature.getHelpAnimator(progressLottieLayout);