Home
last modified time | relevance | path

Searched refs:BatteryService (Results 1 – 16 of 16) sorted by relevance

/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/bas/
DBatteryService.java52 public class BatteryService extends ProfileService { class
59 private static BatteryService sBatteryService;
66 public BatteryService(Context ctx) { in BatteryService() method in BatteryService
147 public static synchronized BatteryService getBatteryService() { in getBatteryService()
162 public static synchronized void setBatteryService(BatteryService instance) { in setBatteryService()
485 private final WeakReference<BatteryService> mServiceRef;
488 private BatteryService getService(AttributionSource source) { in getService()
489 BatteryService service = mServiceRef.get(); in getService()
502 BluetoothBatteryBinder(BatteryService svc) { in BluetoothBatteryBinder()
513 BatteryService service = getService(source); in connect()
[all …]
DBatteryStateMachine.java72 WeakReference<BatteryService> mServiceRef;
78 BatteryStateMachine(BluetoothDevice device, BatteryService service, Looper looper) { in BatteryStateMachine()
96 static BatteryStateMachine make(BluetoothDevice device, BatteryService service, Looper looper) { in make()
206 BatteryService service = mServiceRef.get(); in dispatchConnectionStateChanged()
219 BatteryService service = mServiceRef.get(); in connectGatt()
250 BatteryService service = mServiceRef.get(); in updateBatteryLevel()
258 BatteryService service = mServiceRef.get(); in resetBatteryLevel()
303 BatteryService service = mServiceRef.get(); in processMessage()
/packages/modules/Bluetooth/system/gd/rust/linux/stack/src/
Dbattery_service.rs28 pub struct BatteryService { struct
97 impl BatteryService { impl
104 ) -> BatteryService { in new() argument
359 impl IBatteryService for BatteryService { implementation
423 .send(Message::BatteryService(BatteryServiceActions::OnClientRegistered( in on_client_registered()
441 .send(Message::BatteryService(BatteryServiceActions::OnClientConnectionState( in on_client_connection_state()
457 .send(Message::BatteryService(BatteryServiceActions::OnSearchComplete( in on_search_complete()
474 .send(Message::BatteryService(BatteryServiceActions::OnCharacteristicRead( in on_characteristic_read()
485 .send(Message::BatteryService(BatteryServiceActions::OnNotify(addr, handle, value))) in on_notify()
Dlib.rs33 use crate::battery_service::{BatteryService, BatteryServiceActions};
137 BatteryService(BatteryServiceActions), enumerator
216 battery_service: Arc<Mutex<Box<BatteryService>>>, in dispatch() argument
449 Message::BatteryService(action) => { in dispatch()
Dbluetooth.rs2806 .send(Message::BatteryService( in connect_all_enabled_profiles()
2917 .send(Message::BatteryService( in disconnect_all_enabled_profiles()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/
DRemoteDevicesTest.java26 import com.android.bluetooth.bas.BatteryService;
298 BatteryService oldBatteryService = setBatteryServiceForTesting(mDevice1); in testOnHeadsetStateChangeWithBatteryService_NotResetBatteryLevel()
627 BatteryService oldBatteryService = setBatteryServiceForTesting(mDevice1); in testHeadsetClientDisconnectedWithBatteryService_NotResetBatteryLevel()
666 BatteryService oldBatteryService = setBatteryServiceForTesting(mDevice1); in testUpdateBatteryLevelWithBas_overridesHfpBatteryLevel()
710 BatteryService oldBatteryService = setBatteryServiceForTesting(mDevice1); in testUpdateBatteryLevelWithSameValue_notSendBroadcast()
850 private static BatteryService setBatteryServiceForTesting(BluetoothDevice device) { in setBatteryServiceForTesting()
851 BatteryService newService = mock(BatteryService.class); in setBatteryServiceForTesting()
855 BatteryService oldService = BatteryService.getBatteryService(); in setBatteryServiceForTesting()
856 BatteryService.setBatteryService(newService); in setBatteryServiceForTesting()
861 private static void clearBatteryServiceForTesting(BatteryService service) { in clearBatteryServiceForTesting()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/
DServiceFactory.java21 import com.android.bluetooth.bas.BatteryService;
93 public BatteryService getBatteryService() { in getBatteryService()
94 return BatteryService.getBatteryService(); in getBatteryService()
DConfig.java30 import com.android.bluetooth.bas.BatteryService;
104 new ProfileConfig(BatteryService.isEnabled(), BluetoothProfile.BATTERY),
149 new ProfileConfig(BatteryService.isEnabled(), BluetoothProfile.BATTERY),
DRemoteDevices.java51 import com.android.bluetooth.bas.BatteryService;
1159 BatteryService batteryService = BatteryService.getBatteryService(); in aclStateChangeCallback()
1192 BatteryService batteryService = BatteryService.getBatteryService(); in aclStateChangeCallback()
1601 BatteryService batteryService = BatteryService.getBatteryService(); in hasBatteryService()
DPhonePolicy.java39 import com.android.bluetooth.bas.BatteryService;
317 BatteryService batteryService = mFactory.getBatteryService(); in processInitProfilePriorities()
1029 BatteryService batteryService = mFactory.getBatteryService(); in processConnectOtherProfiles()
DAdapterService.java120 import com.android.bluetooth.bas.BatteryService;
316 private BatteryService mBatteryService;
1517 Map.entry(BluetoothProfile.BATTERY, BatteryService::new),
1999 mBatteryService = BatteryService.getBatteryService(); in initProfileServices()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/bas/
DBatteryServiceBinderTest.java39 @Mock private BatteryService mService;
40 private BatteryService.BluetoothBatteryBinder mBinder;
46 mBinder = new BatteryService.BluetoothBatteryBinder(mService); in setUp()
DBatteryServiceTest.java56 private BatteryService mService;
96 mService = new BatteryService(mTargetContext); in startService()
103 mService = BatteryService.getBatteryService(); in stopService()
110 Assert.assertEquals(mService, BatteryService.getBatteryService()); in testGetBatteryService()
DBatteryStateMachineTest.java75 @Mock private BatteryService mBatteryService;
360 StubBatteryStateMachine(BluetoothDevice device, BatteryService service, Looper looper) { in StubBatteryStateMachine()
/packages/modules/Bluetooth/system/gd/rust/linux/service/src/
Dinterface_manager.rs10 battery_service::BatteryService, bluetooth::Bluetooth, bluetooth::IBluetooth,
62 battery_service: Arc<Mutex<Box<BatteryService>>>, in dispatch() argument
Dmain.rs20 battery_service::BatteryService,
139 let battery_service = Arc::new(Mutex::new(Box::new(BatteryService::new( in main()