Loading core/java/android/bluetooth/IBluetooth.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -98,4 +98,7 @@ interface IBluetooth boolean isActivityAndEnergyReportingSupported(); void getActivityEnergyInfoFromController(); BluetoothActivityEnergyInfo reportActivityInfo(); // for dumpsys support String dump(); } core/java/com/android/internal/util/StateMachine.java +11 −5 Original line number Diff line number Diff line Loading @@ -1940,13 +1940,19 @@ public class StateMachine { * @param args */ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println(getName() + ":"); pw.println(" total records=" + getLogRecCount()); pw.println(this.toString()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getName() + ":\n"); sb.append(" total records=" + getLogRecCount() + "\n"); for (int i = 0; i < getLogRecSize(); i++) { pw.printf(" rec[%d]: %s\n", i, getLogRec(i).toString()); pw.flush(); sb.append(" rec[" + i + "]: " + getLogRec(i).toString() + "\n"); } pw.println("curState=" + getCurrentState().getName()); sb.append("curState=" + getCurrentState().getName()); return sb.toString(); } /** Loading services/core/java/com/android/server/BluetoothManagerService.java +21 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,10 @@ import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; import android.util.Log; import java.io.FileDescriptor; import java.io.PrintWriter; class BluetoothManagerService extends IBluetoothManager.Stub { private static final String TAG = "BluetoothManagerService"; private static final boolean DBG = true; Loading Loading @@ -1282,4 +1286,21 @@ class BluetoothManagerService extends IBluetoothManager.Stub { // todo: notify user to power down and power up phone to make bluetooth work. } } @Override public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { writer.println("enabled: " + mEnable); writer.println("state: " + mState); writer.println("address: " + mAddress); writer.println("name: " + mName); if (mBluetooth == null) { writer.println("Bluetooth Service not connected"); } else { try { writer.println(mBluetooth.dump()); } catch (RemoteException re) { writer.println("RemoteException while calling Bluetooth Service"); } } } } Loading
core/java/android/bluetooth/IBluetooth.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -98,4 +98,7 @@ interface IBluetooth boolean isActivityAndEnergyReportingSupported(); void getActivityEnergyInfoFromController(); BluetoothActivityEnergyInfo reportActivityInfo(); // for dumpsys support String dump(); }
core/java/com/android/internal/util/StateMachine.java +11 −5 Original line number Diff line number Diff line Loading @@ -1940,13 +1940,19 @@ public class StateMachine { * @param args */ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println(getName() + ":"); pw.println(" total records=" + getLogRecCount()); pw.println(this.toString()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getName() + ":\n"); sb.append(" total records=" + getLogRecCount() + "\n"); for (int i = 0; i < getLogRecSize(); i++) { pw.printf(" rec[%d]: %s\n", i, getLogRec(i).toString()); pw.flush(); sb.append(" rec[" + i + "]: " + getLogRec(i).toString() + "\n"); } pw.println("curState=" + getCurrentState().getName()); sb.append("curState=" + getCurrentState().getName()); return sb.toString(); } /** Loading
services/core/java/com/android/server/BluetoothManagerService.java +21 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,10 @@ import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; import android.util.Log; import java.io.FileDescriptor; import java.io.PrintWriter; class BluetoothManagerService extends IBluetoothManager.Stub { private static final String TAG = "BluetoothManagerService"; private static final boolean DBG = true; Loading Loading @@ -1282,4 +1286,21 @@ class BluetoothManagerService extends IBluetoothManager.Stub { // todo: notify user to power down and power up phone to make bluetooth work. } } @Override public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { writer.println("enabled: " + mEnable); writer.println("state: " + mState); writer.println("address: " + mAddress); writer.println("name: " + mName); if (mBluetooth == null) { writer.println("Bluetooth Service not connected"); } else { try { writer.println(mBluetooth.dump()); } catch (RemoteException re) { writer.println("RemoteException while calling Bluetooth Service"); } } } }