/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
D | StatusBarTest.java | 36 import static org.mockito.Mockito.when; 140 when(commandQueue.asBinder()).thenReturn(new Binder()); in setup() 148 when(mStackScroller.generateLayoutParams(any())).thenReturn(new LayoutParams(0, 0)); in setup() 154 when(mNotificationPanelView.getLayoutParams()).thenReturn(new LayoutParams(0, 0)); in setup() 163 when(powerManagerService.isInteractive()).thenReturn(true); in setup() 178 }).when(mStatusBarKeyguardViewManager).dismissWithAction(any(), any(), anyBoolean()); in setup() 184 }).when(mStatusBarKeyguardViewManager).addAfterKeyguardGoneRunnable(any()); in setup() 186 when(mStackScroller.getActivatedChild()).thenReturn(null); in setup() 206 when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true); in executeRunnableDismissingKeyguard_nullRunnable_showingAndOccluded() 207 when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(true); in executeRunnableDismissingKeyguard_nullRunnable_showingAndOccluded() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | PhoneSubInfoControllerTest.java | 52 doReturn(0).when(mSubscriptionController).getPhoneId(eq(0)); in setUp() 53 doReturn(1).when(mSubscriptionController).getPhoneId(eq(1)); in setUp() 54 doReturn(2).when(mTelephonyManager).getPhoneCount(); in setUp() 57 doReturn(mSubscriptionController).when(mSubscriptionController) in setUp() 59 doReturn(mContext).when(mSecondPhone).getContext(); in setUp() 75 doReturn("353626073736741").when(mPhone).getDeviceId(); in testGetDeviceId() 76 doReturn("353626073736742").when(mSecondPhone).getDeviceId(); in testGetDeviceId() 85 doReturn("353626073736741").when(mPhone).getDeviceId(); in testGetDeviceIdWithOutPermission() 86 doReturn("353626073736742").when(mSecondPhone).getDeviceId(); in testGetDeviceIdWithOutPermission() 108 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOsMgr).noteOp( in testGetDeviceIdWithOutPermission() [all …]
|
D | TelephonyTest.java | 336 doReturn(mSST).when(mTelephonyComponentFactory) in setUp() 339 doReturn(mIccCardProxy).when(mTelephonyComponentFactory) in setUp() 342 doReturn(mCT).when(mTelephonyComponentFactory) in setUp() 344 doReturn(mIccPhoneBookIntManager).when(mTelephonyComponentFactory) in setUp() 346 doReturn(mDcTracker).when(mTelephonyComponentFactory) in setUp() 348 doReturn(mWspTypeDecoder).when(mTelephonyComponentFactory) in setUp() 350 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp() 354 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp() 358 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp() 360 doReturn(mImsCT).when(mTelephonyComponentFactory) in setUp() [all …]
|
D | CallManagerTest.java | 103 doReturn(ServiceState.STATE_IN_SERVICE).when(mServiceState).getState(); in setUp() 104 doReturn(mBgCall).when(mPhone).getBackgroundCall(); in setUp() 105 doReturn(mFgCall).when(mPhone).getForegroundCall(); in setUp() 106 doReturn(mRingingCall).when(mPhone).getRingingCall(); in setUp() 107 doReturn(mPhone).when(mBgCall).getPhone(); in setUp() 108 doReturn(mPhone).when(mFgCall).getPhone(); in setUp() 109 doReturn(mPhone).when(mRingingCall).getPhone(); in setUp() 110 doReturn(Call.State.IDLE).when(mBgCall).getState(); in setUp() 111 doReturn(Call.State.IDLE).when(mFgCall).getState(); in setUp() 112 doReturn(Call.State.IDLE).when(mRingingCall).getState(); in setUp() [all …]
|
D | DefaultPhoneNotifierTest.java | 67 doReturn(mTelephonyRegisteryMock).when(mTelephonyRegisteryMock) in setUp() 83 doReturn(true).when(mPhone).getCallForwardingIndicator(); in testNotifyCallForwarding() 84 doReturn(1).when(mPhone).getSubId(); in testNotifyCallForwarding() 92 doReturn(Phone.DataActivityState.NONE).when(mPhone).getDataActivityState(); in testNotifyDataActivity() 97 doReturn(1).when(mPhone).getSubId(); in testNotifyDataActivity() 98 doReturn(Phone.DataActivityState.DATAIN).when(mPhone).getDataActivityState(); in testNotifyDataActivity() 107 doReturn(99).when(mSignalStrength).getGsmSignalStrength(); in testNotifySignalStrength() 108 doReturn(mSignalStrength).when(mPhone).getSignalStrength(); in testNotifySignalStrength() 117 doReturn(1).when(mPhone).getSubId(); in testNotifySignalStrength() 118 doReturn(2).when(mPhone).getPhoneId(); in testNotifySignalStrength() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
D | A2dpProfileTest.java | 46 import static org.mockito.Mockito.when; 73 }).when(mAdapter).getProfileProxy(any(Context.class), any(), eq(BluetoothProfile.A2DP)); in setUp() 82 when(mBluetoothA2dpWrapper.supportsOptionalCodecs(any())).thenReturn( in supportsHighQualityAudio() 86 when(mBluetoothA2dpWrapper.supportsOptionalCodecs(any())).thenReturn( in supportsHighQualityAudio() 90 when(mBluetoothA2dpWrapper.supportsOptionalCodecs(any())).thenReturn( in supportsHighQualityAudio() 97 when(mBluetoothA2dpWrapper.getOptionalCodecsEnabled(any())).thenReturn( in isHighQualityAudioEnabled() 101 when(mBluetoothA2dpWrapper.getOptionalCodecsEnabled(any())).thenReturn( in isHighQualityAudioEnabled() 109 when(mBluetoothA2dpWrapper.getOptionalCodecsEnabled(any())).thenReturn( in isHighQualityAudioEnabled() 111 when(mBluetoothA2dp.getConnectionState(any())).thenReturn( in isHighQualityAudioEnabled() 114 when(mBluetoothA2dpWrapper.supportsOptionalCodecs(any())).thenReturn( in isHighQualityAudioEnabled() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/ |
D | GsmInboundSmsHandlerTest.java | 137 doReturn(true).when(mTelephonyManager).getSmsReceiveCapableForPhone(anyInt(), anyBoolean()); in setUp() 138 doReturn(true).when(mSmsStorageMonitor).isStorageAvailable(); in setUp() 141 doReturn(true).when(userManager).isUserUnlocked(); in setUp() 144 doReturn(new int[]{UserHandle.USER_SYSTEM}).when(mIActivityManager).getRunningUserIds(); in setUp() 160 doReturn(1).when(mInboundSmsTracker).getMessageCount(); in setUp() 161 doReturn(1).when(mInboundSmsTracker).getReferenceNumber(); in setUp() 162 doReturn("1234567890").when(mInboundSmsTracker).getAddress(); in setUp() 163 doReturn(1).when(mInboundSmsTracker).getSequenceNumber(); in setUp() 164 doReturn(1).when(mInboundSmsTracker).getIndexOffset(); in setUp() 165 doReturn(-1).when(mInboundSmsTracker).getDestPort(); in setUp() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | ANQPRequestManagerTest.java | 27 import static org.mockito.Mockito.when; 111 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITHOUT_RC)).thenReturn(true); in requestR1ANQPElementsWithoutRC() 124 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITH_RC)).thenReturn(true); in requestR1ANQPElementsWithRC() 137 when(mHandler.requestANQP(TEST_BSSID, R1R2_ANQP_WITHOUT_RC)).thenReturn(true); in requestR1R2ANQPElementsWithoutRC() 150 when(mHandler.requestANQP(TEST_BSSID, R1R2_ANQP_WITH_RC)).thenReturn(true); in requestR1R2ANQPElementsWithRC() 164 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITHOUT_RC)).thenReturn(true); in requestANQPElementsWithPendingRequest() 165 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsWithPendingRequest() 171 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime + 1); in requestANQPElementsWithPendingRequest() 177 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITHOUT_RC)).thenReturn(true); in requestANQPElementsWithPendingRequest() 178 when(mClock.getElapsedSinceBootMillis()) in requestANQPElementsWithPendingRequest() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiServiceImplTest.java | 236 when(mRequestInfo.getPid()).thenReturn(mPid); in setUp() 237 when(mRequestInfo2.getPid()).thenReturn(mPid2); in setUp() 238 when(mWifiInjector.getUserManager()).thenReturn(mUserManager); in setUp() 239 when(mWifiInjector.getWifiController()).thenReturn(mWifiController); in setUp() 240 when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics); in setUp() 241 when(mWifiInjector.getWifiStateMachine()).thenReturn(mWifiStateMachine); in setUp() 242 when(mWifiStateMachine.syncInitialize(any())).thenReturn(true); in setUp() 243 when(mWifiInjector.getWifiServiceHandlerThread()).thenReturn(mHandlerThread); in setUp() 244 when(mHandlerThread.getLooper()).thenReturn(mLooper.getLooper()); in setUp() 245 when(mContext.getResources()).thenReturn(mResources); in setUp() [all …]
|
D | WifiNetworkSelectorTest.java | 72 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); in setUp() 151 when(mContext.getResources()).thenReturn(mResource); in setupContext() 155 doReturn(value).when(mResource).getInteger(resourceName); in setupIntegerResource() 160 doReturn(true).when(mResource).getBoolean( in setupResources() 179 when(mWifiInfo.is24GHz()).thenReturn(true); in setupWifiInfo() 180 when(mWifiInfo.is5GHz()).thenReturn(false); in setupWifiInfo() 181 when(mWifiInfo.getRssi()).thenReturn(-70); in setupWifiInfo() 182 when(mWifiInfo.getNetworkId()).thenReturn(WifiConfiguration.INVALID_NETWORK_ID); in setupWifiInfo() 183 when(mWifiInfo.getBSSID()).thenReturn(null); in setupWifiInfo() 187 when(mWifiConfigManager.getLastSelectedNetwork()) in setupWifiConfigManager() [all …]
|
D | WifiConnectivityManagerTest.java | 94 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); in setUp() 148 when(resource.getInteger(R.integer.config_wifi_framework_SECURITY_AWARD)).thenReturn(80); in mockResource() 149 when(resource.getInteger(R.integer.config_wifi_framework_SAME_BSSID_AWARD)).thenReturn(24); in mockResource() 150 when(resource.getBoolean( in mockResource() 152 when(resource.getInteger( in mockResource() 155 when(resource.getInteger( in mockResource() 157 when(resource.getInteger( in mockResource() 159 when(resource.getInteger( in mockResource() 167 when(context.getResources()).thenReturn(mResource); in mockContext() 168 when(context.getSystemService(Context.ALARM_SERVICE)).thenReturn( in mockContext() [all …]
|
D | WificondControlTest.java | 31 import static org.mockito.Mockito.when; 150 when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics); in setUp() 163 when(mWifiInjector.makeWificond()).thenReturn(wificond); in testSetupDriverForClientMode() 164 when(wificond.createClientInterface()).thenReturn(clientInterface); in testSetupDriverForClientMode() 186 when(mWifiInjector.makeWificond()).thenReturn(null); in testSetupDriverForClientModeErrorWhenWificondIsNotStarted() 201 when(mWifiInjector.makeWificond()).thenReturn(wificond); in testSetupDriverForClientModeErrorWhenWificondFailedToSetupInterface() 202 when(wificond.createClientInterface()).thenReturn(null); in testSetupDriverForClientModeErrorWhenWificondFailedToSetupInterface() 216 when(mWifiInjector.makeWificond()).thenReturn(wificond); in testSetupDriverForSoftApMode() 217 when(wificond.createApInterface()).thenReturn(apInterface); in testSetupDriverForSoftApMode() 229 when(mWifiInjector.makeWificond()).thenReturn(null); in testSetupDriverForSoftApModeErrorWhenWificondIsNotStarted() [all …]
|
D | WifiStateMachineTest.java | 163 when(((IInterface) tImpl).asBinder()).thenReturn(binder); in mockService() 164 when(binder.queryLocalInterface(iface.getCanonicalName())) in mockService() 176 when(facade.getService(Context.NETWORKMANAGEMENT_SERVICE)).thenReturn( in getFrameworkFacade() 180 when(facade.getService(Context.WIFI_P2P_SERVICE)).thenReturn(p2pBinder); in getFrameworkFacade() 197 when(p2pm.getP2pStateMachineMessenger()).thenReturn(new Messenger(handler)); in getFrameworkFacade() 200 when(facade.getService(BatteryStats.SERVICE_NAME)).thenReturn(batteryStatsBinder); in getFrameworkFacade() 202 when(facade.makeIpManager(any(Context.class), anyString(), any(IpManager.Callback.class))) in getFrameworkFacade() 216 when(pkgMgr.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT)).thenReturn(true); in getContext() 219 when(context.getPackageManager()).thenReturn(pkgMgr); in getContext() 229 when(context.getContentResolver()).thenReturn(mockContentResolver); in getContext() [all …]
|
D | SupplicantStaNetworkHalTest.java | 25 import static org.mockito.Mockito.when; 89 when(mContext.getResources()).thenReturn(mResources); in setUp() 231 }).when(mISupplicantStaNetworkMock) in testSsidLoadFailure() 250 }).when(mISupplicantStaNetworkMock).setSsid(any(ArrayList.class)); in testSsidSaveFailure() 407 }).when(mISupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(any(ArrayList.class)); in testSendNetworkEapSimGsmAuthResponseWith2KcSresPair() 444 }).when(mISupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(any(ArrayList.class)); in testSendNetworkEapSimGsmAuthResponseWith3KcSresPair() 470 }).when(mISupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(any(ArrayList.class)); in testSendInvalidKcSresLenNetworkEapSimGsmAuthResponse() 492 }).when(mISupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(any(ArrayList.class)); in testSendInvalidKcSresPairNumNetworkEapSimGsmAuthResponse() 525 }).when(mISupplicantStaNetworkMock).sendNetworkEapSimUmtsAuthResponse( in testSendNetworkEapSimUmtsAuthResponse() 550 }).when(mISupplicantStaNetworkMock).sendNetworkEapSimUmtsAuthResponse( in testSendInvalidNetworkEapSimUmtsAuthResponse() [all …]
|
D | WifiStateMachinePrimeTest.java | 79 when(mWifiInjector.makeWificond()).thenReturn(null); in createWifiStateMachinePrime() 102 when(mWifiInjector.makeWificond()).thenReturn(mWificond); in enterSoftApActiveMode() 103 when(mWificond.createApInterface()).thenReturn(mApInterface); in enterSoftApActiveMode() 114 }).when(mWifiInjector).makeSoftApManager(any(INetworkManagementService.class), in enterSoftApActiveMode() 136 when(mWifiInjector.makeWificond()).thenReturn(mWificond); in testWificondExistsOnStartup() 158 when(mWifiInjector.makeWificond()).thenReturn(mWificond); in testEnterSoftApModeFromDifferentState() 185 when(mWifiInjector.makeWificond()).thenReturn(null); in testDisableWifiFromSoftApModeState() 220 when(mWifiInjector.makeWificond()).thenReturn(null); in testWificondNullWhenSwitchingToApMode() 234 when(mWifiInjector.makeWificond()).thenReturn(mWificond); in testAPInterfaceFailedWhenSwitchingToApMode() 235 when(mWificond.createApInterface()).thenReturn(null); in testAPInterfaceFailedWhenSwitchingToApMode() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/ |
D | PreferenceControllerTest.java | 39 import static org.mockito.Mockito.when; 62 when(mScreen.getPreferenceCount()).thenReturn(1); in removeExistingPref_shouldBeRemoved() 63 when(mScreen.getPreference(0)).thenReturn(mPreference); in removeExistingPref_shouldBeRemoved() 64 when(mPreference.getKey()).thenReturn(TestPrefController.KEY_PREF); in removeExistingPref_shouldBeRemoved() 89 when(mScreen.getPreferenceCount()).thenReturn(1); in doNotDisplayPref_ifNotAvailable() 90 when(mScreen.getPreference(0)).thenReturn(mPreference); in doNotDisplayPref_ifNotAvailable() 91 when(mPreference.getKey()).thenReturn(TestPrefController.KEY_PREF); in doNotDisplayPref_ifNotAvailable() 105 when(prefRoot.getPreferenceManager()).thenReturn(preferenceManager); in removePreference_shouldRemoveRecursively() 107 when(pref1.getKey()).thenReturn("key1"); in removePreference_shouldRemoveRecursively() 109 when(prefGroup2.getPreferenceManager()).thenReturn(preferenceManager); in removePreference_shouldRemoveRecursively() [all …]
|
/frameworks/base/packages/Shell/tests/src/com/android/shell/ |
D | BugreportProgressServiceTest.java | 25 import static org.mockito.Mockito.when; 115 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_noWorkProfile() 119 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile() 128 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile() 139 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile() 150 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile() 161 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile() 178 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_withWorkProfile_noAccounts() 182 when(mTestContext.accountManager.getAccountsAsUser(eq(10))).thenReturn( in findSendToAccount_withWorkProfile_noAccounts() 186 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_withWorkProfile_noAccounts() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/p2p/ |
D | SupplicantP2pIfaceHalTest.java | 25 import static org.mockito.Mockito.when; 176 when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class), in setUp() 178 when(mServiceManagerMock.registerForNotifications(anyString(), anyString(), in setUp() 180 when(mISupplicantMock.linkToDeath(any(IHwBinder.DeathRecipient.class), in setUp() 182 when(mISupplicantP2pIfaceMock.linkToDeath(any(IHwBinder.DeathRecipient.class), in setUp() 234 .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class)); in testGetName_success() 253 .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class)); in testGetName_failure() 270 .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class)); in testGetName_exception() 282 when(mISupplicantP2pIfaceMock.find(anyInt())).thenReturn(mStatusSuccess); in testFind_success() 297 when(mISupplicantP2pIfaceMock.find(anyInt())).thenReturn(mStatusFailure); in testFind_failure() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/ |
D | QSSecurityFooterTest.java | 21 import static org.mockito.Mockito.when; 95 when(mSecurityController.isDeviceManaged()).thenReturn(false); in testUnmanaged() 104 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedNoOwnerName() 105 when(mSecurityController.getDeviceOwnerOrganizationName()).thenReturn(null); in testManagedNoOwnerName() 119 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedOwnerName() 120 when(mSecurityController.getDeviceOwnerOrganizationName()) in testManagedOwnerName() 136 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedDemoMode() 137 when(mSecurityController.getDeviceOwnerOrganizationName()).thenReturn(null); in testManagedDemoMode() 139 when(mockUserInfo.isDemo()).thenReturn(true); in testManagedDemoMode() 140 when(mUserManager.getUserInfo(anyInt())).thenReturn(mockUserInfo); in testManagedDemoMode() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/ |
D | DozeConfigurationUtil.java | 21 import static org.mockito.Mockito.when; 35 when(params.getPulseOnSigMotion()).thenReturn(false); in createMockParameters() 36 when(params.getPickupVibrationThreshold()).thenReturn(0); in createMockParameters() 37 when(params.getProxCheckBeforePulse()).thenReturn(true); in createMockParameters() 38 when(params.getPickupSubtypePerformsProxCheck(anyInt())).thenReturn(true); in createMockParameters() 48 when(config.pulseOnDoubleTapEnabled(anyInt())).thenReturn(false); in createMockConfig() 49 when(config.pulseOnPickupEnabled(anyInt())).thenReturn(false); in createMockConfig() 50 when(config.pulseOnNotificationEnabled(anyInt())).thenReturn(true); in createMockConfig() 52 when(config.doubleTapSensorType()).thenReturn(null); in createMockConfig() 53 when(config.pulseOnPickupAvailable()).thenReturn(false); in createMockConfig()
|
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/widget/ |
D | PlaybackTransportRowPresenterTest.java | 28 import static org.mockito.Mockito.when; 166 when(mImpl.isPrepared()).thenReturn(true); in progressUpdating() 167 when(mImpl.getCurrentPosition()).thenReturn(123L); in progressUpdating() 168 when(mImpl.getDuration()).thenReturn(20000L); in progressUpdating() 169 when(mImpl.getBufferedPosition()).thenReturn(321L); in progressUpdating() 187 when(mImpl.getCurrentPosition()).thenReturn(124L); in progressUpdating() 191 when(mImpl.getBufferedPosition()).thenReturn(333L); in progressUpdating() 195 when(mImpl.getDuration()).thenReturn((long) (Integer.MAX_VALUE) * 2); in progressUpdating() 320 when(mImpl.isPrepared()).thenReturn(true); in seekAndConfirm() 321 when(mImpl.getCurrentPosition()).thenReturn(0L); in seekAndConfirm() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
D | LockSettingsShellCommandTest.java | 30 import static org.mockito.Mockito.when; 88 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testWrongPassword() 89 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testWrongPassword() 90 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(false); in testWrongPassword() 99 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testChangePin() 100 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testChangePin() 101 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(true); in testChangePin() 111 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testChangePassword() 112 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testChangePassword() 113 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(true); in testChangePassword() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/ |
D | TaskSnapshotSurfaceTest.java | 28 import static org.mockito.Mockito.when; 78 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillHorizontally() 79 when(mockCanvas.getHeight()).thenReturn(100); in fillEmptyBackground_fillHorizontally() 88 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_fillVertically() 89 when(mockCanvas.getHeight()).thenReturn(200); in fillEmptyBackground_fillVertically() 98 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillBoth() 99 when(mockCanvas.getHeight()).thenReturn(200); in fillEmptyBackground_fillBoth() 109 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_sameSize() 110 when(mockCanvas.getHeight()).thenReturn(100); in fillEmptyBackground_dontFill_sameSize() 119 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_bitmapLarger() [all …]
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ |
D | ImageReaderTest.java | 85 when(mReader.acquireNextImage()).thenReturn(null); in testGetLatestImageEmpty() 86 when(mReader.acquireNextImageNoThrowISE()).thenReturn(null); in testGetLatestImageEmpty() 95 when(mReader.acquireNextImage()).thenReturn(mImage1); in testGetLatestImage1() 96 when(mReader.acquireNextImageNoThrowISE()).thenReturn(null); in testGetLatestImage1() 106 when(mReader.acquireNextImage()).thenReturn(mImage1); in testGetLatestImage2() 107 when(mReader.acquireNextImageNoThrowISE()).thenReturn(mImage2).thenReturn(null); in testGetLatestImage2() 118 when(mReader.acquireNextImage()).thenReturn(mImage1); in testGetLatestImage3() 119 when(mReader.acquireNextImageNoThrowISE()).thenReturn(mImage2). in testGetLatestImage3() 133 when(mReader.acquireNextImage()).thenThrow(new IllegalStateException()); in testGetLatestImageTooManyBuffersAcquiredEmpty() 146 when(mReader.acquireNextImage()).thenReturn(mImage1); in testGetLatestImageExceptionalError() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
D | RestrictedLockUtilsTest.java | 28 import static org.mockito.Mockito.when; 68 when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE)) in setUp() 70 when(mContext.getSystemService(Context.USER_SERVICE)) in setUp() 90 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesDisabled_oneEnforcedAdminForManagedProfile() 103 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesDisabled_multipleEnforcedAdminForManagedProfile() 105 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin2, mUserId)) in checkIfKeyguardFeaturesDisabled_multipleEnforcedAdminForManagedProfile() 118 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 121 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 123 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin2, mProfileId)) in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 147 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() [all …]
|