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

Commit eaa99472 authored by Songchun Fan's avatar Songchun Fan Committed by Android Build Coastguard Worker
Browse files

Revert "[ADI][17/N] aggressively auto-disconnect from the verifier service"

FLAG: EXEMPT just revert
BUG: 422535876
Test: n/a just revert

This reverts commit 5a291f84.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:97cf17f5637864a9b41675b11d77ff69b63a88fd)
Merged-In: I825782ad35b4fea01fb8bd2a162068bb8de266c1
Change-Id: I825782ad35b4fea01fb8bd2a162068bb8de266c1
parent e5f93c51
Loading
Loading
Loading
Loading
+1 −21
Original line number Original line Diff line number Diff line
@@ -19,8 +19,6 @@ package com.android.server.pm.verify.pkg;
import android.annotation.CurrentTimeMillisLong;
import android.annotation.CurrentTimeMillisLong;
import android.annotation.DurationMillisLong;
import android.annotation.DurationMillisLong;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;


import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;


@@ -33,7 +31,6 @@ public final class VerificationStatusTracker {
    private final @CurrentTimeMillisLong long mMaxTimeoutTime;
    private final @CurrentTimeMillisLong long mMaxTimeoutTime;
    @NonNull
    @NonNull
    private final VerifierController.Injector mInjector;
    private final VerifierController.Injector mInjector;
    private final @UserIdInt int mUserId;


    /**
    /**
     * By default, the timeout time is the default timeout duration plus the current time (when
     * By default, the timeout time is the default timeout duration plus the current time (when
@@ -44,12 +41,11 @@ public final class VerificationStatusTracker {
    @VisibleForTesting(visibility = VisibleForTesting.Visibility.PROTECTED)
    @VisibleForTesting(visibility = VisibleForTesting.Visibility.PROTECTED)
    public VerificationStatusTracker(@DurationMillisLong long defaultTimeoutMillis,
    public VerificationStatusTracker(@DurationMillisLong long defaultTimeoutMillis,
            @DurationMillisLong long maxExtendedTimeoutMillis,
            @DurationMillisLong long maxExtendedTimeoutMillis,
            @NonNull VerifierController.Injector injector, @UserIdInt int userId) {
            @NonNull VerifierController.Injector injector) {
        mStartTime = injector.getCurrentTimeMillis();
        mStartTime = injector.getCurrentTimeMillis();
        mTimeoutTime = mStartTime + defaultTimeoutMillis;
        mTimeoutTime = mStartTime + defaultTimeoutMillis;
        mMaxTimeoutTime = mStartTime + maxExtendedTimeoutMillis;
        mMaxTimeoutTime = mStartTime + maxExtendedTimeoutMillis;
        mInjector = injector;
        mInjector = injector;
        mUserId = userId;
    }
    }


    /**
    /**
@@ -94,20 +90,4 @@ public final class VerificationStatusTracker {
    public boolean isTimeout() {
    public boolean isTimeout() {
        return mInjector.getCurrentTimeMillis() >= mTimeoutTime;
        return mInjector.getCurrentTimeMillis() >= mTimeoutTime;
    }
    }

    public @UserIdInt int getUserId() {
        return mUserId;
    }

    @Override
    public boolean equals(@Nullable Object o) {
        if (o instanceof VerificationStatusTracker that) {
            return this.mStartTime == that.mStartTime
                    && this.mTimeoutTime == that.mTimeoutTime
                    && this.mMaxTimeoutTime == that.mMaxTimeoutTime
                    && this.mInjector == that.mInjector
                    && this.mUserId == that.mUserId;
        }
        return false;
    }
}
}
+38 −113
Original line number Original line Diff line number Diff line
@@ -44,7 +44,6 @@ import android.os.UserHandle;
import android.provider.DeviceConfig;
import android.provider.DeviceConfig;
import android.util.Slog;
import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseArray;
import android.util.SparseIntArray;


import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;
@@ -104,21 +103,19 @@ public class VerifierController {
    private static final long DEFAULT_VERIFIER_CONNECTION_TIMEOUT_MILLIS =
    private static final long DEFAULT_VERIFIER_CONNECTION_TIMEOUT_MILLIS =
            TimeUnit.SECONDS.toMillis(10);
            TimeUnit.SECONDS.toMillis(10);


    /**
    // The maximum amount of time to wait before the system unbinds from the verifier.
     * After the connection to the verifier is established, if the tracker is empty or becomes empty
    private static final long UNBIND_TIMEOUT_MILLIS = TimeUnit.HOURS.toMillis(6);
     * after all the pending verification requests are resolved, automatically disconnect from the
     * verifier after this amount of time.
     */
    private static final long DISCONNECT_TIMEOUT_MILLIS = TimeUnit.MINUTES.toMillis(10);


    private static VerifierController sInstance;
    private static VerifierController sInstance;


    private final Context mContext;
    private final Context mContext;
    private final Handler mHandler;
    private final Handler mHandler;

    // Guards the remote service object, as well as the verifier name and UID, which should all be
    // changed at the same time.
    private final Object mLock = new Object();
    // Map of userId -> remote verifier service for the user.
    // Map of userId -> remote verifier service for the user.
    @NonNull
    @NonNull
    @GuardedBy("mRemoteServices")
    @GuardedBy("mLock")
    private final SparseArray<ServiceConnectorWrapper> mRemoteServices = new SparseArray<>();
    private final SparseArray<ServiceConnectorWrapper> mRemoteServices = new SparseArray<>();


    @NonNull
    @NonNull
@@ -129,15 +126,10 @@ public class VerifierController {
    @Nullable
    @Nullable
    private final String mDefaultVerifierPackageName;
    private final String mDefaultVerifierPackageName;


    // Repository of active verification sessions and their status (map of id -> tracker).
    // Repository of active verification sessions and their status, mapping from id to status.
    @NonNull
    @NonNull
    @GuardedBy("mVerificationStatusTrackers")
    @GuardedBy("mVerificationStatus")
    private final SparseArray<VerificationStatusTracker> mVerificationStatusTrackers =
    private final SparseArray<VerificationStatusTracker> mVerificationStatus = new SparseArray<>();
            new SparseArray<>();

    @GuardedBy("mVerificationStatusTrackers")
    // Counter of active verification sessions per user; must be synced with the trackers map.
    private final SparseIntArray mSessionsCountPerUser = new SparseIntArray();


    /**
    /**
     * Get an instance of VerifierController.
     * Get an instance of VerifierController.
@@ -197,7 +189,7 @@ public class VerifierController {
            Slog.i(TAG, "Requesting to bind to the verifier service for user " + userId);
            Slog.i(TAG, "Requesting to bind to the verifier service for user " + userId);
        }
        }
        final String verifierPackageName = getVerifierPackageName();
        final String verifierPackageName = getVerifierPackageName();
        synchronized (mRemoteServices) {
        synchronized (mLock) {
            var remoteService = mRemoteServices.get(userId);
            var remoteService = mRemoteServices.get(userId);
            if (remoteService != null) {
            if (remoteService != null) {
                // The system has already bound to a verifier. Check if it's still valid.
                // The system has already bound to a verifier. Check if it's still valid.
@@ -229,17 +221,12 @@ public class VerifierController {
        }
        }
        final var remoteService = mInjector.getRemoteService(
        final var remoteService = mInjector.getRemoteService(
                verifierPackageName, mContext, userId, mHandler);
                verifierPackageName, mContext, userId, mHandler);
        final var remoteServiceWrapper = new ServiceConnectorWrapper(
                remoteService, verifierUid, verifierPackageName);
        remoteService.setServiceLifecycleCallbacks(
        remoteService.setServiceLifecycleCallbacks(
                new ServiceConnector.ServiceLifecycleCallbacks<>() {
                new ServiceConnector.ServiceLifecycleCallbacks<>() {
                    @Override
                    @Override
                    public void onConnected(@NonNull IVerifierService service) {
                    public void onConnected(@NonNull IVerifierService service) {
                        Slog.i(TAG, "Verifier " + verifierPackageName + " is connected"
                        Slog.i(TAG, "Verifier " + verifierPackageName + " is connected"
                                + " on user " + userId);
                                + " on user " + userId);
                        // Aggressively auto-disconnect until verification requests are sent out
                        startAutoDisconnectCountdown(
                                remoteServiceWrapper.getAutoDisconnectCallback());
                    }
                    }


                    @Override
                    @Override
@@ -248,9 +235,6 @@ public class VerifierController {
                                "Verifier " + verifierPackageName + " is disconnected"
                                "Verifier " + verifierPackageName + " is disconnected"
                                        + " on user " + userId);
                                        + " on user " + userId);
                        destroy(userId);
                        destroy(userId);
                        // Cancel auto-disconnect because the verifier is already disconnected
                        stopAutoDisconnectCountdown(
                                remoteServiceWrapper.getAutoDisconnectCallback());
                    }
                    }


                    @Override
                    @Override
@@ -258,13 +242,11 @@ public class VerifierController {
                        Slog.w(TAG, "Verifier " + verifierPackageName + " has died"
                        Slog.w(TAG, "Verifier " + verifierPackageName + " has died"
                                + " on user " + userId);
                                + " on user " + userId);
                        destroy(userId);
                        destroy(userId);
                        // Cancel auto-disconnect because the binder has already died
                        stopAutoDisconnectCountdown(
                                remoteServiceWrapper.getAutoDisconnectCallback());
                    }
                    }
                });
                });
        synchronized (mRemoteServices) {
        synchronized (mLock) {
            mRemoteServices.put(userId, remoteServiceWrapper);
            mRemoteServices.put(userId, new ServiceConnectorWrapper(
                    remoteService, verifierUid, verifierPackageName));
        }
        }
        if (DEBUG) {
        if (DEBUG) {
            Slog.i(TAG, "Connecting to a qualified verifier: " + verifierPackageName
            Slog.i(TAG, "Connecting to a qualified verifier: " + verifierPackageName
@@ -275,7 +257,7 @@ public class VerifierController {
    }
    }


    private void destroy(int userId) {
    private void destroy(int userId) {
        synchronized (mRemoteServices) {
        synchronized (mLock) {
            if (mRemoteServices.contains(userId)) {
            if (mRemoteServices.contains(userId)) {
                var remoteService = mRemoteServices.get(userId);
                var remoteService = mRemoteServices.get(userId);
                if (remoteService != null) {
                if (remoteService != null) {
@@ -286,22 +268,12 @@ public class VerifierController {
        }
        }
    }
    }


    private void startAutoDisconnectCountdown(Runnable autoDisconnectCallback) {
        // If there is already a task to disconnect, remove it and restart the countdown
        stopAutoDisconnectCountdown(autoDisconnectCallback);
        mHandler.postDelayed(autoDisconnectCallback, DISCONNECT_TIMEOUT_MILLIS);
    }

    private void stopAutoDisconnectCountdown(Runnable autoDisconnectCallback) {
        mInjector.removeCallbacks(mHandler, autoDisconnectCallback);
    }

    /**
    /**
     * Called to notify the bound verifier agent that a package name is available and will soon be
     * Called to notify the bound verifier agent that a package name is available and will soon be
     * requested for verification.
     * requested for verification.
     */
     */
    public void notifyPackageNameAvailable(@NonNull String packageName, int userId) {
    public void notifyPackageNameAvailable(@NonNull String packageName, int userId) {
        synchronized (mRemoteServices) {
        synchronized (mLock) {
            var remoteService = mRemoteServices.get(userId);
            var remoteService = mRemoteServices.get(userId);
            if (remoteService == null) {
            if (remoteService == null) {
                if (DEBUG) {
                if (DEBUG) {
@@ -325,7 +297,7 @@ public class VerifierController {
     * will no longer be requested for verification, possibly because the installation is canceled.
     * will no longer be requested for verification, possibly because the installation is canceled.
     */
     */
    public void notifyVerificationCancelled(@NonNull String packageName, int userId) {
    public void notifyVerificationCancelled(@NonNull String packageName, int userId) {
        synchronized (mRemoteServices) {
        synchronized (mLock) {
            var remoteService = mRemoteServices.get(userId);
            var remoteService = mRemoteServices.get(userId);
            if (remoteService == null) {
            if (remoteService == null) {
                if (DEBUG) {
                if (DEBUG) {
@@ -369,7 +341,7 @@ public class VerifierController {
        }
        }
        // For now, the verification id is the same as the installation session id.
        // For now, the verification id is the same as the installation session id.
        final int verificationId = installationSessionId;
        final int verificationId = installationSessionId;
        synchronized (mRemoteServices) {
        synchronized (mLock) {
            var remoteService = mRemoteServices.get(userId);
            var remoteService = mRemoteServices.get(userId);
            if (remoteService == null) {
            if (remoteService == null) {
                if (DEBUG) {
                if (DEBUG) {
@@ -409,21 +381,14 @@ public class VerifierController {
                            callback.onConnectionFailed();
                            callback.onConnectionFailed();
                        }
                        }
                    });
                    });
            // We've sent out a new verification request, so stop the auto-disconnection countdown.
            stopAutoDisconnectCountdown(remoteService.getAutoDisconnectCallback());
        }
        }
        // Keep track of the session status with the ID. Start counting down the session timeout.
        // Keep track of the session status with the ID. Start counting down the session timeout.
        final long defaultTimeoutMillis = mInjector.getVerificationRequestTimeoutMillis();
        final long defaultTimeoutMillis = mInjector.getVerificationRequestTimeoutMillis();
        final long maxExtendedTimeoutMillis = mInjector.getMaxVerificationExtendedTimeoutMillis();
        final long maxExtendedTimeoutMillis = mInjector.getMaxVerificationExtendedTimeoutMillis();
        final VerificationStatusTracker tracker = new VerificationStatusTracker(
        final VerificationStatusTracker tracker = new VerificationStatusTracker(
                defaultTimeoutMillis, maxExtendedTimeoutMillis, mInjector, userId);
                defaultTimeoutMillis, maxExtendedTimeoutMillis, mInjector);
        synchronized (mVerificationStatusTrackers) {
        synchronized (mVerificationStatus) {
            mVerificationStatusTrackers.put(verificationId, tracker);
            mVerificationStatus.put(verificationId, tracker);
            if (mSessionsCountPerUser.indexOfKey(userId) < 0) {
                mSessionsCountPerUser.put(userId, 0);
            }
            final int sessionsCount = mSessionsCountPerUser.get(userId);
            mSessionsCountPerUser.put(userId, sessionsCount + 1);
        }
        }
        startTimeoutCountdown(verificationId, tracker, callback, defaultTimeoutMillis);
        startTimeoutCountdown(verificationId, tracker, callback, defaultTimeoutMillis);
        return true;
        return true;
@@ -458,7 +423,7 @@ public class VerifierController {
     * Called to notify the bound verifier agent that a verification request has timed out.
     * Called to notify the bound verifier agent that a verification request has timed out.
     */
     */
    public void notifyVerificationTimeout(int verificationId, int userId) {
    public void notifyVerificationTimeout(int verificationId, int userId) {
        synchronized (mRemoteServices) {
        synchronized (mLock) {
            var remoteService = mRemoteServices.get(userId);
            var remoteService = mRemoteServices.get(userId);
            if (remoteService == null) {
            if (remoteService == null) {
                if (DEBUG) {
                if (DEBUG) {
@@ -489,44 +454,21 @@ public class VerifierController {
        if (DEBUG) {
        if (DEBUG) {
            Slog.i(TAG, "Removing status tracking for verification " + verificationId);
            Slog.i(TAG, "Removing status tracking for verification " + verificationId);
        }
        }
        synchronized (mVerificationStatusTrackers) {
        synchronized (mVerificationStatus) {
            final VerificationStatusTracker trackerRemoved =
            VerificationStatusTracker tracker = mVerificationStatus.removeReturnOld(verificationId);
                    mVerificationStatusTrackers.removeReturnOld(verificationId);
            // Cancel the timeout counters if there's any
            if (trackerRemoved != null) {
            if (tracker != null) {
                // Stop the request timeout countdown
                mInjector.stopTimeoutCountdown(mHandler, tracker);
                mInjector.stopTimeoutCountdown(mHandler, /* token= */ trackerRemoved);
                final int userId = trackerRemoved.getUserId();
                final int sessionCountForUser = mSessionsCountPerUser.get(userId);
                if (sessionCountForUser >= 1) {
                    // Decrement the sessions count but don't go beyond zero
                    mSessionsCountPerUser.put(userId, sessionCountForUser - 1);
                }
                // Schedule auto-disconnect if there's no more active session on the user
                if (mSessionsCountPerUser.get(userId) == 0) {
                    maybeScheduleAutoDisconnect(userId);
                }
            }
            }
        }
        }
    }
    }


    private void maybeScheduleAutoDisconnect(int userId) {
        synchronized (mRemoteServices) {
            final ServiceConnectorWrapper service = mRemoteServices.get(userId);
            if (service == null) {
                // Already unbound on this user
                return;
            }
            // Schedule a job to disconnect from the verifier on this user
            startAutoDisconnectCountdown(service.getAutoDisconnectCallback());
        }
    }

    /**
    /**
     * Assert that the calling UID is the same as the UID of the currently connected verifier.
     * Assert that the calling UID is the same as the UID of the currently connected verifier.
     */
     */
    public void assertCallerIsCurrentVerifier(int callingUid) {
    public void assertCallerIsCurrentVerifier(int callingUid) {
        final int userId = UserHandle.getUserId(callingUid);
        final int userId = UserHandle.getUserId(callingUid);
        synchronized (mRemoteServices) {
        synchronized (mLock) {
            var remoteService = mRemoteServices.get(userId);
            var remoteService = mRemoteServices.get(userId);
            if (remoteService == null) {
            if (remoteService == null) {
                throw new IllegalStateException(
                throw new IllegalStateException(
@@ -551,9 +493,8 @@ public class VerifierController {
        @Override
        @Override
        public @CurrentTimeMillisLong long getTimeoutTime(int verificationId) {
        public @CurrentTimeMillisLong long getTimeoutTime(int verificationId) {
            assertCallerIsCurrentVerifier(getCallingUid());
            assertCallerIsCurrentVerifier(getCallingUid());
            synchronized (mVerificationStatusTrackers) {
            synchronized (mVerificationStatus) {
                final VerificationStatusTracker tracker =
                final VerificationStatusTracker tracker = mVerificationStatus.get(verificationId);
                        mVerificationStatusTrackers.get(verificationId);
                if (tracker == null) {
                if (tracker == null) {
                    throw new IllegalStateException("Verification session " + verificationId
                    throw new IllegalStateException("Verification session " + verificationId
                            + " doesn't exist or has finished");
                            + " doesn't exist or has finished");
@@ -566,9 +507,8 @@ public class VerifierController {
        public @DurationMillisLong long extendTimeRemaining(int verificationId,
        public @DurationMillisLong long extendTimeRemaining(int verificationId,
                @DurationMillisLong long additionalMs) {
                @DurationMillisLong long additionalMs) {
            assertCallerIsCurrentVerifier(getCallingUid());
            assertCallerIsCurrentVerifier(getCallingUid());
            synchronized (mVerificationStatusTrackers) {
            synchronized (mVerificationStatus) {
                final VerificationStatusTracker tracker =
                final VerificationStatusTracker tracker = mVerificationStatus.get(verificationId);
                        mVerificationStatusTrackers.get(verificationId);
                if (tracker == null) {
                if (tracker == null) {
                    throw new IllegalStateException("Verification session " + verificationId
                    throw new IllegalStateException("Verification session " + verificationId
                            + " doesn't exist or has finished");
                            + " doesn't exist or has finished");
@@ -581,9 +521,8 @@ public class VerifierController {
        public boolean setVerificationPolicy(int verificationId,
        public boolean setVerificationPolicy(int verificationId,
                @PackageInstaller.VerificationPolicy int policy) {
                @PackageInstaller.VerificationPolicy int policy) {
            assertCallerIsCurrentVerifier(getCallingUid());
            assertCallerIsCurrentVerifier(getCallingUid());
            synchronized (mVerificationStatusTrackers) {
            synchronized (mVerificationStatus) {
                final VerificationStatusTracker tracker =
                final VerificationStatusTracker tracker = mVerificationStatus.get(verificationId);
                        mVerificationStatusTrackers.get(verificationId);
                if (tracker == null) {
                if (tracker == null) {
                    throw new IllegalStateException("Verification session " + verificationId
                    throw new IllegalStateException("Verification session " + verificationId
                            + " doesn't exist or has finished");
                            + " doesn't exist or has finished");
@@ -596,8 +535,8 @@ public class VerifierController {
        public void reportVerificationIncomplete(int id, int reason) {
        public void reportVerificationIncomplete(int id, int reason) {
            assertCallerIsCurrentVerifier(getCallingUid());
            assertCallerIsCurrentVerifier(getCallingUid());
            final VerificationStatusTracker tracker;
            final VerificationStatusTracker tracker;
            synchronized (mVerificationStatusTrackers) {
            synchronized (mVerificationStatus) {
                tracker = mVerificationStatusTrackers.get(id);
                tracker = mVerificationStatus.get(id);
                if (tracker == null) {
                if (tracker == null) {
                    throw new IllegalStateException("Verification session " + id
                    throw new IllegalStateException("Verification session " + id
                            + " doesn't exist or has finished");
                            + " doesn't exist or has finished");
@@ -613,8 +552,8 @@ public class VerifierController {
                @Nullable PersistableBundle extensionResponse) {
                @Nullable PersistableBundle extensionResponse) {
            assertCallerIsCurrentVerifier(getCallingUid());
            assertCallerIsCurrentVerifier(getCallingUid());
            final VerificationStatusTracker tracker;
            final VerificationStatusTracker tracker;
            synchronized (mVerificationStatusTrackers) {
            synchronized (mVerificationStatus) {
                tracker = mVerificationStatusTrackers.get(id);
                tracker = mVerificationStatus.get(id);
                if (tracker == null) {
                if (tracker == null) {
                    throw new IllegalStateException("Verification session " + id
                    throw new IllegalStateException("Verification session " + id
                            + " doesn't exist or has finished");
                            + " doesn't exist or has finished");
@@ -634,13 +573,11 @@ public class VerifierController {
        // Package name of the verifier that was bound to. This can be different from the verifier
        // Package name of the verifier that was bound to. This can be different from the verifier
        // originally specified by the system.
        // originally specified by the system.
        private final @NonNull String mVerifierPackageName;
        private final @NonNull String mVerifierPackageName;
        private final @NonNull Runnable mAutoDisconnectCallback;
        ServiceConnectorWrapper(@NonNull ServiceConnector<IVerifierService> service, int uid,
        ServiceConnectorWrapper(@NonNull ServiceConnector<IVerifierService> service, int uid,
                @NonNull String verifierPackageName) {
                @NonNull String verifierPackageName) {
            mRemoteService = service;
            mRemoteService = service;
            mUid = uid;
            mUid = uid;
            mVerifierPackageName = verifierPackageName;
            mVerifierPackageName = verifierPackageName;
            mAutoDisconnectCallback = mRemoteService::unbind;
        }
        }
        ServiceConnector<IVerifierService> getService() {
        ServiceConnector<IVerifierService> getService() {
            return mRemoteService;
            return mRemoteService;
@@ -651,9 +588,6 @@ public class VerifierController {
        @NonNull String getVerifierPackageName() {
        @NonNull String getVerifierPackageName() {
            return mVerifierPackageName;
            return mVerifierPackageName;
        }
        }
        @NonNull Runnable getAutoDisconnectCallback() {
            return mAutoDisconnectCallback;
        }
    }
    }


    @VisibleForTesting
    @VisibleForTesting
@@ -682,8 +616,7 @@ public class VerifierController {


                @Override
                @Override
                protected long getAutoDisconnectTimeoutMs() {
                protected long getAutoDisconnectTimeoutMs() {
                    // Do not auto-disconnect here; let VerifierController decide when to disconnect
                    return UNBIND_TIMEOUT_MILLIS;
                    return -1;
                }
                }
            };
            };
        }
        }
@@ -703,14 +636,6 @@ public class VerifierController {
            handler.removeCallbacksAndEqualMessages(token);
            handler.removeCallbacksAndEqualMessages(token);
        }
        }


        /**
         * This is added so that we don't need to mock Handler.removeCallbacks which is final.
         */
        public void removeCallbacks(Handler handler, Runnable callback) {
            handler.removeCallbacks(callback);
        }


        /**
        /**
         * This is added so that we can mock the verification request timeout duration without
         * This is added so that we can mock the verification request timeout duration without
         * calling into DeviceConfig.
         * calling into DeviceConfig.
+1 −1
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@ public class VerificationStatusTrackerTest {
                .thenReturn(TEST_REQUEST_START_TIME + TEST_MAX_TIMEOUT_DURATION_MILLIS - 100)
                .thenReturn(TEST_REQUEST_START_TIME + TEST_MAX_TIMEOUT_DURATION_MILLIS - 100)
                .thenReturn(TEST_REQUEST_START_TIME + TEST_MAX_TIMEOUT_DURATION_MILLIS);
                .thenReturn(TEST_REQUEST_START_TIME + TEST_MAX_TIMEOUT_DURATION_MILLIS);
        mTracker = new VerificationStatusTracker(TEST_TIMEOUT_DURATION_MILLIS,
        mTracker = new VerificationStatusTracker(TEST_TIMEOUT_DURATION_MILLIS,
                TEST_MAX_TIMEOUT_DURATION_MILLIS, mInjector, 0);
                TEST_MAX_TIMEOUT_DURATION_MILLIS, mInjector);
    }
    }


    @Test
    @Test
+20 −201

File changed.

Preview size limit exceeded, changes collapsed.