Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba9d8939 authored by Adam Lesinski's avatar Adam Lesinski
Browse files

BatteryStats: Don't log BluetoothScanTimer when it doesn't exist

Bug:27998591
Change-Id: I80ca8a2353141c16595b4be0b0aed195f40e366a
parent 2b05239a
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -3094,14 +3094,8 @@ public abstract class BatteryStats implements Parcelable {
            dumpControllerActivityLine(pw, uid, category, WIFI_CONTROLLER_DATA,
                    u.getWifiControllerActivity(), which);

            // Dump Bluetooth scan data, per UID.
            final long bleScanTimeUs = u.getBluetoothScanTimer().getTotalTimeLocked(
            dumpTimer(pw, uid, category, BLUETOOTH_MISC_DATA, u.getBluetoothScanTimer(),
                    rawRealtime, which);
            final int bleScanCount = u.getBluetoothScanTimer().getCountLocked(which);
            if (bleScanTimeUs != 0 || bleScanCount != 0) {
                dumpLine(pw, uid, category, BLUETOOTH_MISC_DATA,
                        bleScanTimeUs / 1000, bleScanCount);
            }

            dumpControllerActivityLine(pw, uid, category, BLUETOOTH_CONTROLLER_DATA,
                    u.getBluetoothControllerActivity(), which);