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 <neobuddy89@gmail.com>
This commit is contained in:
Dhina17
2024-11-11 13:21:35 +05:30
committed by Joey
parent 344fcbbe73
commit 2d2fc07f94

View File

@@ -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() { private void setHelpAnimation() {
final RelativeLayout progressLottieLayout = findViewById(R.id.progress_lottie); final RelativeLayout progressLottieLayout = findViewById(R.id.progress_lottie);
mHelpAnimation = mSfpsEnrollmentFeature.getHelpAnimator(progressLottieLayout); mHelpAnimation = mSfpsEnrollmentFeature.getHelpAnimator(progressLottieLayout);