/packages/services/Car/tests/carservice_unit_test/src/com/android/car/power/ |
D | SilentModeHandlerUnitTest.java | 71 SilentModeHandler handler = new SilentModeHandler(mCarPowerManagementService, in testSilentModeHwStateMonitoring() local 74 handler.init(); in testSilentModeHwStateMonitoring() 78 assertSilentMode(handler, /* isForcedMode= */ false, /* expectedMode= */ true); in testSilentModeHwStateMonitoring() 82 assertSilentMode(handler, /* isForcedMode= */ false, /* expectedMode= */ false); in testSilentModeHwStateMonitoring() 87 SilentModeHandler handler = new SilentModeHandler(mCarPowerManagementService, in testRebootForForcedSilentMode() local 90 handler.init(); in testRebootForForcedSilentMode() 92 assertWithMessage("Silent mode").that(handler.isSilentMode()).isTrue(); in testRebootForForcedSilentMode() 96 assertWithMessage("Silent mode in forced mode").that(handler.isSilentMode()).isTrue(); in testRebootForForcedSilentMode() 101 SilentModeHandler handler = new SilentModeHandler(mCarPowerManagementService, in testRebootForForcedNonSilentMode() local 104 handler.init(); in testRebootForForcedNonSilentMode() [all …]
|
/packages/services/Car/cpp/powerpolicy/server/tests/ |
D | SilentModeHandlerTest.cpp | 61 explicit SilentModeHandlerPeer(SilentModeHandler* handler) : mHandler(handler) {} in SilentModeHandlerPeer() argument 128 SilentModeHandler handler(carPowerPolicyServer.get()); in TEST_F() local 129 internal::SilentModeHandlerPeer handlerPeer(&handler); in TEST_F() 133 ASSERT_TRUE(handler.isSilentMode()) in TEST_F() 139 ASSERT_TRUE(handler.isSilentMode()) in TEST_F() 144 SilentModeHandler handler(carPowerPolicyServer.get()); in TEST_F() local 145 internal::SilentModeHandlerPeer handlerPeer(&handler); in TEST_F() 149 ASSERT_FALSE(handler.isSilentMode()) in TEST_F() 154 ASSERT_FALSE(handler.isSilentMode()) << "When booting with forced non-silent mode, silent mode " in TEST_F() 159 SilentModeHandler handler(carPowerPolicyServer.get()); in TEST_F() local [all …]
|
D | PowerComponentHandlerTest.cpp | 70 PowerComponentHandlerTest() { handler.init(); } in PowerComponentHandlerTest() 72 PowerComponentHandler handler; member in android::frameworks::automotive::powerpolicy::PowerComponentHandlerTest 76 CarPowerPolicyPtr policy = handler.getAccumulatedPolicy(); in TEST_F() 92 handler.applyPowerPolicy(policy); in TEST_F() 94 ASSERT_TRUE(*handler.getPowerComponentState(PowerComponent::WIFI)); in TEST_F() 95 ASSERT_TRUE(*handler.getPowerComponentState(PowerComponent::NFC)); in TEST_F() 96 ASSERT_FALSE(*handler.getPowerComponentState(PowerComponent::AUDIO)); in TEST_F() 97 ASSERT_FALSE(*handler.getPowerComponentState(PowerComponent::DISPLAY)); in TEST_F() 105 handler.applyPowerPolicy(policy); in TEST_F() 107 ASSERT_TRUE(*handler.getCustomPowerComponentState(CUSTOM_COMPONENT_ID_1000)); in TEST_F() [all …]
|
/packages/modules/DeviceLock/DeviceLockController/tests/robolectric/src/com/android/devicelockcontroller/policy/ |
D | UserRestrictionsPolicyHandlerTest.java | 75 UserRestrictionsPolicyHandler handler = new UserRestrictionsPolicyHandler(mMockDpm, in onProvisionInProgressDebug_withoutKioskPackageName_shouldThrowException() local 81 () -> handler.onProvisionInProgress().get()); in onProvisionInProgressDebug_withoutKioskPackageName_shouldThrowException() 91 UserRestrictionsPolicyHandler handler = new UserRestrictionsPolicyHandler(mMockDpm, in onProvisionInProgress_withoutKioskPackageName_shouldThrowException() local 97 () -> handler.onProvisionInProgress().get()); in onProvisionInProgress_withoutKioskPackageName_shouldThrowException() 112 UserRestrictionsPolicyHandler handler = new UserRestrictionsPolicyHandler(mMockDpm, in onProvisionInProgressDebug_withSetExpectedUserRestrictions() local 117 handler.onProvisionInProgress().get(); in onProvisionInProgressDebug_withSetExpectedUserRestrictions() 136 UserRestrictionsPolicyHandler handler = new UserRestrictionsPolicyHandler(mMockDpm, in onProvisionInProgress_withSetExpectedUserRestrictions() local 141 handler.onProvisionInProgress().get(); in onProvisionInProgress_withSetExpectedUserRestrictions() 161 UserRestrictionsPolicyHandler handler = new UserRestrictionsPolicyHandler(mMockDpm, in onProvisionInProgress_withDisableOutgoingCallShouldSetExpectedUserRestrictions() local 166 handler.onProvisionInProgress().get(); in onProvisionInProgress_withDisableOutgoingCallShouldSetExpectedUserRestrictions() [all …]
|
/packages/modules/Connectivity/service-t/native/libs/libnetworkstats/ |
D | NetworkTracePollerTest.cpp | 105 NetworkTracePoller handler([&](const std::vector<PacketTrace>& pkt) {}); in TEST_F() local 108 EXPECT_FALSE(handler.ConsumeAll()); in TEST_F() 109 ASSERT_TRUE(handler.Start(kNeverPoll)); in TEST_F() 110 EXPECT_TRUE(handler.ConsumeAll()); in TEST_F() 111 ASSERT_TRUE(handler.Stop()); in TEST_F() 112 EXPECT_FALSE(handler.ConsumeAll()); in TEST_F() 118 NetworkTracePoller handler([&](const std::vector<PacketTrace>& pkt) {}); in TEST_F() local 120 ASSERT_TRUE(handler.Start(kNeverPoll)); in TEST_F() 121 EXPECT_TRUE(handler.ConsumeAll()); in TEST_F() 123 ASSERT_TRUE(handler.Start(kNeverPoll)); in TEST_F() [all …]
|
/packages/modules/Uwb/tests/cts/hostsidetests/multidevices/uwb/UwbManagerTests/ |
D | uwb_manager_test.py | 43 self.handler = self.dut.uwb.registerUwbAdapterStateCallback(self.callback) 45 uwb_test_utils.set_uwb_state_and_verify(self.dut, True, self.handler) 58 handler: callback_handler_v2.CallbackHandlerV2, 82 handler: callback_handler_v2.CallbackHandlerV2, 97 dut, event_str, handler 107 uwb_test_utils.set_uwb_state_and_verify(self.dut, False, self.handler) 108 uwb_test_utils.set_uwb_state_and_verify(self.dut, True, self.handler) 112 uwb_test_utils.set_uwb_state_and_verify(self.dut, True, self.handler) 116 self._test_uwb_state_after_reboot(self.dut, False, self.handler) 120 self._test_uwb_state_after_reboot(self.dut, True, self.handler) [all …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
D | Consumers.kt | 34 fun <A> consumeAsync(handler: Handler?, consumer: Consumer<A?>?, value: A?) { in consumeAsync() 35 if (handler == null) { in consumeAsync() 38 handler.post( in consumeAsync() 50 handler: Handler?, in consumeCloseableAsync() 54 if (handler == null) { in consumeCloseableAsync() 57 handler.post( in consumeCloseableAsync() 67 fun <A> createAsyncConsumer(handler: Handler?, consumer: Consumer<A?>?): Consumer<A?> { in createAsyncConsumer() 70 consumeAsync(handler, consumer, value) in createAsyncConsumer() 77 handler: Handler?, in createAsyncCloseableConsumer() 82 consumeCloseableAsync(handler, consumer, value) in createAsyncCloseableConsumer()
|
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/ |
D | AutoReleaseNetworkCallbackRule.kt | 123 handler: Handler? = null in requestNetwork() 125 if (handler == null) { in requestNetwork() 128 cm.requestNetwork(request, it, handler) in requestNetwork() 163 handler: Handler? = null in registerDefaultNetworkCallback() 165 if (handler == null) { in registerDefaultNetworkCallback() 168 cm.registerDefaultNetworkCallback(it, handler) in registerDefaultNetworkCallback() 178 handler: Handler in registerSystemDefaultNetworkCallback() 179 ) = addCallback(cb) { cm.registerSystemDefaultNetworkCallback(it, handler) } in registerSystemDefaultNetworkCallback() 188 handler: Handler in registerDefaultNetworkCallbackForUid() 189 ) = addCallback(cb) { cm.registerDefaultNetworkCallbackForUid(uid, it, handler) } in registerDefaultNetworkCallbackForUid() [all …]
|
/packages/services/Car/car_product/distant_display/apps/CarDistantDisplaySystemUI/src/com/android/systemui/car/appcard/ |
D | AppCardService.kt | 33 private val handler = IncomingHandler(Looper.getMainLooper()) in <lambda>() constant in com.android.systemui.car.appcard.AppCardService 34 private val messenger = Messenger(handler) in <lambda>() 81 val handler = null in <lambda>() constant 84 handler, in <lambda>() 96 val handler = null in <lambda>() constant 99 handler, in <lambda>() 110 val handler = null in <lambda>() constant 111 val message = Message.obtain(handler, msg.what, msg.obj) in <lambda>() 117 val handler = null in <lambda>() constant 118 val message = Message.obtain(handler, msg.what, msg.obj) in <lambda>() [all …]
|
/packages/modules/ImsMedia/service/src/com/android/telephony/imsmedia/ |
D | AudioOffloadListener.java | 33 private Handler handler; field in AudioOffloadListener 47 Utils.sendMessage(handler, in onModifySessionResponse() 54 Utils.sendMessage(handler, AudioSession.EVENT_FIRST_MEDIA_PACKET_IND, in onFirstMediaPacketReceived() 60 Utils.sendMessage(handler, AudioSession.EVENT_RTP_HEADER_EXTENSION_IND, in onHeaderExtensionReceived() 67 Utils.sendMessage(handler, AudioSession.EVENT_MEDIA_QUALITY_STATUS_IND, in notifyMediaQualityStatus() 73 Utils.sendMessage(handler, AudioSession.EVENT_TRIGGER_ANBR_QUERY_IND, in triggerAnbrQuery() 79 Utils.sendMessage(handler, AudioSession.EVENT_DTMF_RECEIVED_IND, dtmfDigit, durationMs); in onDtmfReceived() 84 Utils.sendMessage(handler, AudioSession.EVENT_CALL_QUALITY_CHANGE_IND, in onCallQualityChanged() 88 AudioOffloadListener(Handler handler) { in AudioOffloadListener() argument 89 this.handler = handler; in AudioOffloadListener()
|
/packages/modules/adb/fdevent/ |
D | fdevent_test.cpp | 58 FdHandler* handler = reinterpret_cast<FdHandler*>(userdata); in FdEventCallback() local 61 ASSERT_EQ(fd, handler->read_fd_); in FdEventCallback() 64 handler->queue_.push(c); in FdEventCallback() 65 fdevent_add(handler->write_fde_, FDE_WRITE); in FdEventCallback() 68 ASSERT_EQ(fd, handler->write_fd_); in FdEventCallback() 69 ASSERT_FALSE(handler->queue_.empty()); in FdEventCallback() 70 char c = handler->queue_.front(); in FdEventCallback() 71 handler->queue_.pop(); in FdEventCallback() 73 if (handler->queue_.empty()) { in FdEventCallback() 74 fdevent_del(handler->write_fde_, FDE_WRITE); in FdEventCallback() [all …]
|
/packages/services/Car/cpp/watchdog/server/src/ |
D | LooperWrapper.cpp | 43 void LooperWrapper::sendMessage(const sp<MessageHandler>& handler, const Message& message) { in sendMessage() argument 48 return mLooper->sendMessage(handler, message); in sendMessage() 51 void LooperWrapper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler, in sendMessageAtTime() argument 57 return mLooper->sendMessageAtTime(uptime, handler, message); in sendMessageAtTime() 60 void LooperWrapper::removeMessages(const sp<MessageHandler>& handler) { in removeMessages() argument 65 return mLooper->removeMessages(handler); in removeMessages() 68 void LooperWrapper::removeMessages(const android::sp<MessageHandler>& handler, int what) { in removeMessages() argument 73 return mLooper->removeMessages(handler, what); in removeMessages()
|
/packages/modules/AdServices/sdksandbox/tests/unittest/src/com/android/server/sdksandbox/ |
D | SerialDexLoaderUnitTest.java | 48 TestVerificationHandler handler = new TestVerificationHandler(/*shouldPass=*/ true); in loadSingleDex_succeeds() local 52 mSerialDexLoader.queueApkToLoad(APK_PATH_FILE, "com.test.packagename", handler); in loadSingleDex_succeeds() 54 assertThat(handler.getPassedVerification()).isTrue(); in loadSingleDex_succeeds() 55 assertThat(handler.getLoadedDexCount()).isEqualTo(1); in loadSingleDex_succeeds() 97 TestVerificationHandler handler = new TestVerificationHandler(/*shouldPass=*/ false); in failedSingleVerification() local 99 mSerialDexLoader.queueApkToLoad(APK_PATH_FILE, "com.test.packagename", handler); in failedSingleVerification() 101 assertThat(handler.getPassedVerification()).isFalse(); in failedSingleVerification() 102 assertThat(handler.getLoadedDexCount()).isEqualTo(1); in failedSingleVerification() 107 TestVerificationHandler handler = new TestVerificationHandler(/* shouldPass= */ false); in getDexListFails_handlesException() local 109 mSerialDexLoader.queueApkToLoad(APK_PATH_FILE, "com.test.packagename", handler); in getDexListFails_handlesException() [all …]
|
/packages/modules/Bluetooth/framework/java/android/bluetooth/le/ |
D | PeriodicAdvertisingManager.java | 127 Handler handler) { in registerSync() argument 152 if (handler == null) { in registerSync() 153 handler = new Handler(Looper.getMainLooper()); in registerSync() 156 IPeriodicAdvertisingCallback wrapped = wrap(callback, handler); in registerSync() 236 @Nullable Handler handler) { in transferSetInfo() argument 241 if (handler == null) { in transferSetInfo() 242 handler = new Handler(Looper.getMainLooper()); in transferSetInfo() 244 IPeriodicAdvertisingCallback wrapper = wrap(callback, handler); in transferSetInfo() 258 PeriodicAdvertisingCallback callback, Handler handler) { in wrap() argument 268 handler.post( in wrap() [all …]
|
/packages/modules/Uwb/generic_ranging/tests/multidevices/test_utils/ |
D | uwb_test_utils.py | 32 handler: Optional[callback_handler_v2.CallbackHandlerV2] = None, 49 if handler is None: 51 handler = ad.uwb.registerUwbAdapterStateCallback(callback_key) 55 events = handler.getAll("UwbAdapterStateCallback") 88 handler: Optional[callback_handler_v2.CallbackHandlerV2] = None, 100 asserts.assert_true(verify_uwb_state_callback(ad, event_str, handler), 163 handler: Optional[callback_handler_v2.CallbackHandlerV2] = None, 179 ad=ad, uwb_event="Inactive", handler=handler, timeout=120 193 ad=ad, uwb_event="Inactive", handler=handler, timeout=120
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/sync/ |
D | PickerSyncLockManagerTest.java | 108 Handler handler = new Handler(thread.getLooper()); in testLockTimeout() local 109 acquireLock(handler, lock); in testLockTimeout() 120 releaseLock(handler, lock); in testLockTimeout() 124 private void acquireLock(Handler handler, CloseableReentrantLock lock) in acquireLock() argument 126 handler.post(() -> lock.lock()); in acquireLock() 127 waitForHandler(handler); in acquireLock() 130 private void releaseLock(Handler handler, CloseableReentrantLock lock) in releaseLock() argument 132 handler.post(() -> lock.unlock()); in releaseLock() 133 waitForHandler(handler); in releaseLock() 136 private void waitForHandler(Handler handler) throws InterruptedException, TimeoutException { in waitForHandler() argument [all …]
|
/packages/services/Car/car-lib/src/android/car/ |
D | CarBugreportManager.java | 124 Handler handler) { in CarBugreportManagerCallbackWrapper() argument 126 mWeakHandler = new WeakReference<>(handler); in CarBugreportManagerCallbackWrapper() 132 Handler handler = mWeakHandler.get(); in onProgress() local 133 if (handler != null && callback != null) { in onProgress() 134 handler.post(() -> callback.onProgress(progress)); in onProgress() 141 Handler handler = mWeakHandler.get(); in onError() local 142 if (handler != null && callback != null) { in onError() 143 handler.post(() -> callback.onError(errorCode)); in onError() 150 Handler handler = mWeakHandler.get(); in onFinished() local 151 if (handler != null && callback != null) { in onFinished() [all …]
|
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/ |
D | MulticastPacketReader.java | 71 @NonNull ParcelFileDescriptor socket, @NonNull Handler handler, in MulticastPacketReader() argument 75 super(handler, new RecvBuffer(buffer, new InetSocketAddress(0 /* port */))); in MulticastPacketReader() 78 mHandler = handler; in MulticastPacketReader() 106 for (PacketHandler handler : mPacketHandlers) { in handlePacket() 107 handler.handlePacket(recvbuf.data, length, recvbuf.src); in handlePacket() 115 public void addPacketHandler(@NonNull PacketHandler handler) { in addPacketHandler() argument 117 mPacketHandlers.add(handler); in addPacketHandler() 124 public void removePacketHandler(@NonNull PacketHandler handler) { in removePacketHandler() argument 126 mPacketHandlers.remove(handler); in removePacketHandler()
|
/packages/services/Car/tests/carservice_test/src/com/android/car/hal/test/ |
D | HidlMockedVehicleHal.java | 88 public void addProperty(VehiclePropConfig config, VehicleHalPropertyHandler handler) { in addProperty() argument 90 mPropertyHandlerMap.put(config.prop, handler); in addProperty() 126 VehicleHalPropertyHandler handler = mPropertyHandlerMap.get(value.prop); in injectEvent() local 127 if (handler != null) { in injectEvent() 128 handler.onPropertySet(value); in injectEvent() 193 VehicleHalPropertyHandler handler = mPropertyHandlerMap.get(requestedPropValue.prop); in get() local 194 if (handler == null) { in get() 198 VehiclePropValue prop = handler.onPropertyGet(requestedPropValue); in get() 212 VehicleHalPropertyHandler handler = mPropertyHandlerMap.get(propValue.prop); in set() local 213 if (handler == null) { in set() [all …]
|
/packages/modules/Telephony/services/QualifiedNetworksService/src/com/android/telephony/qns/wfc/ |
D | WfcActivationHelper.java | 285 EpdgConnectHandler handler = new EpdgConnectHandler(msg.getTarget().getLooper(), msg); in tryEpdgConnectionOverWiFi() local 287 handler.obtainMessage(EVENT_PRE_START_ATTEMPT, timeoutMs, PRE_EPDG_CONNECTION_DELAY_MS) in tryEpdgConnectionOverWiFi() 293 private final EpdgConnectHandler handler; field in WfcActivationHelper.ImsCallback 295 ImsCallback(EpdgConnectHandler handler) { in ImsCallback() argument 296 this.handler = handler; in ImsCallback() 301 if (!handler.waitingForResult) { in onRegistered() 308 handler.sendEmptyMessage(EVENT_RESULT_SUCCESS); in onRegistered() 313 if (!handler.waitingForResult) { in onUnregistered() 318 handler.sendEmptyMessage(EVENT_RESULT_FAILURE_IKEV2); in onUnregistered() 320 handler.obtainMessage( in onUnregistered() [all …]
|
/packages/modules/Telephony/services/QualifiedNetworksService/src/com/android/telephony/qns/ |
D | QnsEventDispatcher.java | 330 synchronized void registerEvent(List<Integer> events, Handler handler) { in registerEvent() argument 333 mEventHandlers.get(event).add(handler); in registerEvent() 336 handlers.add(handler); in registerEvent() 340 notifyImmediately(events, handler); in registerEvent() 354 private synchronized void notifyImmediately(List<Integer> events, Handler handler) { in notifyImmediately() argument 394 updateHandler(handler, QNS_EVENT_WFC_PLATFORM_ENABLED); in notifyImmediately() 396 updateHandler(handler, QNS_EVENT_WFC_PLATFORM_DISABLED); in notifyImmediately() 403 updateHandler(handler, QNS_EVENT_WFC_ENABLED); in notifyImmediately() 405 updateHandler(handler, QNS_EVENT_WFC_DISABLED); in notifyImmediately() 413 updateHandler(handler, QNS_EVENT_WFC_MODE_TO_WIFI_ONLY); in notifyImmediately() [all …]
|
/packages/apps/AvatarPicker/src/tests/unit/java/com/android/avatarpicker/tests/unit/viewmodel/ |
D | DetailsViewModelTest.kt | 43 private lateinit var handler: ResultHandler variable in com.android.avatarpicker.tests.unit.viewmodel.DetailsViewModelTest 52 handler = FakeResultHandler() in setup() 73 val model = DetailsViewModel(useCase, handler) in testNoIllustrations() 98 val model = DetailsViewModel(useCase, handler) in <lambda>() 124 val model = DetailsViewModel(useCase, handler) in <lambda>() 125 Truth.assertThat(handler.getSelected()).isNull() in <lambda>() 126 Truth.assertThat(handler.uiState.value is UiState.None).isTrue() in <lambda>() 127 handler.onSelect(model.groups.value[1][0]) in <lambda>() 128 Truth.assertThat(handler.getSelected()).isNotNull() in <lambda>() 129 Truth.assertThat(handler.uiState.value is UiState.Success<*>).isTrue() in <lambda>()
|
/packages/services/Car/cpp/watchdog/server/tests/ |
D | LooperStub.cpp | 74 void LooperStub::sendMessage(const android::sp<MessageHandler>& handler, const Message& message) { in sendMessage() argument 75 sendMessageAtTime(now(), handler, message); in sendMessage() 78 void LooperStub::sendMessageAtTime(nsecs_t uptime, const android::sp<MessageHandler>& handler, in sendMessageAtTime() argument 81 mHandler = handler; in sendMessageAtTime() 96 void LooperStub::removeMessages(const android::sp<MessageHandler>& handler) { in removeMessages() argument 99 mLooper->removeMessages(handler); in removeMessages() 102 void LooperStub::removeMessages(const android::sp<MessageHandler>& handler, int what) { in removeMessages() argument 113 mLooper->removeMessages(handler, what); in removeMessages()
|
/packages/services/Car/tests/GarageModeTestApp/src/com/google/android/car/garagemode/testapp/ |
D | DishService.java | 89 DishWasherTask(Handler handler, JobParameters jobParameters, int dishNum) { in DishWasherTask() argument 90 mHandler = new WeakReference<Handler>(handler); in DishWasherTask() 111 final Handler handler = mHandler.get(); in onPostExecute() local 112 if (handler == null) { in onPostExecute() 116 Message msg = handler.obtainMessage(MSG_RUN_JOB, mMyDishNum + 1, 0, mJobParameter); in onPostExecute() 117 handler.sendMessageDelayed(msg, DELAY_MS); in onPostExecute() 119 Message msg = handler.obtainMessage(MSG_FINISHED, 0, 0, mJobParameter); in onPostExecute() 120 handler.sendMessage(msg); in onPostExecute()
|
/packages/apps/Dialer/java/com/android/incallui/legacyblocking/ |
D | BlockedNumberContentObserver.java | 44 @NonNull private final Handler handler; field in BlockedNumberContentObserver 65 @NonNull Context context, @NonNull Handler handler, String number, long timeAddedMillis) { in BlockedNumberContentObserver() argument 66 super(handler); in BlockedNumberContentObserver() 68 this.handler = Objects.requireNonNull(handler); in BlockedNumberContentObserver() 100 handler.postDelayed(timeoutRunnable, TIMEOUT_MS); in register() 108 handler.removeCallbacks(timeoutRunnable); in unregister()
|