Loading src/com/android/bluetooth/btservice/AdapterService.java +12 −2 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ public class AdapterService extends Service { private static final int MIN_OFFLOADED_SCAN_STORAGE_BYTES = 1024; //For Debugging only private static int sRefCount = 0; private long mBluetoothStartTime = 0; private int mStackReportedState; private int mTxTimeTotalMs; Loading Loading @@ -1361,6 +1362,7 @@ public class AdapterService extends Service { mQuietmode = quietMode; Message m = mAdapterStateMachine.obtainMessage(AdapterState.BLE_TURN_ON); mAdapterStateMachine.sendMessage(m); mBluetoothStartTime = System.currentTimeMillis(); return true; } Loading Loading @@ -2112,11 +2114,19 @@ public class AdapterService extends Service { } } long onDuration = System.currentTimeMillis() - mBluetoothStartTime; String onDurationString = String.format("%02d:%02d:%02d.%03d", (int)(onDuration / (1000 * 60 * 60)), (int)((onDuration / (1000 * 60)) % 60), (int)((onDuration / 1000) % 60), (int)(onDuration % 1000)); writer.println("Bluetooth Status"); writer.println(" enabled: " + isEnabled()); writer.println(" state: " + getState()); writer.println(" address: " + getAddress()); writer.println(" name: " + getName() + "\n"); writer.println(" name: " + getName()); writer.println(" time since enabled: " + onDurationString + "\n"); writer.println("Bonded devices:"); for (BluetoothDevice device : getBondedDevices()) { Loading Loading
src/com/android/bluetooth/btservice/AdapterService.java +12 −2 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ public class AdapterService extends Service { private static final int MIN_OFFLOADED_SCAN_STORAGE_BYTES = 1024; //For Debugging only private static int sRefCount = 0; private long mBluetoothStartTime = 0; private int mStackReportedState; private int mTxTimeTotalMs; Loading Loading @@ -1361,6 +1362,7 @@ public class AdapterService extends Service { mQuietmode = quietMode; Message m = mAdapterStateMachine.obtainMessage(AdapterState.BLE_TURN_ON); mAdapterStateMachine.sendMessage(m); mBluetoothStartTime = System.currentTimeMillis(); return true; } Loading Loading @@ -2112,11 +2114,19 @@ public class AdapterService extends Service { } } long onDuration = System.currentTimeMillis() - mBluetoothStartTime; String onDurationString = String.format("%02d:%02d:%02d.%03d", (int)(onDuration / (1000 * 60 * 60)), (int)((onDuration / (1000 * 60)) % 60), (int)((onDuration / 1000) % 60), (int)(onDuration % 1000)); writer.println("Bluetooth Status"); writer.println(" enabled: " + isEnabled()); writer.println(" state: " + getState()); writer.println(" address: " + getAddress()); writer.println(" name: " + getName() + "\n"); writer.println(" name: " + getName()); writer.println(" time since enabled: " + onDurationString + "\n"); writer.println("Bonded devices:"); for (BluetoothDevice device : getBondedDevices()) { Loading