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

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

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/29569717', 'googleplex-android-review.googlesource.com/29566629'] into 24Q4-release.

Change-Id: I609015247eff2961f65897697b4d083d5cf509aa
parents 29295879 2f667803
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)
+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