Loading packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +9 −1 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.function.Supplier; Loading Loading @@ -448,6 +449,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis notifySystemUiStateFlags(mSysUiState.getFlags()); notifyConnectionChanged(); if (mLatchForOnUserChanging != null) { mLatchForOnUserChanging.countDown(); mLatchForOnUserChanging = null; } } @Override Loading Loading @@ -502,11 +507,14 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } }; private CountDownLatch mLatchForOnUserChanging; private final UserTracker.Callback mUserChangedCallback = new UserTracker.Callback() { @Override public void onUserChanged(int newUser, @NonNull Context userContext) { public void onUserChanging(int newUser, @NonNull Context userContext, CountDownLatch latch) { mConnectionBackoffAttempts = 0; mLatchForOnUserChanging = latch; internalConnectToCurrentUser("User changed"); } }; Loading Loading
packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +9 −1 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.function.Supplier; Loading Loading @@ -448,6 +449,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis notifySystemUiStateFlags(mSysUiState.getFlags()); notifyConnectionChanged(); if (mLatchForOnUserChanging != null) { mLatchForOnUserChanging.countDown(); mLatchForOnUserChanging = null; } } @Override Loading Loading @@ -502,11 +507,14 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } }; private CountDownLatch mLatchForOnUserChanging; private final UserTracker.Callback mUserChangedCallback = new UserTracker.Callback() { @Override public void onUserChanged(int newUser, @NonNull Context userContext) { public void onUserChanging(int newUser, @NonNull Context userContext, CountDownLatch latch) { mConnectionBackoffAttempts = 0; mLatchForOnUserChanging = latch; internalConnectToCurrentUser("User changed"); } }; Loading