/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 | 307 doReturn(mSST).when(mTelephonyComponentFactory) in setUp() 309 doReturn(mIccCardProxy).when(mTelephonyComponentFactory) in setUp() 311 doReturn(mCT).when(mTelephonyComponentFactory) in setUp() 313 doReturn(mIccPhoneBookIntManager).when(mTelephonyComponentFactory) in setUp() 315 doReturn(mDcTracker).when(mTelephonyComponentFactory) in setUp() 317 doReturn(mWspTypeDecoder).when(mTelephonyComponentFactory) in setUp() 319 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp() 322 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp() 325 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp() 327 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 | 65 doReturn(mTelephonyRegisteryMock).when(mTelephonyRegisteryMock) in setUp() 81 doReturn(true).when(mPhone).getCallForwardingIndicator(); in testNotifyCallForwarding() 82 doReturn(1).when(mPhone).getSubId(); in testNotifyCallForwarding() 90 doReturn(Phone.DataActivityState.NONE).when(mPhone).getDataActivityState(); in testNotifyDataActivity() 95 doReturn(1).when(mPhone).getSubId(); in testNotifyDataActivity() 96 doReturn(Phone.DataActivityState.DATAIN).when(mPhone).getDataActivityState(); in testNotifyDataActivity() 105 doReturn(99).when(mSignalStrength).getGsmSignalStrength(); in testNotifySignalStrength() 106 doReturn(mSignalStrength).when(mPhone).getSignalStrength(); in testNotifySignalStrength() 115 doReturn(1).when(mPhone).getSubId(); in testNotifySignalStrength() 116 doReturn(2).when(mPhone).getPhoneId(); in testNotifySignalStrength() [all …]
|
D | WapPushOverSmsTest.java | 28 import static org.mockito.Mockito.when; 58 doReturn(mIMmsStub).when(mIMmsStub).queryLocalInterface(anyString()); in setUp() 71 doReturn(true).when(mWspTypeDecoder).decodeUintvarInteger(anyInt()); in testDispatchWapPdu() 72 doReturn(true).when(mWspTypeDecoder).decodeContentType(anyInt()); in testDispatchWapPdu() 73 doReturn((long)2).when(mWspTypeDecoder).getValue32(); in testDispatchWapPdu() 74 doReturn(2).when(mWspTypeDecoder).getDecodedDataLength(); in testDispatchWapPdu() 75 doReturn(WspTypeDecoder.CONTENT_TYPE_B_PUSH_CO).when(mWspTypeDecoder).getValueString(); in testDispatchWapPdu() 118 when(mIMmsStub.getCarrierConfigValues(anyInt())).thenReturn(new Bundle()); in testDispatchWapPduFromBlockedNumber_noIntentsDispatched() 122 doReturn(true).when(mWspTypeDecoder).decodeUintvarInteger(anyInt()); in testDispatchWapPduFromBlockedNumber_noIntentsDispatched() 123 doReturn(true).when(mWspTypeDecoder).decodeContentType(anyInt()); in testDispatchWapPduFromBlockedNumber_noIntentsDispatched() [all …]
|
D | CarrierAppUtilsTest.java | 60 Mockito.when(mPackageManager.getApplicationInfo("com.example.missing.app", in testDisableCarrierAppsUntilPrivileged_MissingApp() 77 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP, in testDisableCarrierAppsUntilPrivileged_NonSystemApp() 101 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP, in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser() 103 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP)) in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser() 121 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP, in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Disabled() 123 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP)) in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Disabled() 141 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP, in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Enabled() 143 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP)) in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Enabled() 161 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP, in testDisableCarrierAppsUntilPrivileged_HasPrivileges_UpdatedApp() 163 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP)) in testDisableCarrierAppsUntilPrivileged_HasPrivileges_UpdatedApp() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiConnectivityManagerTest.java | 78 when(mClock.elapsedRealtime()).thenReturn(SystemClock.elapsedRealtime()); in setUp() 113 when(resource.getInteger(R.integer.config_wifi_framework_SECURITY_AWARD)).thenReturn(80); in mockResource() 114 when(resource.getInteger(R.integer.config_wifi_framework_SAME_BSSID_AWARD)).thenReturn(24); in mockResource() 122 when(context.getResources()).thenReturn(mResource); in mockContext() 123 when(context.getSystemService(Context.ALARM_SERVICE)).thenReturn( in mockContext() 141 }}).when(scanner).startBackgroundScan(anyObject(), anyObject(), anyObject()); in mockWifiScanner() 147 }}).when(scanner).startScan(anyObject(), anyObject(), anyObject()); in mockWifiScanner() 165 }}).when(scanner).startDisconnectedPnoScan(anyObject(), anyObject(), anyObject()); in mockWifiScanner() 171 }}).when(scanner).startConnectedPnoScan(anyObject(), anyObject(), anyObject()); in mockWifiScanner() 179 when(stateMachine.getFrequencyBand()).thenReturn(1); in mockWifiStateMachine() [all …]
|
D | WifiQualifiedNetworkSelectorTest.java | 33 import static org.mockito.Mockito.when; 81 when(mClock.elapsedRealtime()).thenReturn(SystemClock.elapsedRealtime()); in setUp() 118 when(context.getResources()).thenReturn(mResource); in getContext() 119 when(context.getSystemService(Context.NETWORK_SCORE_SERVICE)).thenReturn(mScoreManager); in getContext() 126 when(resource.getInteger(R.integer.config_wifi_framework_SECURITY_AWARD)).thenReturn(80); in getResource() 127 when(resource.getInteger(R.integer.config_wifi_framework_RSSI_SCORE_OFFSET)).thenReturn(85); in getResource() 128 when(resource.getInteger(R.integer.config_wifi_framework_SAME_BSSID_AWARD)).thenReturn(24); in getResource() 129 when(resource.getInteger(R.integer.config_wifi_framework_LAST_SELECTION_AWARD)) in getResource() 131 when(resource.getInteger(R.integer.config_wifi_framework_PASSPOINT_SECURITY_AWARD)) in getResource() 133 when(resource.getInteger(R.integer.config_wifi_framework_SECURITY_AWARD)).thenReturn(80); in getResource() [all …]
|
D | WifiStateMachineTest.java | 117 when(((IInterface) tImpl).asBinder()).thenReturn(binder); in mockService() 118 when(binder.queryLocalInterface(iface.getCanonicalName())) in mockService() 156 when(facade.makeWifiScanner(any(Context.class), any(Looper.class))) in getFrameworkFacade() 158 when(facade.makeBaseLogger()).thenReturn(mock(BaseWifiLogger.class)); in getFrameworkFacade() 159 when(facade.getService(Context.NETWORKMANAGEMENT_SERVICE)).thenReturn( in getFrameworkFacade() 163 when(facade.getService(Context.WIFI_P2P_SERVICE)).thenReturn(p2pBinder); in getFrameworkFacade() 184 when(p2pm.getP2pStateMachineMessenger()).thenReturn(new Messenger(handler)); in getFrameworkFacade() 187 when(facade.getService(BatteryStats.SERVICE_NAME)).thenReturn(batteryStatsBinder); in getFrameworkFacade() 189 when(facade.makeIpManager(any(Context.class), anyString(), any(IpManager.Callback.class))) in getFrameworkFacade() 198 when(facade.checkUidPermission(eq(android.Manifest.permission.OVERRIDE_WIFI_CONFIG), in getFrameworkFacade() [all …]
|
D | WifiLoggerTest.java | 31 import static org.mockito.Mockito.when; 82 when(mWifiNative.getRingBufferStatus()).thenReturn(ringBufferStatuses); in setUp() 83 when(mWifiNative.readKernelLog()).thenReturn(""); in setUp() 84 when(mBuildProperties.isEngBuild()).thenReturn(false); in setUp() 85 when(mBuildProperties.isUserdebugBuild()).thenReturn(false); in setUp() 86 when(mBuildProperties.isUserBuild()).thenReturn(true); in setUp() 109 when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(false); in startLoggingRegistersLogEventHandlerIfPriorAttemptFailed() 114 when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(true); in startLoggingRegistersLogEventHandlerIfPriorAttemptFailed() 125 when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(true); in startLoggingDoesNotRegisterLogEventHandlerIfPriorAttemptSucceeded() 158 when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(true); in stopLoggingResetsLogHandlerIfHandlerWasRegistered() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/ |
D | GsmInboundSmsHandlerTest.java | 306 doReturn(true).when(mTelephonyManager).getSmsReceiveCapableForPhone(anyInt(), anyBoolean()); in setUp() 307 doReturn(true).when(mSmsStorageMonitor).isStorageAvailable(); in setUp() 310 doReturn(true).when(userManager).isUserUnlocked(); in setUp() 313 doReturn(new int[]{UserHandle.USER_SYSTEM}).when(mIActivityManager).getRunningUserIds(); in setUp() 328 doReturn(1).when(mInboundSmsTracker).getMessageCount(); in setUp() 329 doReturn(1).when(mInboundSmsTracker).getReferenceNumber(); in setUp() 330 doReturn("1234567890").when(mInboundSmsTracker).getAddress(); in setUp() 331 doReturn(1).when(mInboundSmsTracker).getSequenceNumber(); in setUp() 332 doReturn(1).when(mInboundSmsTracker).getIndexOffset(); in setUp() 333 doReturn(-1).when(mInboundSmsTracker).getDestPort(); in setUp() [all …]
|
/frameworks/volley/src/test/java/com/android/volley/toolbox/ |
D | AndroidAuthenticatorTest.java | 55 … when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture); in failedGetAuthToken() 56 when(mFuture.getResult()).thenThrow(new AuthenticatorException("sadness!")); in failedGetAuthToken() 65 … when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture); in resultContainsIntent() 66 when(mFuture.getResult()).thenReturn(bundle); in resultContainsIntent() 67 when(mFuture.isDone()).thenReturn(true); in resultContainsIntent() 68 when(mFuture.isCancelled()).thenReturn(false); in resultContainsIntent() 75 … when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture); in missingAuthToken() 76 when(mFuture.getResult()).thenReturn(bundle); in missingAuthToken() 77 when(mFuture.isDone()).thenReturn(true); in missingAuthToken() 78 when(mFuture.isCancelled()).thenReturn(false); in missingAuthToken() [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/native/services/inputflinger/ |
D | InputReader.h | 382 nsecs_t when; member 391 when = other.when; in copyFrom() 398 when = LLONG_MAX; in clear() 423 virtual void requestTimeoutAtTime(nsecs_t when) = 0; 495 virtual void requestTimeoutAtTime(nsecs_t when); 526 void addDeviceLocked(nsecs_t when, int32_t deviceId); 527 void removeDeviceLocked(nsecs_t when, int32_t deviceId); 529 void timeoutExpiredLocked(nsecs_t when); 531 void handleConfigurationChangedLocked(nsecs_t when); 554 void requestTimeoutAtTimeLocked(nsecs_t when); [all …]
|
D | InputReader.cpp | 191 nsecs_t when, int32_t deviceId, uint32_t source, in synthesizeButtonKey() argument 201 NotifyKeyArgs args(when, deviceId, source, policyFlags, in synthesizeButtonKey() 202 action, 0, keyCode, 0, context->getGlobalMetaState(), when); in synthesizeButtonKey() 208 nsecs_t when, int32_t deviceId, uint32_t source, in synthesizeButtonKeys() argument 210 synthesizeButtonKey(context, action, when, deviceId, source, policyFlags, in synthesizeButtonKeys() 213 synthesizeButtonKey(context, action, when, deviceId, source, policyFlags, in synthesizeButtonKeys() 356 addDeviceLocked(rawEvent->when, rawEvent->deviceId); in processEventsLocked() 359 removeDeviceLocked(rawEvent->when, rawEvent->deviceId); in processEventsLocked() 362 handleConfigurationChangedLocked(rawEvent->when); in processEventsLocked() 374 void InputReader::addDeviceLocked(nsecs_t when, int32_t deviceId) { in addDeviceLocked() argument [all …]
|
/frameworks/base/tests/TtsTests/src/com/android/speech/tts/ |
D | TextToSpeechTests.java | 47 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(passThrough) in setUp() 50 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(passThrough) in setUp() 77 … LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE).when(delegate).onIsLanguageAvailable( in testSetLanguage_delegation() 79 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE).when(delegate).onLoadLanguage( in testSetLanguage_delegation() 99 … LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(delegate).onIsLanguageAvailable( in testSetLanguage_availableLanguage() 101 … LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(delegate).onIsLanguageAvailable( in testSetLanguage_availableLanguage() 103 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(delegate).onLoadLanguage( in testSetLanguage_availableLanguage() 124 LittleMock.doReturn(TextToSpeech.LANG_NOT_SUPPORTED).when( in testSetLanguage_unavailableLanguage() 126 LittleMock.doReturn(TextToSpeech.LANG_NOT_SUPPORTED).when( in testSetLanguage_unavailableLanguage() 146 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when( in testIsLanguageAvailable() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | NetworkControllerBaseTest.java | 47 import static org.mockito.Mockito.when; 86 when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(true); in setUp() 87 when(mMockCm.getDefaultNetworkCapabilitiesForUser(0)).thenReturn( in setUp() 111 when(mMockTm.getDataEnabled(mSubId)).thenReturn(true); in setupNetworkController() 120 when(mMockSubDefaults.getDefaultDataSubId()).thenReturn(subId); in setDefaultSubId() 121 when(mMockSubDefaults.getDefaultVoiceSubId()).thenReturn(subId); in setDefaultSubId() 128 when(subscription.getSubscriptionId()).thenReturn(subId); in setSubscriptions() 131 when(mMockSm.getActiveSubscriptionInfoList()).thenReturn(subs); in setSubscriptions() 136 when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false); in setUpNoMobileData() 188 when(mServiceState.getRoaming()).thenReturn(isRoaming); in setGsmRoaming() [all …]
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | WakeupMessageTest.java | 89 when(context.getSystemService(Context.ALARM_SERVICE)).thenReturn(mAlarmManager); in setUp() 91 doNothing().when(mAlarmManager).setExact(anyInt(), anyLong(), any(String.class), in setUp() 106 private void scheduleAndVerifyAlarm(long when) { in scheduleAndVerifyAlarm() argument 107 mMessage.schedule(when); in scheduleAndVerifyAlarm() 108 verify(mAlarmManager).setExact(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(when), in scheduleAndVerifyAlarm() 124 final long when = 1001; in scheduleAndDeliverMessage() local 125 scheduleAndVerifyAlarm(when); in scheduleAndDeliverMessage() 140 final long when = 1010; in scheduleAndCancelMessage() local 141 scheduleAndVerifyAlarm(when); in scheduleAndCancelMessage()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/cdma/ |
D | CdmaInboundSmsHandlerTest.java | 107 doReturn(true).when(userManager).isUserUnlocked(); in setUp() 110 doReturn(new int[]{UserHandle.USER_SYSTEM}).when(mIActivityManager).getRunningUserIds(); in setUp() 117 doReturn(smsPdu).when(mCdmaSmsMessage).getPdu(); in setUp() 119 doReturn(true).when(mTelephonyManager).getSmsReceiveCapableForPhone(anyInt(), anyBoolean()); in setUp() 120 doReturn(true).when(mSmsStorageMonitor).isStorageAvailable(); in setUp() 121 doReturn(1).when(mInboundSmsTracker).getMessageCount(); in setUp() 122 doReturn(-1).when(mInboundSmsTracker).getDestPort(); in setUp() 123 doReturn(mInboundSmsTrackerCV).when(mInboundSmsTracker).getContentValues(); in setUp() 124 doReturn(smsPdu).when(mInboundSmsTracker).getPdu(); in setUp() 165 doReturn(SmsEnvelope.TELESERVICE_WMT).when(mCdmaSmsMessage).getTeleService(); in testNewSms() [all …]
|
/frameworks/base/packages/SettingsLib/tests/src/com/android/settingslib/wifi/ |
D | WifiTrackerTest.java | 80 Mockito.when(mWifiManager.isWifiEnabled()).thenReturn(true); in setUp() 124 Mockito.when(mWifiManager.startScan()).thenReturn(true); in testScanner() 139 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs); in testNetworkSorting() 140 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults); in testNetworkSorting() 163 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs); in testSavedOnly() 164 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults); in testSavedOnly() 187 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs); in testSavedOnlyNoLooper() 188 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults); in testSavedOnlyNoLooper() 211 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs); in testAvailableOnly() 212 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults); in testAvailableOnly() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | ApConfigUtilTest.java | 21 import static org.mockito.Mockito.when; 188 when(mWifiNative.isHalStarted()).thenReturn(false); in updateApChannelConfigWithoutHal() 205 when(mWifiNative.isHalStarted()).thenReturn(true); in updateApChannelConfig5GBandNoCountryCode() 219 when(mWifiNative.isHalStarted()).thenReturn(true); in updateApChannelConfigWithChannelSpecified() 235 when(mWifiNative.isHalStarted()).thenReturn(true); in updateApChannelConfigWith5GBandNoChannelAllowed() 236 when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ)) in updateApChannelConfigWith5GBandNoChannelAllowed() 238 when(mWifiNative.isGetChannelsForBandSupported()).thenReturn(true); in updateApChannelConfigWith5GBandNoChannelAllowed() 252 when(mWifiNative.isHalStarted()).thenReturn(true); in updateApChannelConfigWithoutChannelsForBandSupported() 253 when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ)) in updateApChannelConfigWithoutChannelsForBandSupported() 255 when(mWifiNative.isGetChannelsForBandSupported()).thenReturn(false); in updateApChannelConfigWithoutChannelsForBandSupported()
|
/frameworks/base/core/tests/coretests/src/android/print/ |
D | BasePrintTest.java | 23 import static org.mockito.Mockito.when; 265 doCallRealMethod().when(callbacks).setSession(any(StubbablePrinterDiscoverySession.class)); in createMockPrinterDiscoverySessionCallbacks() 266 when(callbacks.getSession()).thenCallRealMethod(); in createMockPrinterDiscoverySessionCallbacks() 269 doAnswer(onStartPrinterDiscovery).when(callbacks).onStartPrinterDiscovery( in createMockPrinterDiscoverySessionCallbacks() 273 doAnswer(onStopPrinterDiscovery).when(callbacks).onStopPrinterDiscovery(); in createMockPrinterDiscoverySessionCallbacks() 276 doAnswer(onValidatePrinters).when(callbacks).onValidatePrinters( in createMockPrinterDiscoverySessionCallbacks() 280 doAnswer(onStartPrinterStateTracking).when(callbacks).onStartPrinterStateTracking( in createMockPrinterDiscoverySessionCallbacks() 284 doAnswer(onRequestCustomPrinterIcon).when(callbacks).onRequestCustomPrinterIcon( in createMockPrinterDiscoverySessionCallbacks() 289 doAnswer(onStopPrinterStateTracking).when(callbacks).onStopPrinterStateTracking( in createMockPrinterDiscoverySessionCallbacks() 293 doAnswer(onDestroy).when(callbacks).onDestroy(); in createMockPrinterDiscoverySessionCallbacks() [all …]
|
/frameworks/base/include/androidfw/ |
D | ZipUtils.h | 70 static inline void zipTimeToTimespec(uint32_t when, struct tm* timespec) { in zipTimeToTimespec() argument 71 const uint32_t date = when >> 16; in zipTimeToTimespec() 78 timespec->tm_hour = (when >> 11) & 0x1F; in zipTimeToTimespec() 79 timespec->tm_min = (when >> 5) & 0x3F; in zipTimeToTimespec() 80 timespec->tm_sec = (when & 0x1F) << 1; in zipTimeToTimespec()
|
/frameworks/base/core/java/android/os/ |
D | MessageQueue.java | 101 return mMessages == null || now < mMessages.when; in isIdle() 338 if (now < msg.when) { in next() 340 nextPollTimeoutMillis = (int) Math.min(msg.when - now, Integer.MAX_VALUE); in next() 369 && (mMessages == null || now < mMessages.when)) { in next() 462 private int postSyncBarrier(long when) { in postSyncBarrier() argument 469 msg.when = when; in postSyncBarrier() 474 if (when != 0) { in postSyncBarrier() 475 while (p != null && p.when <= when) { in postSyncBarrier() 533 boolean enqueueMessage(Message msg, long when) { in enqueueMessage() argument 551 msg.when = when; in enqueueMessage() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/net/ |
D | NetworkStatsAccessTest.java | 19 import static org.mockito.Mockito.when; 58 when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTm); in setUp() 59 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOps); in setUp() 150 when(mTm.checkCarrierPrivilegesForPackage(TEST_PKG)).thenReturn( in setHasCarrierPrivileges() 156 when(mDpmi.isActiveAdminWithPolicy(TEST_UID, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER)) in setIsDeviceOwner() 161 when(mDpmi.isActiveAdminWithPolicy(TEST_UID, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER)) in setIsProfileOwner() 166 when(mAppOps.checkOp(AppOpsManager.OP_GET_USAGE_STATS, TEST_UID, TEST_PKG)) in setHasAppOpsPermission() 168 when(mContext.checkCallingPermission(Manifest.permission.PACKAGE_USAGE_STATS)).thenReturn( in setHasAppOpsPermission() 174 when(mContext.checkCallingOrSelfPermission(permission.READ_NETWORK_USAGE_HISTORY)) in setHasReadHistoryPermission()
|