Loading core/api/test-current.txt +2 −20 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ package android { public static final class Manifest.permission { field public static final String ACCESS_KEYGUARD_SECURE_STORAGE = "android.permission.ACCESS_KEYGUARD_SECURE_STORAGE"; field public static final String ACCESS_NOTIFICATIONS = "android.permission.ACCESS_NOTIFICATIONS"; field public static final String ACTIVITY_EMBEDDING = "android.permission.ACTIVITY_EMBEDDING"; field public static final String APPROVE_INCIDENT_REPORTS = "android.permission.APPROVE_INCIDENT_REPORTS"; Loading Loading @@ -288,8 +287,8 @@ package android.app { } public class KeyguardManager { method @RequiresPermission(anyOf={android.Manifest.permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS, android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE}) public boolean checkLock(int, @Nullable byte[]); method @RequiresPermission(anyOf={android.Manifest.permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS, android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE}) public boolean setLock(int, @Nullable byte[], int, @Nullable byte[]); method @RequiresPermission(anyOf={android.Manifest.permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS, "android.permission.ACCESS_KEYGUARD_SECURE_STORAGE"}) public boolean checkLock(int, @Nullable byte[]); method @RequiresPermission(anyOf={android.Manifest.permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS, "android.permission.ACCESS_KEYGUARD_SECURE_STORAGE"}) public boolean setLock(int, @Nullable byte[], int, @Nullable byte[]); } public class LocaleManager { Loading Loading @@ -585,15 +584,6 @@ package android.app.prediction { } package android.app.trust { public class TrustManager { method @RequiresPermission(android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void enableTrustAgentForUserForTest(@NonNull android.content.ComponentName, int); method @RequiresPermission(android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void reportUserRequestedUnlock(int); } } package android.app.usage { public class NetworkStatsManager { Loading Loading @@ -2374,14 +2364,6 @@ package android.service.quicksettings { } package android.service.trust { public class TrustAgentService extends android.app.Service { method public void onUserRequestedUnlock(); } } package android.service.voice { public class AlwaysOnHotwordDetector implements android.service.voice.HotwordDetector { Loading core/java/android/app/trust/ITrustManager.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.app.trust; import android.app.trust.ITrustListener; import android.content.ComponentName; import android.hardware.biometrics.BiometricSourceType; /** Loading @@ -30,7 +29,6 @@ interface ITrustManager { void reportUserRequestedUnlock(int userId); void reportUnlockLockout(int timeoutMs, int userId); void reportEnabledTrustAgentsChanged(int userId); void enableTrustAgentForUserForTest(in ComponentName componentName, int userId); void registerTrustListener(in ITrustListener trustListener); void unregisterTrustListener(in ITrustListener trustListener); void reportKeyguardShowingChanged(); Loading core/java/android/app/trust/TrustManager.java +6 −67 Original line number Diff line number Diff line Loading @@ -16,14 +16,10 @@ package android.app.trust; import static android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE; import android.annotation.NonNull; import android.Manifest; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.annotation.TestApi; import android.compat.annotation.UnsupportedAppUsage; import android.content.ComponentName; import android.content.Context; import android.hardware.biometrics.BiometricSourceType; import android.os.Handler; Loading @@ -37,17 +33,9 @@ import java.util.ArrayList; import java.util.List; /** * Interface to the system service managing trust. * * <p>This class is for internal use only. This class is marked {@code @TestApi} to * enable testing the trust system including {@link android.service.trust.TrustAgentService}. * Methods which are currently not used in tests are marked @hide. * * @see com.android.server.trust.TrustManagerService * * See {@link com.android.server.trust.TrustManagerService} * @hide */ @TestApi @SystemService(Context.TRUST_SERVICE) public class TrustManager { Loading @@ -63,8 +51,7 @@ public class TrustManager { private final ITrustManager mService; private final ArrayMap<TrustListener, ITrustListener> mTrustListeners; /** @hide */ public TrustManager(@NonNull IBinder b) { public TrustManager(IBinder b) { mService = ITrustManager.Stub.asInterface(b); mTrustListeners = new ArrayMap<TrustListener, ITrustListener>(); } Loading @@ -75,10 +62,8 @@ public class TrustManager { * * @param userId The id for the user to be locked/unlocked. * @param locked The value for that user's locked state. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) @RequiresPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void setDeviceLockedForUser(int userId, boolean locked) { try { mService.setDeviceLockedForUser(userId, locked); Loading @@ -93,11 +78,8 @@ public class TrustManager { * @param successful if true, the unlock attempt was successful. * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. * * @hide */ @UnsupportedAppUsage @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportUnlockAttempt(boolean successful, int userId) { try { mService.reportUnlockAttempt(successful, userId); Loading @@ -111,7 +93,6 @@ public class TrustManager { * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportUserRequestedUnlock(int userId) { try { mService.reportUserRequestedUnlock(userId); Loading @@ -131,10 +112,7 @@ public class TrustManager { * attempt to unlock the device again. * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportUnlockLockout(int timeoutMs, int userId) { try { mService.reportUnlockLockout(timeoutMs, userId); Loading @@ -147,10 +125,7 @@ public class TrustManager { * Reports that the list of enabled trust agents changed for user {@param userId}. * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportEnabledTrustAgentsChanged(int userId) { try { mService.reportEnabledTrustAgentsChanged(userId); Loading @@ -159,34 +134,11 @@ public class TrustManager { } } /** * Enables a trust agent. * * <p>The agent is specified by {@code componentName} and must be a subclass of * {@link android.service.trust.TrustAgentService} and otherwise meet the requirements * to be a trust agent. * * <p>This method can only be used in tests. * * @param componentName the trust agent to enable */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void enableTrustAgentForUserForTest(@NonNull ComponentName componentName, int userId) { try { mService.enableTrustAgentForUserForTest(componentName, userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Reports that the visibility of the keyguard has changed. * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportKeyguardShowingChanged() { try { mService.reportKeyguardShowingChanged(); Loading @@ -199,10 +151,7 @@ public class TrustManager { * Registers a listener for trust events. * * Requires the {@link android.Manifest.permission#TRUST_LISTENER} permission. * * @hide */ @RequiresPermission(android.Manifest.permission.TRUST_LISTENER) public void registerTrustListener(final TrustListener trustListener) { try { ITrustListener.Stub iTrustListener = new ITrustListener.Stub() { Loading Loading @@ -243,10 +192,7 @@ public class TrustManager { * Unregisters a listener for trust events. * * Requires the {@link android.Manifest.permission#TRUST_LISTENER} permission. * * @hide */ @RequiresPermission(android.Manifest.permission.TRUST_LISTENER) public void unregisterTrustListener(final TrustListener trustListener) { ITrustListener iTrustListener = mTrustListeners.remove(trustListener); if (iTrustListener != null) { Loading @@ -261,8 +207,6 @@ public class TrustManager { /** * @return whether {@param userId} has enabled and configured trust agents. Ignores short-term * unavailability of trust due to {@link LockPatternUtils.StrongAuthTracker}. * * @hide */ @RequiresPermission(android.Manifest.permission.TRUST_LISTENER) public boolean isTrustUsuallyManaged(int userId) { Loading @@ -279,10 +223,8 @@ public class TrustManager { * can be skipped. * * @param userId * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) @RequiresPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void unlockedByBiometricForUser(int userId, BiometricSourceType source) { try { mService.unlockedByBiometricForUser(userId, source); Loading @@ -293,10 +235,8 @@ public class TrustManager { /** * Clears authentication by the specified biometric type for all users. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) @RequiresPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void clearAllBiometricRecognized(BiometricSourceType source, int unlockedUser) { try { mService.clearAllBiometricRecognized(source, unlockedUser); Loading Loading @@ -324,7 +264,6 @@ public class TrustManager { } }; /** @hide */ public interface TrustListener { /** Loading core/java/android/service/trust/TrustAgentService.java +1 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SdkConstant; import android.annotation.SystemApi; import android.annotation.TestApi; import android.app.Service; import android.app.admin.DevicePolicyManager; import android.content.ComponentName; Loading Loading @@ -311,10 +310,9 @@ public class TrustAgentService extends Service { * * @see #FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE * * TODO(b/213631672): Remove @hide and @TestApi * TODO(b/213631672): Add CTS tests * @hide */ @TestApi public void onUserRequestedUnlock() { } Loading core/res/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5378,7 +5378,7 @@ android:protectionLevel="signature|setup|role" /> <!-- Allows access to keyguard secure storage. Only allowed for system processes. @hide @TestApi --> @hide --> <permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" android:protectionLevel="signature|setup" /> Loading Loading
core/api/test-current.txt +2 −20 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ package android { public static final class Manifest.permission { field public static final String ACCESS_KEYGUARD_SECURE_STORAGE = "android.permission.ACCESS_KEYGUARD_SECURE_STORAGE"; field public static final String ACCESS_NOTIFICATIONS = "android.permission.ACCESS_NOTIFICATIONS"; field public static final String ACTIVITY_EMBEDDING = "android.permission.ACTIVITY_EMBEDDING"; field public static final String APPROVE_INCIDENT_REPORTS = "android.permission.APPROVE_INCIDENT_REPORTS"; Loading Loading @@ -288,8 +287,8 @@ package android.app { } public class KeyguardManager { method @RequiresPermission(anyOf={android.Manifest.permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS, android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE}) public boolean checkLock(int, @Nullable byte[]); method @RequiresPermission(anyOf={android.Manifest.permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS, android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE}) public boolean setLock(int, @Nullable byte[], int, @Nullable byte[]); method @RequiresPermission(anyOf={android.Manifest.permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS, "android.permission.ACCESS_KEYGUARD_SECURE_STORAGE"}) public boolean checkLock(int, @Nullable byte[]); method @RequiresPermission(anyOf={android.Manifest.permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS, "android.permission.ACCESS_KEYGUARD_SECURE_STORAGE"}) public boolean setLock(int, @Nullable byte[], int, @Nullable byte[]); } public class LocaleManager { Loading Loading @@ -585,15 +584,6 @@ package android.app.prediction { } package android.app.trust { public class TrustManager { method @RequiresPermission(android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void enableTrustAgentForUserForTest(@NonNull android.content.ComponentName, int); method @RequiresPermission(android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void reportUserRequestedUnlock(int); } } package android.app.usage { public class NetworkStatsManager { Loading Loading @@ -2374,14 +2364,6 @@ package android.service.quicksettings { } package android.service.trust { public class TrustAgentService extends android.app.Service { method public void onUserRequestedUnlock(); } } package android.service.voice { public class AlwaysOnHotwordDetector implements android.service.voice.HotwordDetector { Loading
core/java/android/app/trust/ITrustManager.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.app.trust; import android.app.trust.ITrustListener; import android.content.ComponentName; import android.hardware.biometrics.BiometricSourceType; /** Loading @@ -30,7 +29,6 @@ interface ITrustManager { void reportUserRequestedUnlock(int userId); void reportUnlockLockout(int timeoutMs, int userId); void reportEnabledTrustAgentsChanged(int userId); void enableTrustAgentForUserForTest(in ComponentName componentName, int userId); void registerTrustListener(in ITrustListener trustListener); void unregisterTrustListener(in ITrustListener trustListener); void reportKeyguardShowingChanged(); Loading
core/java/android/app/trust/TrustManager.java +6 −67 Original line number Diff line number Diff line Loading @@ -16,14 +16,10 @@ package android.app.trust; import static android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE; import android.annotation.NonNull; import android.Manifest; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.annotation.TestApi; import android.compat.annotation.UnsupportedAppUsage; import android.content.ComponentName; import android.content.Context; import android.hardware.biometrics.BiometricSourceType; import android.os.Handler; Loading @@ -37,17 +33,9 @@ import java.util.ArrayList; import java.util.List; /** * Interface to the system service managing trust. * * <p>This class is for internal use only. This class is marked {@code @TestApi} to * enable testing the trust system including {@link android.service.trust.TrustAgentService}. * Methods which are currently not used in tests are marked @hide. * * @see com.android.server.trust.TrustManagerService * * See {@link com.android.server.trust.TrustManagerService} * @hide */ @TestApi @SystemService(Context.TRUST_SERVICE) public class TrustManager { Loading @@ -63,8 +51,7 @@ public class TrustManager { private final ITrustManager mService; private final ArrayMap<TrustListener, ITrustListener> mTrustListeners; /** @hide */ public TrustManager(@NonNull IBinder b) { public TrustManager(IBinder b) { mService = ITrustManager.Stub.asInterface(b); mTrustListeners = new ArrayMap<TrustListener, ITrustListener>(); } Loading @@ -75,10 +62,8 @@ public class TrustManager { * * @param userId The id for the user to be locked/unlocked. * @param locked The value for that user's locked state. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) @RequiresPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void setDeviceLockedForUser(int userId, boolean locked) { try { mService.setDeviceLockedForUser(userId, locked); Loading @@ -93,11 +78,8 @@ public class TrustManager { * @param successful if true, the unlock attempt was successful. * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. * * @hide */ @UnsupportedAppUsage @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportUnlockAttempt(boolean successful, int userId) { try { mService.reportUnlockAttempt(successful, userId); Loading @@ -111,7 +93,6 @@ public class TrustManager { * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportUserRequestedUnlock(int userId) { try { mService.reportUserRequestedUnlock(userId); Loading @@ -131,10 +112,7 @@ public class TrustManager { * attempt to unlock the device again. * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportUnlockLockout(int timeoutMs, int userId) { try { mService.reportUnlockLockout(timeoutMs, userId); Loading @@ -147,10 +125,7 @@ public class TrustManager { * Reports that the list of enabled trust agents changed for user {@param userId}. * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportEnabledTrustAgentsChanged(int userId) { try { mService.reportEnabledTrustAgentsChanged(userId); Loading @@ -159,34 +134,11 @@ public class TrustManager { } } /** * Enables a trust agent. * * <p>The agent is specified by {@code componentName} and must be a subclass of * {@link android.service.trust.TrustAgentService} and otherwise meet the requirements * to be a trust agent. * * <p>This method can only be used in tests. * * @param componentName the trust agent to enable */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void enableTrustAgentForUserForTest(@NonNull ComponentName componentName, int userId) { try { mService.enableTrustAgentForUserForTest(componentName, userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Reports that the visibility of the keyguard has changed. * * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) public void reportKeyguardShowingChanged() { try { mService.reportKeyguardShowingChanged(); Loading @@ -199,10 +151,7 @@ public class TrustManager { * Registers a listener for trust events. * * Requires the {@link android.Manifest.permission#TRUST_LISTENER} permission. * * @hide */ @RequiresPermission(android.Manifest.permission.TRUST_LISTENER) public void registerTrustListener(final TrustListener trustListener) { try { ITrustListener.Stub iTrustListener = new ITrustListener.Stub() { Loading Loading @@ -243,10 +192,7 @@ public class TrustManager { * Unregisters a listener for trust events. * * Requires the {@link android.Manifest.permission#TRUST_LISTENER} permission. * * @hide */ @RequiresPermission(android.Manifest.permission.TRUST_LISTENER) public void unregisterTrustListener(final TrustListener trustListener) { ITrustListener iTrustListener = mTrustListeners.remove(trustListener); if (iTrustListener != null) { Loading @@ -261,8 +207,6 @@ public class TrustManager { /** * @return whether {@param userId} has enabled and configured trust agents. Ignores short-term * unavailability of trust due to {@link LockPatternUtils.StrongAuthTracker}. * * @hide */ @RequiresPermission(android.Manifest.permission.TRUST_LISTENER) public boolean isTrustUsuallyManaged(int userId) { Loading @@ -279,10 +223,8 @@ public class TrustManager { * can be skipped. * * @param userId * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) @RequiresPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void unlockedByBiometricForUser(int userId, BiometricSourceType source) { try { mService.unlockedByBiometricForUser(userId, source); Loading @@ -293,10 +235,8 @@ public class TrustManager { /** * Clears authentication by the specified biometric type for all users. * * @hide */ @RequiresPermission(ACCESS_KEYGUARD_SECURE_STORAGE) @RequiresPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void clearAllBiometricRecognized(BiometricSourceType source, int unlockedUser) { try { mService.clearAllBiometricRecognized(source, unlockedUser); Loading Loading @@ -324,7 +264,6 @@ public class TrustManager { } }; /** @hide */ public interface TrustListener { /** Loading
core/java/android/service/trust/TrustAgentService.java +1 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SdkConstant; import android.annotation.SystemApi; import android.annotation.TestApi; import android.app.Service; import android.app.admin.DevicePolicyManager; import android.content.ComponentName; Loading Loading @@ -311,10 +310,9 @@ public class TrustAgentService extends Service { * * @see #FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE * * TODO(b/213631672): Remove @hide and @TestApi * TODO(b/213631672): Add CTS tests * @hide */ @TestApi public void onUserRequestedUnlock() { } Loading
core/res/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5378,7 +5378,7 @@ android:protectionLevel="signature|setup|role" /> <!-- Allows access to keyguard secure storage. Only allowed for system processes. @hide @TestApi --> @hide --> <permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" android:protectionLevel="signature|setup" /> Loading