[SPA] Add biometric authentication for package modification

Add an extra step of Lock Screen for disabling, force-stopping or
uninstalling updates for protected packages

UI Change Details : https://drive.google.com/drive/folders/1w7gKTmCxQ_j-9GQnIpEfF5_gmQ27b8l_?resourcekey=0-brLdN8VfqVPGm2FMwfrmkQ&usp=drive_link
Bug: 352504490, 344865740
Test: atest AppButtonsPreferenceControllerTest PackageInfoPresenterTest
Flag: EXEMPT High Security Bug
Change-Id: I0c494e307b02229d751de118abcc89e4e61a6861
This commit is contained in:
Shraddha Basantwani
2024-12-02 09:36:05 +00:00
parent 4084b5603e
commit 32e388ad31
6 changed files with 218 additions and 47 deletions

View File

@@ -51,6 +51,7 @@ public class ShadowUtils {
private static boolean sIsBatteryPresent;
private static boolean sIsMultipleBiometricsSupported;
private static boolean sIsPrivateProfile;
private static boolean sIsProtectedPackage;
@Implementation
protected static int enforceSameOwner(Context context, int userId) {
@@ -84,6 +85,7 @@ public class ShadowUtils {
sIsBatteryPresent = true;
sIsMultipleBiometricsSupported = false;
sIsPrivateProfile = false;
sIsProtectedPackage = false;
}
public static void setIsDemoUser(boolean isDemoUser) {
@@ -199,4 +201,13 @@ public class ShadowUtils {
public static void setIsPrivateProfile(boolean isPrivateProfile) {
sIsPrivateProfile = isPrivateProfile;
}
@Implementation
protected static boolean isProtectedPackage(Context context, String packageName) {
return sIsProtectedPackage;
}
public static void setIsProtectedPackage(boolean isProtectedPackage) {
sIsProtectedPackage = isProtectedPackage;
}
}