From 28f76f363c963f90f6d295ee004885a394203602 Mon Sep 17 00:00:00 2001 From: Aleksander Nowakowski Date: Thu, 19 Apr 2018 17:00:01 +0200 Subject: [PATCH] Battery Service handling removed from BleMulticonnectProfileService (moved to ProximityService) --- .../multiconnect/BleMulticonnectProfileService.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/multiconnect/BleMulticonnectProfileService.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/multiconnect/BleMulticonnectProfileService.java index a370a74f..3f6c5151 100644 --- a/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/multiconnect/BleMulticonnectProfileService.java +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/multiconnect/BleMulticonnectProfileService.java @@ -261,12 +261,6 @@ public abstract class BleMulticonnectProfileService extends Service implements B if (!mActivityIsChangingConfiguration) { onRebind(); - // This method will read the Battery Level value from each connected device, if possible and then try to enable battery notifications (if it has NOTIFY property). - // If the Battery Level characteristic has only the NOTIFY property, it will only try to enable notifications. - for (final BleManager manager : mBleManagers.values()) { - if (manager.isConnected()) - manager.readBatteryLevel(); - } } } @@ -286,12 +280,6 @@ public abstract class BleMulticonnectProfileService extends Service implements B if (!mActivityIsChangingConfiguration) { if (!mManagedDevices.isEmpty()) { onUnbind(); - // When we are connected, but the application is not open, we are not really interested in battery level notifications. - // But we will still be receiving other values, if enabled. - for (final BleManager manager : mBleManagers.values()) { - if (manager.isConnected()) - manager.disableBatteryLevelNotifications(); - } } else { // The last activity has disconnected from the service and there are no devices to manage. The service may be stopped. stopSelf();