Loading packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerActionButtonInteractorTest.kt +0 −4 Original line number Diff line number Diff line Loading @@ -30,8 +30,6 @@ import com.android.systemui.authentication.shared.model.AuthenticationMethodMode import com.android.systemui.common.ui.data.repository.fakeConfigurationRepository import com.android.systemui.coroutines.collectLastValue import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.Flags.REFACTOR_GETCURRENTUSER import com.android.systemui.flags.fakeFeatureFlagsClassic import com.android.systemui.kosmos.testScope import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeMobileConnectionsRepository import com.android.systemui.statusbar.pipeline.mobile.data.repository.fakeMobileConnectionsRepository Loading Loading @@ -90,8 +88,6 @@ class BouncerActionButtonInteractorTest : SysuiTestCase() { .thenReturn(needsEmergencyAffordance) whenever(telecomManager.isInCall).thenReturn(false) kosmos.fakeFeatureFlagsClassic.set(REFACTOR_GETCURRENTUSER, true) kosmos.fakeTelephonyRepository.setHasTelephonyRadio(true) kosmos.telecomManager = telecomManager Loading packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt +1 −4 Original line number Diff line number Diff line Loading @@ -175,10 +175,7 @@ class SceneFrameworkIntegrationTest : SysuiTestCase() { emergencyAffordanceManager = kosmos.emergencyAffordanceManager whenever(emergencyAffordanceManager.needsEmergencyAffordance()).thenReturn(true) kosmos.fakeFeatureFlagsClassic.apply { set(Flags.NEW_NETWORK_SLICE_UI, false) set(Flags.REFACTOR_GETCURRENTUSER, true) } kosmos.fakeFeatureFlagsClassic.apply { set(Flags.NEW_NETWORK_SLICE_UI, false) } mobileConnectionsRepository = kosmos.fakeMobileConnectionsRepository mobileConnectionsRepository.isAnySimSecure.value = false Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +6 −22 Original line number Diff line number Diff line Loading @@ -483,22 +483,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @VisibleForTesting SparseArray<BiometricAuthenticated> mUserFingerprintAuthenticated = new SparseArray<>(); private static int sCurrentUser; @Deprecated public synchronized static void setCurrentUser(int currentUser) { sCurrentUser = currentUser; } /** * @deprecated This can potentially return unexpected values in a multi user scenario * as this state is managed by another component. Consider using {@link SelectedUserInteractor}. */ @Deprecated public synchronized static int getCurrentUser() { return sCurrentUser; } @Override public void onTrustChanged(boolean enabled, boolean newlyUnlocked, int userId, int flags, List<String> trustGrantedMessages) { Loading Loading @@ -969,7 +953,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mHandler.removeCallbacks(mFpCancelNotReceived); } try { final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); if (userId != authUserId) { mLogger.logFingerprintAuthForWrongUser(authUserId); return; Loading Loading @@ -1220,7 +1204,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mLogger.d("Aborted successful auth because device is going to sleep."); return; } final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); if (userId != authUserId) { mLogger.logFaceAuthForWrongUser(authUserId); return; Loading Loading @@ -2462,7 +2446,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); mTaskStackChangeListeners.registerTaskStackListener(mTaskStackListener); int user = mSelectedUserInteractor.getSelectedUserId(true); int user = mSelectedUserInteractor.getSelectedUserId(); boolean isUserUnlocked = mUserManager.isUserUnlocked(user); mLogger.logUserUnlockedInitialState(user, isUserUnlocked); mUserIsUnlocked.put(user, isUserUnlocked); Loading Loading @@ -4081,7 +4065,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" " + subId + "=" + mServiceStates.get(subId)); } if (isFingerprintSupported()) { final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); final int strongAuthFlags = mStrongAuthTracker.getStrongAuthForUser(userId); BiometricAuthenticated fingerprint = mUserFingerprintAuthenticated.get(userId); pw.println(" Fingerprint state (user=" + userId + ")"); Loading Loading @@ -4124,7 +4108,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mFingerprintListenBuffer.toList() ).printTableData(pw); } else if (mFpm != null && mFingerprintSensorProperties.isEmpty()) { final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); pw.println(" Fingerprint state (user=" + userId + ")"); pw.println(" mFingerprintSensorProperties.isEmpty=" + mFingerprintSensorProperties.isEmpty()); Loading @@ -4137,7 +4121,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mFingerprintListenBuffer.toList() ).printTableData(pw); } final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); final int strongAuthFlags = mStrongAuthTracker.getStrongAuthForUser(userId); pw.println(" authSinceBoot=" + getStrongAuthTracker().hasUserAuthenticatedSinceBoot()); Loading packages/SystemUI/src/com/android/systemui/camera/CameraGestureHelper.kt +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ constructor( Intent.FLAG_ACTIVITY_NEW_TASK, null, activityOptions.toBundle(), selectedUserInteractor.getSelectedUserId(true), selectedUserInteractor.getSelectedUserId(), ) } catch (e: RemoteException) { Log.w("CameraGestureHelper", "Unable to start camera activity", e) Loading packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java +5 −5 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ public class DozeSensors { Settings.Secure.DOZE_WAKE_DISPLAY_GESTURE, mConfig.wakeScreenGestureAvailable() && mConfig.alwaysOnEnabled( mSelectedUserInteractor.getSelectedUserId(true)), mSelectedUserInteractor.getSelectedUserId()), DozeLog.REASON_SENSOR_WAKE_UP_PRESENCE, false /* reports touch coordinates */, false /* touchscreen */ Loading Loading @@ -297,7 +297,7 @@ public class DozeSensors { private boolean udfpsLongPressConfigured() { return mUdfpsEnrolled && (mConfig.alwaysOnEnabled(mSelectedUserInteractor.getSelectedUserId(true)) && (mConfig.alwaysOnEnabled(mSelectedUserInteractor.getSelectedUserId()) || mScreenOffUdfpsEnabled); } Loading Loading @@ -477,7 +477,7 @@ public class DozeSensors { private final ContentObserver mSettingsObserver = new ContentObserver(mHandler) { @Override public void onChange(boolean selfChange, Collection<Uri> uris, int flags, int userId) { if (userId != mSelectedUserInteractor.getSelectedUserId(true)) { if (userId != mSelectedUserInteractor.getSelectedUserId()) { return; } for (TriggerSensor s : mTriggerSensors) { Loading Loading @@ -703,13 +703,13 @@ public class DozeSensors { } protected boolean enabledBySetting() { if (!mConfig.enabled(mSelectedUserInteractor.getSelectedUserId(true))) { if (!mConfig.enabled(mSelectedUserInteractor.getSelectedUserId())) { return false; } else if (TextUtils.isEmpty(mSetting)) { return true; } return mSecureSettings.getIntForUser(mSetting, mSettingDefault ? 1 : 0, mSelectedUserInteractor.getSelectedUserId(true)) != 0; mSelectedUserInteractor.getSelectedUserId()) != 0; } @Override Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerActionButtonInteractorTest.kt +0 −4 Original line number Diff line number Diff line Loading @@ -30,8 +30,6 @@ import com.android.systemui.authentication.shared.model.AuthenticationMethodMode import com.android.systemui.common.ui.data.repository.fakeConfigurationRepository import com.android.systemui.coroutines.collectLastValue import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.Flags.REFACTOR_GETCURRENTUSER import com.android.systemui.flags.fakeFeatureFlagsClassic import com.android.systemui.kosmos.testScope import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeMobileConnectionsRepository import com.android.systemui.statusbar.pipeline.mobile.data.repository.fakeMobileConnectionsRepository Loading Loading @@ -90,8 +88,6 @@ class BouncerActionButtonInteractorTest : SysuiTestCase() { .thenReturn(needsEmergencyAffordance) whenever(telecomManager.isInCall).thenReturn(false) kosmos.fakeFeatureFlagsClassic.set(REFACTOR_GETCURRENTUSER, true) kosmos.fakeTelephonyRepository.setHasTelephonyRadio(true) kosmos.telecomManager = telecomManager Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt +1 −4 Original line number Diff line number Diff line Loading @@ -175,10 +175,7 @@ class SceneFrameworkIntegrationTest : SysuiTestCase() { emergencyAffordanceManager = kosmos.emergencyAffordanceManager whenever(emergencyAffordanceManager.needsEmergencyAffordance()).thenReturn(true) kosmos.fakeFeatureFlagsClassic.apply { set(Flags.NEW_NETWORK_SLICE_UI, false) set(Flags.REFACTOR_GETCURRENTUSER, true) } kosmos.fakeFeatureFlagsClassic.apply { set(Flags.NEW_NETWORK_SLICE_UI, false) } mobileConnectionsRepository = kosmos.fakeMobileConnectionsRepository mobileConnectionsRepository.isAnySimSecure.value = false Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +6 −22 Original line number Diff line number Diff line Loading @@ -483,22 +483,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @VisibleForTesting SparseArray<BiometricAuthenticated> mUserFingerprintAuthenticated = new SparseArray<>(); private static int sCurrentUser; @Deprecated public synchronized static void setCurrentUser(int currentUser) { sCurrentUser = currentUser; } /** * @deprecated This can potentially return unexpected values in a multi user scenario * as this state is managed by another component. Consider using {@link SelectedUserInteractor}. */ @Deprecated public synchronized static int getCurrentUser() { return sCurrentUser; } @Override public void onTrustChanged(boolean enabled, boolean newlyUnlocked, int userId, int flags, List<String> trustGrantedMessages) { Loading Loading @@ -969,7 +953,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mHandler.removeCallbacks(mFpCancelNotReceived); } try { final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); if (userId != authUserId) { mLogger.logFingerprintAuthForWrongUser(authUserId); return; Loading Loading @@ -1220,7 +1204,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mLogger.d("Aborted successful auth because device is going to sleep."); return; } final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); if (userId != authUserId) { mLogger.logFaceAuthForWrongUser(authUserId); return; Loading Loading @@ -2462,7 +2446,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); mTaskStackChangeListeners.registerTaskStackListener(mTaskStackListener); int user = mSelectedUserInteractor.getSelectedUserId(true); int user = mSelectedUserInteractor.getSelectedUserId(); boolean isUserUnlocked = mUserManager.isUserUnlocked(user); mLogger.logUserUnlockedInitialState(user, isUserUnlocked); mUserIsUnlocked.put(user, isUserUnlocked); Loading Loading @@ -4081,7 +4065,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" " + subId + "=" + mServiceStates.get(subId)); } if (isFingerprintSupported()) { final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); final int strongAuthFlags = mStrongAuthTracker.getStrongAuthForUser(userId); BiometricAuthenticated fingerprint = mUserFingerprintAuthenticated.get(userId); pw.println(" Fingerprint state (user=" + userId + ")"); Loading Loading @@ -4124,7 +4108,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mFingerprintListenBuffer.toList() ).printTableData(pw); } else if (mFpm != null && mFingerprintSensorProperties.isEmpty()) { final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); pw.println(" Fingerprint state (user=" + userId + ")"); pw.println(" mFingerprintSensorProperties.isEmpty=" + mFingerprintSensorProperties.isEmpty()); Loading @@ -4137,7 +4121,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mFingerprintListenBuffer.toList() ).printTableData(pw); } final int userId = mSelectedUserInteractor.getSelectedUserId(true); final int userId = mSelectedUserInteractor.getSelectedUserId(); final int strongAuthFlags = mStrongAuthTracker.getStrongAuthForUser(userId); pw.println(" authSinceBoot=" + getStrongAuthTracker().hasUserAuthenticatedSinceBoot()); Loading
packages/SystemUI/src/com/android/systemui/camera/CameraGestureHelper.kt +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ constructor( Intent.FLAG_ACTIVITY_NEW_TASK, null, activityOptions.toBundle(), selectedUserInteractor.getSelectedUserId(true), selectedUserInteractor.getSelectedUserId(), ) } catch (e: RemoteException) { Log.w("CameraGestureHelper", "Unable to start camera activity", e) Loading
packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java +5 −5 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ public class DozeSensors { Settings.Secure.DOZE_WAKE_DISPLAY_GESTURE, mConfig.wakeScreenGestureAvailable() && mConfig.alwaysOnEnabled( mSelectedUserInteractor.getSelectedUserId(true)), mSelectedUserInteractor.getSelectedUserId()), DozeLog.REASON_SENSOR_WAKE_UP_PRESENCE, false /* reports touch coordinates */, false /* touchscreen */ Loading Loading @@ -297,7 +297,7 @@ public class DozeSensors { private boolean udfpsLongPressConfigured() { return mUdfpsEnrolled && (mConfig.alwaysOnEnabled(mSelectedUserInteractor.getSelectedUserId(true)) && (mConfig.alwaysOnEnabled(mSelectedUserInteractor.getSelectedUserId()) || mScreenOffUdfpsEnabled); } Loading Loading @@ -477,7 +477,7 @@ public class DozeSensors { private final ContentObserver mSettingsObserver = new ContentObserver(mHandler) { @Override public void onChange(boolean selfChange, Collection<Uri> uris, int flags, int userId) { if (userId != mSelectedUserInteractor.getSelectedUserId(true)) { if (userId != mSelectedUserInteractor.getSelectedUserId()) { return; } for (TriggerSensor s : mTriggerSensors) { Loading Loading @@ -703,13 +703,13 @@ public class DozeSensors { } protected boolean enabledBySetting() { if (!mConfig.enabled(mSelectedUserInteractor.getSelectedUserId(true))) { if (!mConfig.enabled(mSelectedUserInteractor.getSelectedUserId())) { return false; } else if (TextUtils.isEmpty(mSetting)) { return true; } return mSecureSettings.getIntForUser(mSetting, mSettingDefault ? 1 : 0, mSelectedUserInteractor.getSelectedUserId(true)) != 0; mSelectedUserInteractor.getSelectedUserId()) != 0; } @Override Loading