Merge "Updating active-unlock APIs"

This commit is contained in:
TreeHugger Robot
2022-02-02 09:24:59 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 9 deletions

View File

@@ -11627,6 +11627,7 @@ package android.service.trust {
method @Deprecated public final void grantTrust(CharSequence, long, boolean);
method public final void grantTrust(CharSequence, long, int);
method public final void isEscrowTokenActive(long, android.os.UserHandle);
method public final void lockUser();
method public final android.os.IBinder onBind(android.content.Intent);
method public boolean onConfigure(java.util.List<android.os.PersistableBundle>);
method public void onDeviceLocked();
@@ -11637,13 +11638,16 @@ package android.service.trust {
method public void onEscrowTokenStateReceived(long, int);
method public void onTrustTimeout();
method public void onUnlockAttempt(boolean);
method public void onUserRequestedUnlock();
method public final void removeEscrowToken(long, android.os.UserHandle);
method public final void revokeTrust();
method public final void setManagingTrust(boolean);
method public final void showKeyguardErrorMessage(@NonNull CharSequence);
method public final void unlockUserWithToken(long, byte[], android.os.UserHandle);
field public static final int FLAG_GRANT_TRUST_DISMISS_KEYGUARD = 2; // 0x2
field public static final int FLAG_GRANT_TRUST_DISPLAY_MESSAGE = 8; // 0x8
field public static final int FLAG_GRANT_TRUST_INITIATED_BY_USER = 1; // 0x1
field public static final int FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE = 4; // 0x4
field public static final String SERVICE_INTERFACE = "android.service.trust.TrustAgentService";
field public static final int TOKEN_STATE_ACTIVE = 1; // 0x1
field public static final int TOKEN_STATE_INACTIVE = 0; // 0x0

View File

@@ -119,9 +119,11 @@ public class TrustAgentService extends Service {
* automatically remove trust after some conditions are met (detailed below) with the option for
* the agent to renew the trust again later.
*
* <p>After this is called, the agent will grant trust until the platform thinks an active user
* is no longer using that trust. For example, if the user dismisses keyguard, the platform will
* remove trust (this does not automatically lock the device).
* <p>After this is called, the agent will grant trust until the platform thinks an active
* user is no longer using that trust. This can happen for any reason as determined by the
* platform. For example, if the user dismisses keyguard, the platform will remove trust;
* since this does not automatically lock the device, this results in the device locking the
* next time the screen turns off.
*
* <p>When the platform internally removes the agent's trust in this manner, an agent can
* re-grant it (via a call to grantTrust) without the user having to unlock the device through
@@ -136,9 +138,6 @@ public class TrustAgentService extends Service {
* Without this flag, the message passed to {@code grantTrust} is only used for debugging
* purposes. With the flag, it may be displayed to the user as the reason why the device is
* unlocked.
*
* TODO(b/213911325): Remove @hide
* @hide
*/
public static final int FLAG_GRANT_TRUST_DISPLAY_MESSAGE = 1 << 3;
@@ -306,9 +305,6 @@ public class TrustAgentService extends Service {
* {@link #grantTrust(CharSequence, long, int)}.
*
* @see #FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE
*
* TODO(b/213631672): Add CTS tests
* @hide
*/
public void onUserRequestedUnlock() {
}