Loading android/app/src/com/android/bluetooth/gatt/ScanManager.java +9 −11 Original line number Diff line number Diff line Loading @@ -269,6 +269,15 @@ public class ScanManager { if (client == null) return; if (mRegularScanClients.contains(client)) { // Update BatteryStats with this workload. try { // The ScanClient passed in just holds the scannerId. We retrieve the real // client, which may have workSource set. ScanClient workClient = mScanNative.getRegularScanClient(client.scannerId); if (workClient != null) mBatteryStats.noteBleScanStopped(workClient.workSource); } catch (RemoteException e) { /* ignore */ } mScanNative.stopRegularScan(client); Loading @@ -279,17 +288,6 @@ public class ScanManager { if (!mScanNative.isOpportunisticScanClient(client)) { mScanNative.configureRegularScanParams(); } // Update BatteryStats with this workload. try { // The ScanClient passed in just holds the scannerId. We retrieve the real client, // which may have workSource set. ScanClient workClient = mScanNative.getRegularScanClient(client.scannerId); if (workClient != null) mBatteryStats.noteBleScanStopped(workClient.workSource); } catch (RemoteException e) { /* ignore */ } } else { mScanNative.stopBatchScan(client); } Loading Loading
android/app/src/com/android/bluetooth/gatt/ScanManager.java +9 −11 Original line number Diff line number Diff line Loading @@ -269,6 +269,15 @@ public class ScanManager { if (client == null) return; if (mRegularScanClients.contains(client)) { // Update BatteryStats with this workload. try { // The ScanClient passed in just holds the scannerId. We retrieve the real // client, which may have workSource set. ScanClient workClient = mScanNative.getRegularScanClient(client.scannerId); if (workClient != null) mBatteryStats.noteBleScanStopped(workClient.workSource); } catch (RemoteException e) { /* ignore */ } mScanNative.stopRegularScan(client); Loading @@ -279,17 +288,6 @@ public class ScanManager { if (!mScanNative.isOpportunisticScanClient(client)) { mScanNative.configureRegularScanParams(); } // Update BatteryStats with this workload. try { // The ScanClient passed in just holds the scannerId. We retrieve the real client, // which may have workSource set. ScanClient workClient = mScanNative.getRegularScanClient(client.scannerId); if (workClient != null) mBatteryStats.noteBleScanStopped(workClient.workSource); } catch (RemoteException e) { /* ignore */ } } else { mScanNative.stopBatchScan(client); } Loading