Add a reverse landscape layout for UDFPS

Bug: 181614043
Test: visual verified
1) Settings -> Security -> Fingerprint
2) Follow the setup flow to find sensor page and enrolling page
3) Rotate your device and see if fingerprint icon is overlapping with
the title.

Change-Id: Ia1202e9688f2472c8063287164f4fc8f479cdae9
This commit is contained in:
Mill Chen
2021-03-14 05:28:00 +08:00
parent 74d2ec5c2d
commit 474093e8cc
5 changed files with 212 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ import android.content.Intent;
import android.content.IntentSender;
import android.os.storage.StorageManager;
import android.util.Log;
import android.view.Surface;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -241,4 +242,14 @@ public class BiometricUtils {
}
return false;
}
/**
* Returns {@code true} if the screen is going into a landscape mode and the angle is equal to
* 270.
* @param context Context that we use to get the display this context is associated with
* @return True if the angle of the rotation is equal to 270.
*/
public static boolean isReverseLandscape(@NonNull Context context) {
return context.getDisplay().getRotation() == Surface.ROTATION_270;
}
}