Add mocks for LockPatternUtils.isSecure() method in setup
This change adds mocking for LockPatternUtils.isSecure method in the tests where SecurityFeatureProvider is referred in setup as per the comment in b/323649600#comment7 The tests are passing locally even without this. Bug: 333504640 Test: atest com.android.settings.privatespace Change-Id: I7d9c3a8356dbf25cf09530ffb53712b3ab887160
This commit is contained in:
@@ -68,6 +68,7 @@ public class UseOneLockControllerTest {
|
||||
final FakeFeatureFactory featureFactory = FakeFeatureFactory.setupForTest();
|
||||
when(featureFactory.securityFeatureProvider.getLockPatternUtils(mContext))
|
||||
.thenReturn(mLockPatternUtils);
|
||||
doReturn(true).when(mLockPatternUtils).isSecure(anyInt());
|
||||
mUseOneLockController = new UseOneLockController(mContext, preferenceKey);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user