Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49945475 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Updating active-unlock APIs"

parents 0d07a8fa ff7c7a4f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
+5 −9
Original line number Diff line number Diff line
@@ -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() {
    }