Merge "Fix overlap in udfps_enroll_enrolling" into udc-dev am: 25de3b2b9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22955471 Change-Id: I0a7131567f578e045d20bc92fa50b1e4fb3f85cd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -259,10 +259,10 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
|
||||
if (mCanAssumeUdfps) {
|
||||
int rotation = getApplicationContext().getDisplay().getRotation();
|
||||
switch (rotation) {
|
||||
case Surface.ROTATION_90:
|
||||
final GlifLayout layout = (GlifLayout) getLayoutInflater().inflate(
|
||||
R.layout.udfps_enroll_enrolling, null, false);
|
||||
switch (rotation) {
|
||||
case Surface.ROTATION_90:
|
||||
final LinearLayout layoutContainer = layout.findViewById(
|
||||
R.id.layout_container);
|
||||
final LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
|
||||
@@ -287,14 +287,9 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
|
||||
case Surface.ROTATION_0:
|
||||
case Surface.ROTATION_180:
|
||||
case Surface.ROTATION_270:
|
||||
default:
|
||||
final GlifLayout defaultLayout = (GlifLayout) getLayoutInflater().inflate(
|
||||
R.layout.udfps_enroll_enrolling, null, false);
|
||||
if (FeatureFlagUtils.isEnabled(getApplicationContext(),
|
||||
FeatureFlagUtils.SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS)) {
|
||||
final UdfpsEnrollView udfpsEnrollView = addUdfpsEnrollView(props.get(0));
|
||||
if (rotation == Surface.ROTATION_0 || rotation == Surface.ROTATION_180) {
|
||||
// In the portrait mode, set layout_container's height 0, so it's
|
||||
// always shown at the bottom of the screen.
|
||||
// Add udfps enroll view into layout_container instead of
|
||||
@@ -303,7 +298,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
// view could still be set to right position by setting bottom margin to
|
||||
// its parent view (layout_container) because it's always at the
|
||||
// bottom of the screen.
|
||||
final FrameLayout portraitLayoutContainer = defaultLayout.findViewById(
|
||||
final FrameLayout portraitLayoutContainer = layout.findViewById(
|
||||
R.id.layout_container);
|
||||
final ViewGroup.LayoutParams containerLp =
|
||||
portraitLayoutContainer.getLayoutParams();
|
||||
@@ -326,14 +321,22 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
0, layoutLottieAnimationPadding);
|
||||
|
||||
portraitLayoutContainer.addView(udfpsEnrollView);
|
||||
setOnHoverListener(false, defaultLayout, udfpsEnrollView);
|
||||
} else if (rotation == Surface.ROTATION_270) {
|
||||
defaultLayout.addView(udfpsEnrollView);
|
||||
setOnHoverListener(true, defaultLayout, udfpsEnrollView);
|
||||
}
|
||||
setOnHoverListener(false, layout, udfpsEnrollView);
|
||||
}
|
||||
|
||||
setContentView(defaultLayout);
|
||||
setContentView(layout);
|
||||
break;
|
||||
|
||||
case Surface.ROTATION_270:
|
||||
default:
|
||||
if (FeatureFlagUtils.isEnabled(getApplicationContext(),
|
||||
FeatureFlagUtils.SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS)) {
|
||||
final UdfpsEnrollView udfpsEnrollView = addUdfpsEnrollView(props.get(0));
|
||||
layout.addView(udfpsEnrollView);
|
||||
setOnHoverListener(true, layout, udfpsEnrollView);
|
||||
}
|
||||
|
||||
setContentView(layout);
|
||||
break;
|
||||
}
|
||||
setDescriptionText(R.string.security_settings_udfps_enroll_start_message);
|
||||
|
Reference in New Issue
Block a user