3636import androidx .test .filters .SmallTest ;
3737
3838import com .android .internal .util .LatencyTracker ;
39+ import com .android .internal .widget .LockDomain ;
3940import com .android .internal .widget .LockPatternUtils ;
4041import com .android .keyguard .KeyguardSecurityModel .SecurityMode ;
4142import com .android .keyguard .domain .interactor .KeyguardKeyboardInteractor ;
@@ -127,7 +128,7 @@ public void setup() {
127128 new KeyguardKeyboardInteractor (new FakeKeyboardRepository ());
128129 FakeFeatureFlags featureFlags = new FakeFeatureFlags ();
129130 mSetFlagsRule .enableFlags (com .android .systemui .Flags .FLAG_REVAMPED_BOUNCER_MESSAGES );
130- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (false );
131+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (false );
131132 mKeyguardPinViewController = new KeyguardPinBasedInputViewController (mPinBasedInputView ,
132133 mKeyguardUpdateMonitor , mSecurityMode , mLockPatternUtils , mKeyguardSecurityCallback ,
133134 mKeyguardMessageAreaControllerFactory , mLatencyTracker ,
@@ -162,7 +163,7 @@ public void testMessageIsSetWhenReset() {
162163 @ Test
163164 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
164165 public void updateAnimations_addDevice_notKeyboard () {
165- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (false );
166+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (false );
166167 verify (mPasswordEntry , times (1 )).setShowPassword (true );
167168 mKeyguardPinViewController .onViewAttached ();
168169 mKeyguardPinViewController .onInputDeviceAdded (1 );
@@ -172,7 +173,7 @@ public void updateAnimations_addDevice_notKeyboard() {
172173 @ Test
173174 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
174175 public void updateAnimations_addDevice_keyboard () {
175- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (true );
176+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (true );
176177 verify (mPasswordEntry , times (1 )).setShowPassword (true );
177178 mKeyguardPinViewController .onViewAttached ();
178179 mKeyguardPinViewController .onInputDeviceAdded (1 );
@@ -182,7 +183,7 @@ public void updateAnimations_addDevice_keyboard() {
182183 @ Test
183184 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
184185 public void updateAnimations_addDevice_multipleKeyboards () {
185- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (true );
186+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (true );
186187 verify (mPasswordEntry , times (1 )).setShowPassword (true );
187188 mKeyguardPinViewController .onViewAttached ();
188189 mKeyguardPinViewController .onInputDeviceAdded (1 );
@@ -194,7 +195,7 @@ public void updateAnimations_addDevice_multipleKeyboards() {
194195 @ Test
195196 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
196197 public void updateAnimations_removeDevice_notKeyboard () {
197- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (false );
198+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (false );
198199 verify (mPasswordEntry , times (1 )).setShowPassword (true );
199200 mKeyguardPinViewController .onViewAttached ();
200201 mKeyguardPinViewController .onInputDeviceRemoved (1 );
@@ -204,7 +205,7 @@ public void updateAnimations_removeDevice_notKeyboard() {
204205 @ Test
205206 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
206207 public void updateAnimations_removeDevice_keyboard () {
207- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (true , false );
208+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (true , false );
208209 verify (mPasswordEntry , times (1 )).setShowPassword (true );
209210 verify (mPasswordEntry , times (0 )).setShowPassword (false );
210211 mKeyguardPinViewController .onViewAttached ();
@@ -218,7 +219,7 @@ public void updateAnimations_removeDevice_keyboard() {
218219 @ Test
219220 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
220221 public void updateAnimations_removeDevice_multipleKeyboards () {
221- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (true , true );
222+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (true , true );
222223 verify (mPasswordEntry , times (1 )).setShowPassword (true );
223224 verify (mPasswordEntry , times (0 )).setShowPassword (false );
224225 mKeyguardPinViewController .onViewAttached ();
@@ -232,7 +233,7 @@ public void updateAnimations_removeDevice_multipleKeyboards() {
232233 @ Test
233234 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
234235 public void updateAnimations_updateDevice_notKeyboard () {
235- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (false );
236+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (false );
236237 verify (mPasswordEntry , times (1 )).setShowPassword (true );
237238 mKeyguardPinViewController .onViewAttached ();
238239 mKeyguardPinViewController .onInputDeviceChanged (1 );
@@ -242,7 +243,7 @@ public void updateAnimations_updateDevice_notKeyboard() {
242243 @ Test
243244 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
244245 public void updateAnimations_updateDevice_keyboard () {
245- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (true , false );
246+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (true , false );
246247 verify (mPasswordEntry , times (1 )).setShowPassword (true );
247248 verify (mPasswordEntry , times (0 )).setShowPassword (false );
248249 mKeyguardPinViewController .onViewAttached ();
@@ -256,7 +257,7 @@ public void updateAnimations_updateDevice_keyboard() {
256257 @ Test
257258 @ EnableFlags (FLAG_HIDE_LAST_CHAR_WITH_PHYSICAL_INPUT )
258259 public void updateAnimations_updateDevice_multipleKeyboards () {
259- when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt ())).thenReturn (true , true );
260+ when (mLockPatternUtils .isPinEnhancedPrivacyEnabled (anyInt (), any ( LockDomain . class ) )).thenReturn (true , true );
260261 verify (mPasswordEntry , times (1 )).setShowPassword (true );
261262 verify (mPasswordEntry , times (0 )).setShowPassword (false );
262263 mKeyguardPinViewController .onViewAttached ();
0 commit comments