Home
last modified time | relevance | path

Searched refs:service (Results 1 – 25 of 1436) sorted by relevance

12345678910>>...58

/packages/modules/Bluetooth/system/bta/test/gatt/
Ddatabase_builder_test.cc65 auto service = result.Services().begin(); in TEST() local
66 ASSERT_EQ(service->handle, 0x0001); in TEST()
67 ASSERT_EQ(service->end_handle, 0x0001); in TEST()
68 ASSERT_EQ(service->is_primary, true); in TEST()
69 ASSERT_EQ(service->uuid, SERVICE_1_UUID); in TEST()
86 auto service = result.Services().begin(); in TEST() local
87 ASSERT_EQ(service->handle, 0x0001); in TEST()
88 ASSERT_EQ(service->end_handle, 0x000f); in TEST()
89 ASSERT_EQ(service->is_primary, true); in TEST()
90 ASSERT_EQ(service->uuid, SERVICE_1_UUID); in TEST()
[all …]
Ddatabase_builder_sample_device_test.cc228 auto service = result.Services().begin(); in TEST() local
229 EXPECT_EQ(service->handle, 0x0001); in TEST()
230 EXPECT_EQ(service->uuid, SERVICE_1_UUID); in TEST()
232 EXPECT_EQ(service->characteristics[0].uuid, SERVICE_1_CHAR_1_UUID); in TEST()
233 EXPECT_EQ(service->characteristics[1].uuid, SERVICE_1_CHAR_2_UUID); in TEST()
234 EXPECT_EQ(service->characteristics[2].uuid, SERVICE_1_CHAR_3_UUID); in TEST()
236 service++; in TEST()
237 EXPECT_EQ(service->uuid, SERVICE_2_UUID); in TEST()
239 service++; in TEST()
240 EXPECT_EQ(service->uuid, SERVICE_3_UUID); in TEST()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/connserv/
DHeadsetClientServiceInterface.java42 private boolean isServiceAvailable(HeadsetClientService service) { in isServiceAvailable() argument
43 if (service == null) { in isServiceAvailable()
51 HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); in dial() local
52 if (!isServiceAvailable(service)) return null; in dial()
53 return service.dial(device, number); in dial()
57 HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); in enterPrivateMode() local
58 if (!isServiceAvailable(service)) return false; in enterPrivateMode()
59 return service.enterPrivateMode(device, index); in enterPrivateMode()
63 HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); in sendDTMF() local
64 if (!isServiceAvailable(service)) return false; in sendDTMF()
[all …]
/packages/modules/StatsD/statsd/tests/e2e/
DPartialBucket_e2e_test.cpp39 void SendConfig(shared_ptr<StatsService>& service, const StatsdConfig& config) { in SendConfig() argument
43 service->addConfiguration(kConfigKey, configAsVec, kCallingUid); in SendConfig()
125 shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr); in TEST() local
126 SendConfig(service, MakeCountMetricConfig({true})); in TEST()
130 service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 1, 100).get()); in TEST()
131 service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 2, 100).get()); in TEST()
133 ConfigMetricsReport report = GetReports(service->mProcessor, start + 3); in TEST()
140 shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr); in TEST() local
141 SendConfig(service, MakeCountMetricConfig({true})); in TEST()
146 service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 1, 100).get()); in TEST()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/
DAdapterService.java1001 private void setProfileServiceState(Class service, int state) { in setProfileServiceState() argument
1003 mStartedProfiles.add(service.getSimpleName()); in setProfileServiceState()
1005 mStartedProfiles.remove(service.getSimpleName()); in setProfileServiceState()
1007 Intent intent = new Intent(this, service); in setProfileServiceState()
1014 for (Class service : services) { in setAllProfileServiceStates()
1017 if (GattService.class.getSimpleName().equals(service.getSimpleName())) { in setAllProfileServiceStates()
1020 setProfileServiceState(service, state); in setAllProfileServiceStates()
1637 AdapterService service = getService(); in getState() local
1638 if (service == null) { in getState()
1642 return service.getState(); in getState()
[all …]
/packages/apps/Nfc/src/com/android/nfc/cardemulation/
DCardEmulationManager.java327 for (ApduServiceInfo service : services) { in verifyDefaults()
328 if (service.hasCategory(CardEmulation.CATEGORY_PAYMENT)) { in verifyDefaults()
330 lastFoundPaymentService = service.getComponent(); in verifyDefaults()
361 ComponentName service = ComponentName.unflattenFromString(name); in getDefaultServiceForCategory() local
362 if (!validateInstalled || service == null) { in getDefaultServiceForCategory()
363 return service; in getDefaultServiceForCategory()
365 return mServiceCache.hasService(userId, service) ? service : null; in getDefaultServiceForCategory()
372 boolean setDefaultServiceForCategoryChecked(int userId, ComponentName service, in setDefaultServiceForCategoryChecked() argument
381 if (service == null || mServiceCache.hasService(userId, service)) { in setDefaultServiceForCategoryChecked()
384 service != null ? service.flattenToString() : null, userId); in setDefaultServiceForCategoryChecked()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/
DNativeInterface.java344 HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); in onConnectionStateChanged() local
345 if (service != null) { in onConnectionStateChanged()
346 service.messageFromNative(event); in onConnectionStateChanged()
360 HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); in onAudioStateChanged() local
361 if (service != null) { in onAudioStateChanged()
362 service.messageFromNative(event); in onAudioStateChanged()
378 HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); in onVrStateChanged() local
379 if (service != null) { in onVrStateChanged()
380 service.messageFromNative(event); in onVrStateChanged()
396 HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); in onNetworkState() local
[all …]
DHeadsetClientService.java296 HeadsetClientService service = getService(source); in connect() local
298 if (service != null) { in connect()
299 defaultValue = service.connect(device); in connect()
311 HeadsetClientService service = getService(source); in disconnect() local
313 if (service != null) { in disconnect()
314 defaultValue = service.disconnect(device); in disconnect()
326 HeadsetClientService service = getService(source); in getConnectedDevices() local
328 if (service != null) { in getConnectedDevices()
329 defaultValue = service.getConnectedDevices(); in getConnectedDevices()
341 HeadsetClientService service = getService(source); in getDevicesMatchingConnectionStates() local
[all …]
/packages/apps/Car/Radio/src/com/android/car/radio/service/
DRadioAppServiceWrapper.java17 package com.android.car.radio.service;
125 public RadioAppServiceWrapper(@NonNull IRadioAppService service) { in RadioAppServiceWrapper() argument
126 Objects.requireNonNull(service); in RadioAppServiceWrapper()
127 mService.set(service); in RadioAppServiceWrapper()
128 initialize(service); in RadioAppServiceWrapper()
131 private void initialize(@NonNull IRadioAppService service) { in initialize() argument
133 service.addCallback(mCallback); in initialize()
206 callService(service -> service.removeCallback(mCallback)); in unbind()
211 private void onServiceConnected(IBinder binder, @NonNull IRadioAppService service) { in onServiceConnected() argument
213 mService.set(service); in onServiceConnected()
[all …]
/packages/modules/ExtServices/java/tests/src/android/ext/services/watchdog/
DExplicitHealthCheckServiceImplUnitTest.java19 import static android.service.watchdog.ExplicitHealthCheckService.PackageConfig;
98 final ExplicitHealthCheckServiceImpl service = getService(); in testInitHealthCheckersWhileNoResolveInfo() local
99 service.onCreate(); in testInitHealthCheckersWhileNoResolveInfo()
101 assertThat(service.mSupportedCheckers).hasSize(0); in testInitHealthCheckersWhileNoResolveInfo()
109 final ExplicitHealthCheckServiceImpl service = getService(); in testInitHealthCheckersWhileApplicationInfoFlagNotSystem() local
110 service.onCreate(); in testInitHealthCheckersWhileApplicationInfoFlagNotSystem()
112 assertThat(service.mSupportedCheckers).hasSize(0); in testInitHealthCheckersWhileApplicationInfoFlagNotSystem()
120 final ExplicitHealthCheckServiceImpl service = getService(); in testInitHealthCheckersWhileHasResolveInfoAndFlagIsSystem() local
121 service.onCreate(); in testInitHealthCheckersWhileHasResolveInfoAndFlagIsSystem()
123 assertThat(service.mSupportedCheckers).hasSize(1); in testInitHealthCheckersWhileHasResolveInfoAndFlagIsSystem()
[all …]
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/mcp/
DMediaControlGattServiceTest.java176 BluetoothGattService service = mGattServiceCaptor.getValue(); in initAllFeaturesGattService() local
177 Assert.assertNotNull(service); in initAllFeaturesGattService()
181 mMcpService.mServerCallback.onServiceAdded(BluetoothGatt.GATT_SUCCESS, service); in initAllFeaturesGattService()
186 return service; in initAllFeaturesGattService()
191 BluetoothGattService service = initAllFeaturesGattService(); in testGattServerFullInitialState() local
195 service.getCharacteristic(MediaControlGattService.UUID_PLAYER_NAME); in testGattServerFullInitialState()
202 characteristic = service.getCharacteristic(MediaControlGattService.UUID_TRACK_TITLE); in testGattServerFullInitialState()
209 characteristic = service.getCharacteristic(MediaControlGattService.UUID_TRACK_DURATION); in testGattServerFullInitialState()
218 characteristic = service.getCharacteristic(MediaControlGattService.UUID_TRACK_POSITION); in testGattServerFullInitialState()
229 characteristic = service.getCharacteristic(MediaControlGattService.UUID_MEDIA_STATE); in testGattServerFullInitialState()
[all …]
/packages/modules/ExtServices/java/tests/src/android/ext/services/resolver/
DLRResolverRankerServiceTest.java31 import android.service.resolver.ResolverTarget;
80 final LRResolverRankerService service = getService(); in testInitModelUnderUserLocked() local
81 service.onBind(new Intent("test")); in testInitModelUnderUserLocked()
83 assertThat(service.mFeatureWeights).isNull(); in testInitModelUnderUserLocked()
91 final LRResolverRankerService service = getService(); in testInitModelWhileNoSharedPreferences() local
92 service.onBind(new Intent("test")); in testInitModelWhileNoSharedPreferences()
94 final ArrayMap<String, Float> featureWeights = service.mFeatureWeights; in testInitModelWhileNoSharedPreferences()
106 final LRResolverRankerService service = getService(); in testInitModelWhileVersionInSharedPreferencesSmallerThanCurrent() local
107 service.onBind(new Intent("test")); in testInitModelWhileVersionInSharedPreferencesSmallerThanCurrent()
109 final ArrayMap<String, Float> featureWeights = service.mFeatureWeights; in testInitModelWhileVersionInSharedPreferencesSmallerThanCurrent()
[all …]
/packages/modules/Bluetooth/framework/java/android/bluetooth/
DBluetoothHeadset.java347 public IBluetoothHeadset getServiceInterface(IBinder service) {
348 return IBluetoothHeadset.Stub.asInterface(service);
411 final IBluetoothHeadset service = getService(); in connect() local
413 if (service == null) { in connect()
419 service.connectWithAttribution(device, mAttributionSource, recv); in connect()
456 final IBluetoothHeadset service = getService(); in disconnect() local
458 if (service == null) { in disconnect()
464 service.disconnectWithAttribution(device, mAttributionSource, recv); in disconnect()
481 final IBluetoothHeadset service = getService(); in getConnectedDevices() local
483 if (service == null) { in getConnectedDevices()
[all …]
DBluetoothHeadsetClient.java737 public IBluetoothHeadsetClient getServiceInterface(IBinder service) {
738 return IBluetoothHeadsetClient.Stub.asInterface(service);
800 final IBluetoothHeadsetClient service = getService(); in connect() local
802 if (service == null) { in connect()
808 service.connect(device, mAttributionSource, recv); in connect()
831 final IBluetoothHeadsetClient service = getService(); in disconnect() local
833 if (service == null) { in disconnect()
839 service.disconnect(device, mAttributionSource, recv); in disconnect()
861 final IBluetoothHeadsetClient service = getService(); in getConnectedDevices() local
863 if (service == null) { in getConnectedDevices()
[all …]
DBluetoothA2dp.java280 public IBluetoothA2dp getServiceInterface(IBinder service) {
281 return IBluetoothA2dp.Stub.asInterface(service);
332 final IBluetoothA2dp service = getService(); in connect() local
334 if (service == null) { in connect()
340 service.connectWithAttribution(device, mAttributionSource, recv); in connect()
378 final IBluetoothA2dp service = getService(); in disconnect() local
380 if (service == null) { in disconnect()
386 service.disconnectWithAttribution(device, mAttributionSource, recv); in disconnect()
403 final IBluetoothA2dp service = getService(); in getConnectedDevices() local
405 if (service == null) { in getConnectedDevices()
[all …]
DBluetoothLeBroadcastAssistant.java314 public IBluetoothLeBroadcastAssistant getServiceInterface(IBinder service) {
315 return IBluetoothLeBroadcastAssistant.Stub.asInterface(service);
367 final IBluetoothLeBroadcastAssistant service = getService(); in getConnectionState() local
369 if (service == null) { in getConnectionState()
374 return service.getConnectionState(sink); in getConnectionState()
397 final IBluetoothLeBroadcastAssistant service = getService(); in getDevicesMatchingConnectionStates() local
399 if (service == null) { in getDevicesMatchingConnectionStates()
404 return service.getDevicesMatchingConnectionStates(states); in getDevicesMatchingConnectionStates()
425 final IBluetoothLeBroadcastAssistant service = getService(); in getConnectedDevices() local
427 if (service == null) { in getConnectedDevices()
[all …]
DBluetoothHapClient.java430 public IBluetoothHapClient getServiceInterface(IBinder service) {
431 return IBluetoothHapClient.Stub.asInterface(service);
446 final IBluetoothHapClient service = getService();
447 if (service != null) {
450 service.registerCallback(mCallback, mAttributionSource, recv);
558 final IBluetoothHapClient service = getService(); in registerCallback() local
559 if (service != null) { in registerCallback()
562 service.registerCallback(mCallback, mAttributionSource, recv); in registerCallback()
612 final IBluetoothHapClient service = getService(); in unregisterCallback() local
613 if (service != null) { in unregisterCallback()
[all …]
DBluetoothLeAudio.java632 public IBluetoothLeAudio getServiceInterface(IBinder service) {
633 return IBluetoothLeAudio.Stub.asInterface(service);
648 final IBluetoothLeAudio service = getService();
649 if (service != null) {
652 service.registerCallback(mCallback,
737 final IBluetoothLeAudio service = getService(); in connect() local
739 if (service == null) { in connect()
745 service.connect(device, mAttributionSource, recv); in connect()
781 final IBluetoothLeAudio service = getService(); in disconnect() local
783 if (service == null) { in disconnect()
[all …]
DBluetoothHidHost.java250 public IBluetoothHidHost getServiceInterface(IBinder service) {
251 return IBluetoothHidHost.Stub.asInterface(service);
298 final IBluetoothHidHost service = getService(); in connect() local
300 if (service == null) { in connect()
306 service.connect(device, mAttributionSource, recv); in connect()
344 final IBluetoothHidHost service = getService(); in disconnect() local
346 if (service == null) { in disconnect()
352 service.disconnect(device, mAttributionSource, recv); in disconnect()
372 final IBluetoothHidHost service = getService(); in getConnectedDevices() local
374 if (service == null) { in getConnectedDevices()
[all …]
DBluetoothDevice.java1490 final IBluetooth service = getService(); in getIdentityAddress() local
1492 if (service == null || !isBluetoothEnabled()) { in getIdentityAddress()
1497 service.getIdentityAddress(mAddress, recv); in getIdentityAddress()
1520 final IBluetooth service = getService(); in getName() local
1522 if (service == null || !isBluetoothEnabled()) { in getName()
1528 service.getRemoteName(this, mAttributionSource, recv); in getName()
1555 final IBluetooth service = getService(); in getType() local
1557 if (service == null || !isBluetoothEnabled()) { in getType()
1563 service.getRemoteType(this, mAttributionSource, recv); in getType()
1584 final IBluetooth service = getService(); in getAlias() local
[all …]
/packages/modules/Bluetooth/system/bta/gatt/
Ddatabase_builder.cc73 Service* service = FindService(database.services, handle); in AddIncludedService() local
74 if (!service) { in AddIncludedService()
85 service->included_services.push_back(IncludedService{ in AddIncludedService()
95 Service* service = FindService(database.services, handle); in AddCharacteristic() local
96 if (!service) { in AddCharacteristic()
101 if (service->end_handle < value_handle) in AddCharacteristic()
104 << loghex(service->end_handle); in AddCharacteristic()
106 service->characteristics.emplace_back(Characteristic{ in AddCharacteristic()
116 Service* service = FindService(database.services, handle); in AddDescriptor() local
117 if (!service) { in AddDescriptor()
[all …]
Ddatabase.cc56 for (Service& service : services) { in FindService()
57 if (handle >= service.handle && handle <= service.end_handle) in FindService()
58 return &service; in FindService()
67 for (const Service& service : services) { in ToString() local
68 tmp << "Service: handle=" << loghex(service.handle) in ToString()
69 << ", end_handle=" << loghex(service.end_handle) in ToString()
70 << ", uuid=" << service.uuid << "\n"; in ToString()
72 for (const auto& is : service.included_services) { in ToString()
79 for (const Characteristic& c : service.characteristics) { in ToString()
99 for (const Service& service : services) { in Serialize() local
[all …]
/packages/services/Car/cpp/watchdog/server/src/
DWatchdogServiceHelper.cpp63 const android::sp<ICarWatchdogServiceForSystem>& service) { in registerService() argument
64 if (service == nullptr) { in registerService()
68 sp<IBinder> binder = BnCarWatchdogServiceForSystem::asBinder(service); in registerService()
84 mService = service; in registerService()
100 Status WatchdogServiceHelper::unregisterService(const sp<ICarWatchdogServiceForSystem>& service) { in unregisterService() argument
101 if (service == nullptr) { in unregisterService()
106 if (sp<IBinder> binder = BnCarWatchdogServiceForSystem::asBinder(service); in unregisterService()
136 sp<ICarWatchdogServiceForSystem> service; in checkIfAlive() local
144 service = mService; in checkIfAlive()
146 return service->checkIfAlive(sessionId, static_cast<aawi::TimeoutLength>(timeout)); in checkIfAlive()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hap/
DHapClientService.java1252 HapClientService service = getService(source); in getConnectedDevices() local
1253 if (service == null) { in getConnectedDevices()
1256 enforceBluetoothPrivilegedPermission(service); in getConnectedDevices()
1257 defaultValue = service.getConnectedDevices(); in getConnectedDevices()
1271 HapClientService service = getService(source); in getDevicesMatchingConnectionStates() local
1272 if (service == null) { in getDevicesMatchingConnectionStates()
1275 enforceBluetoothPrivilegedPermission(service); in getDevicesMatchingConnectionStates()
1276 defaultValue = service.getDevicesMatchingConnectionStates(states); in getDevicesMatchingConnectionStates()
1291 HapClientService service = getService(source); in getConnectionState() local
1292 if (service == null) { in getConnectionState()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hid/
DHidDeviceNativeInterface.java185 HidDeviceService service = HidDeviceService.getHidDeviceService(); in onApplicationStateChanged() local
186 if (service != null) { in onApplicationStateChanged()
187 service.onApplicationStateChangedFromNative(getDevice(address), registered); in onApplicationStateChanged()
196 HidDeviceService service = HidDeviceService.getHidDeviceService(); in onConnectStateChanged() local
197 if (service != null) { in onConnectStateChanged()
198 service.onConnectStateChangedFromNative(getDevice(address), state); in onConnectStateChanged()
207 HidDeviceService service = HidDeviceService.getHidDeviceService(); in onGetReport() local
208 if (service != null) { in onGetReport()
209 service.onGetReportFromNative(type, id, bufferSize); in onGetReport()
218 HidDeviceService service = HidDeviceService.getHidDeviceService(); in onSetReport() local
[all …]

12345678910>>...58