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

Commit 157f8c5f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/29519488',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/29519488', 'googleplex-android-review.googlesource.com/29569717', 'googleplex-android-review.googlesource.com/29566629'] into sparse-12396123-L68000030006663300.
SPARSE_CHANGE: Ic702b21cbea24f5db67f237cb1624bf772ce2a0a
SPARSE_CHANGE: Ic58e7eee51e0f3a15d62ca6e5db85f1b291bd865
SPARSE_CHANGE: I8b412400b89f5c62ccfc314d49dad68400cb3e5b

Change-Id: I399c1df050a6c1bb53056d0a48d82f3e881269e5
parents ad289f78 949f6ebd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ constructor(

                val callback =
                    object : UserTracker.Callback {
                        override fun onUserChanging(newUser: Int, userContext: Context) {
                        override fun onBeforeUserSwitching(newUser: Int) {
                            send(SelectionStatus.SELECTION_IN_PROGRESS)
                        }

+9 −1
Original line number Diff line number Diff line
@@ -248,10 +248,17 @@ class UserRepositoryImplTest : SysuiTestCase() {

            setUpUsers(count = 2, selectedIndex = 1)

            // WHEN the user switch is starting
            tracker.onBeforeUserSwitching(userId = 1)

            // THEN the selection status is IN_PROGRESS
            assertThat(selectedUser!!.selectionStatus)
                .isEqualTo(SelectionStatus.SELECTION_IN_PROGRESS)

            // WHEN the user is changing
            tracker.onUserChanging(userId = 1)

            // THEN the selection status is IN_PROGRESS
            // THEN the selection status is still IN_PROGRESS
            assertThat(selectedUser!!.selectionStatus)
                .isEqualTo(SelectionStatus.SELECTION_IN_PROGRESS)

@@ -266,6 +273,7 @@ class UserRepositoryImplTest : SysuiTestCase() {

            setUpUsers(count = 2, selectedIndex = 0)

            tracker.onBeforeUserSwitching(userId = 0)
            tracker.onUserChanging(userId = 0)
            assertThat(selectedUser!!.selectionStatus)
                .isEqualTo(SelectionStatus.SELECTION_IN_PROGRESS)
+0 −2
Original line number Diff line number Diff line
@@ -1101,8 +1101,6 @@ public class UserManagerService extends IUserManager.Stub {
        if (android.multiuser.Flags.cachesNotInvalidatedAtStartReadOnly()) {
            UserManager.invalidateIsUserUnlockedCache();
            UserManager.invalidateQuietModeEnabledCache();
            UserManager.invalidateStaticUserProperties();
            UserManager.invalidateUserPropertiesCache();
            UserManager.invalidateUserSerialNumberCache();
        }
    }
+10 −18
Original line number Diff line number Diff line
@@ -173,10 +173,6 @@ public class SharedConnectivityManager {
                }
            }
        }

        Executor getExecutor() {
            return mExecutor;
        }
    }

    private ISharedConnectivityService mService;
@@ -192,7 +188,7 @@ public class SharedConnectivityManager {
    private final String mServicePackageName;
    private final String mIntentAction;
    private ServiceConnection mServiceConnection;
    private final UserManager mUserManager;
    private UserManager mUserManager;

    /**
     * Creates a new instance of {@link SharedConnectivityManager}.
@@ -320,8 +316,6 @@ public class SharedConnectivityManager {

    private void registerCallbackInternal(SharedConnectivityClientCallback callback,
            SharedConnectivityCallbackProxy proxy) {
        proxy.getExecutor().execute(
                () -> {
        try {
            mService.registerCallback(proxy);
            synchronized (mProxyDataLock) {
@@ -332,8 +326,6 @@ public class SharedConnectivityManager {
            callback.onRegisterCallbackFailed(e);
        }
    }
        );
    }

    /**
     * @hide