From ba9d893976f02e003debd14b8685fb60fce7ef8e Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Tue, 12 Apr 2016 12:06:03 -0700 Subject: [PATCH] BatteryStats: Don't log BluetoothScanTimer when it doesn't exist Bug:27998591 Change-Id: I80ca8a2353141c16595b4be0b0aed195f40e366a --- core/java/android/os/BatteryStats.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java index c4528372987f9..773e7dd601c85 100644 --- a/core/java/android/os/BatteryStats.java +++ b/core/java/android/os/BatteryStats.java @@ -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);