Loading android/app/src/com/android/bluetooth/gatt/ContextMap.java +6 −11 Original line number Diff line number Diff line Loading @@ -291,28 +291,23 @@ import java.util.UUID; /** * Logs debug information. */ void dump() { StringBuilder b = new StringBuilder(); b.append( "-------------- GATT Context Map ----------------"); b.append("\nEntries: " + mApps.size()); void dump(StringBuilder sb) { sb.append(" Entries: " + mApps.size() + "\n"); Iterator<App> i = mApps.iterator(); while(i.hasNext()) { App entry = i.next(); List<Connection> connections = getConnectionByApp(entry.id); b.append("\n\nApplication Id: " + entry.id); b.append("\nUUID: " + entry.uuid); b.append("\nConnections: " + connections.size()); sb.append("\n Application Id: " + entry.id + "\n"); sb.append(" UUID: " + entry.uuid + "\n"); sb.append(" Connections: " + connections.size() + "\n"); Iterator<Connection> ii = connections.iterator(); while(ii.hasNext()) { Connection connection = ii.next(); b.append("\n " + connection.connId + ": " + connection.address); sb.append(" " + connection.connId + ": " + connection.address + "\n"); } } b.append("\n------------------------------------------------"); Log.d(TAG, b.toString()); } } android/app/src/com/android/bluetooth/gatt/GattDebugUtils.java +1 −21 Original line number Diff line number Diff line Loading @@ -28,13 +28,6 @@ import java.util.UUID; private static final String TAG = GattServiceConfig.TAG_PREFIX + "DebugUtils"; private static final boolean DEBUG_ADMIN = GattServiceConfig.DEBUG_ADMIN; private static final String ACTION_DEBUG_DUMP_CLIENTMAP = "android.bluetooth.action.DEBUG_DUMP_CLIENTMAP"; private static final String ACTION_DEBUG_DUMP_SERVERMAP = "android.bluetooth.action.DEBUG_DUMP_SERVERMAP"; private static final String ACTION_DEBUG_DUMP_HANDLEMAP = "android.bluetooth.action.DEBUG_DUMP_HANDLEMAP"; private static final String ACTION_GATT_PAIRING_CONFIG = "android.bluetooth.action.GATT_PAIRING_CONFIG"; Loading Loading @@ -81,24 +74,11 @@ import java.util.UUID; String action = intent.getAction(); Log.d(TAG, "handleDebugAction() action=" + action); /* * Debug log functinos */ if (ACTION_DEBUG_DUMP_CLIENTMAP.equals(action)) { svc.mClientMap.dump(); } else if (ACTION_DEBUG_DUMP_SERVERMAP.equals(action)) { svc.mServerMap.dump(); } else if (ACTION_DEBUG_DUMP_HANDLEMAP.equals(action)) { svc.mHandleMap.dump(); /* * PTS test commands */ } else if (ACTION_GATT_TEST_USAGE.equals(action)) { if (ACTION_GATT_TEST_USAGE.equals(action)) { logUsageInfo(); } else if (ACTION_GATT_TEST_ENABLE.equals(action)) { Loading android/app/src/com/android/bluetooth/gatt/GattService.java +9 −0 Original line number Diff line number Diff line Loading @@ -2203,6 +2203,15 @@ public class GattService extends ProfileService { println(sb, " " + declaration); } println(sb, "mMaxScanFilters: " + mMaxScanFilters); sb.append("\nGATT Client Map\n"); mClientMap.dump(sb); sb.append("\nGATT Server Map\n"); mServerMap.dump(sb); sb.append("\nGATT Handle Map\n"); mHandleMap.dump(sb); } /************************************************************************** Loading android/app/src/com/android/bluetooth/gatt/HandleMap.java +10 −13 Original line number Diff line number Diff line Loading @@ -196,31 +196,28 @@ class HandleMap { /** * Logs debug information. */ void dump() { StringBuilder b = new StringBuilder(); b.append( "-------------- GATT Handle Map -----------------"); b.append("\nEntries: " + mEntries.size()); b.append("\nRequests: " + mRequestMap.size()); void dump(StringBuilder sb) { sb.append(" Entries: " + mEntries.size() + "\n"); sb.append(" Requests: " + mRequestMap.size() + "\n"); for (Entry entry : mEntries) { b.append("\n" + entry.serverIf + ": [" + entry.handle + "] "); sb.append(" " + entry.serverIf + ": [" + entry.handle + "] "); switch(entry.type) { case TYPE_SERVICE: b.append("Service " + entry.uuid); b.append(", started " + entry.started); sb.append("Service " + entry.uuid); sb.append(", started " + entry.started); break; case TYPE_CHARACTERISTIC: b.append(" Characteristic " + entry.uuid); sb.append(" Characteristic " + entry.uuid); break; case TYPE_DESCRIPTOR: b.append(" Descriptor " + entry.uuid); sb.append(" Descriptor " + entry.uuid); break; } } b.append("\n------------------------------------------------"); Log.d(TAG, b.toString()); sb.append("\n"); } } } Loading
android/app/src/com/android/bluetooth/gatt/ContextMap.java +6 −11 Original line number Diff line number Diff line Loading @@ -291,28 +291,23 @@ import java.util.UUID; /** * Logs debug information. */ void dump() { StringBuilder b = new StringBuilder(); b.append( "-------------- GATT Context Map ----------------"); b.append("\nEntries: " + mApps.size()); void dump(StringBuilder sb) { sb.append(" Entries: " + mApps.size() + "\n"); Iterator<App> i = mApps.iterator(); while(i.hasNext()) { App entry = i.next(); List<Connection> connections = getConnectionByApp(entry.id); b.append("\n\nApplication Id: " + entry.id); b.append("\nUUID: " + entry.uuid); b.append("\nConnections: " + connections.size()); sb.append("\n Application Id: " + entry.id + "\n"); sb.append(" UUID: " + entry.uuid + "\n"); sb.append(" Connections: " + connections.size() + "\n"); Iterator<Connection> ii = connections.iterator(); while(ii.hasNext()) { Connection connection = ii.next(); b.append("\n " + connection.connId + ": " + connection.address); sb.append(" " + connection.connId + ": " + connection.address + "\n"); } } b.append("\n------------------------------------------------"); Log.d(TAG, b.toString()); } }
android/app/src/com/android/bluetooth/gatt/GattDebugUtils.java +1 −21 Original line number Diff line number Diff line Loading @@ -28,13 +28,6 @@ import java.util.UUID; private static final String TAG = GattServiceConfig.TAG_PREFIX + "DebugUtils"; private static final boolean DEBUG_ADMIN = GattServiceConfig.DEBUG_ADMIN; private static final String ACTION_DEBUG_DUMP_CLIENTMAP = "android.bluetooth.action.DEBUG_DUMP_CLIENTMAP"; private static final String ACTION_DEBUG_DUMP_SERVERMAP = "android.bluetooth.action.DEBUG_DUMP_SERVERMAP"; private static final String ACTION_DEBUG_DUMP_HANDLEMAP = "android.bluetooth.action.DEBUG_DUMP_HANDLEMAP"; private static final String ACTION_GATT_PAIRING_CONFIG = "android.bluetooth.action.GATT_PAIRING_CONFIG"; Loading Loading @@ -81,24 +74,11 @@ import java.util.UUID; String action = intent.getAction(); Log.d(TAG, "handleDebugAction() action=" + action); /* * Debug log functinos */ if (ACTION_DEBUG_DUMP_CLIENTMAP.equals(action)) { svc.mClientMap.dump(); } else if (ACTION_DEBUG_DUMP_SERVERMAP.equals(action)) { svc.mServerMap.dump(); } else if (ACTION_DEBUG_DUMP_HANDLEMAP.equals(action)) { svc.mHandleMap.dump(); /* * PTS test commands */ } else if (ACTION_GATT_TEST_USAGE.equals(action)) { if (ACTION_GATT_TEST_USAGE.equals(action)) { logUsageInfo(); } else if (ACTION_GATT_TEST_ENABLE.equals(action)) { Loading
android/app/src/com/android/bluetooth/gatt/GattService.java +9 −0 Original line number Diff line number Diff line Loading @@ -2203,6 +2203,15 @@ public class GattService extends ProfileService { println(sb, " " + declaration); } println(sb, "mMaxScanFilters: " + mMaxScanFilters); sb.append("\nGATT Client Map\n"); mClientMap.dump(sb); sb.append("\nGATT Server Map\n"); mServerMap.dump(sb); sb.append("\nGATT Handle Map\n"); mHandleMap.dump(sb); } /************************************************************************** Loading
android/app/src/com/android/bluetooth/gatt/HandleMap.java +10 −13 Original line number Diff line number Diff line Loading @@ -196,31 +196,28 @@ class HandleMap { /** * Logs debug information. */ void dump() { StringBuilder b = new StringBuilder(); b.append( "-------------- GATT Handle Map -----------------"); b.append("\nEntries: " + mEntries.size()); b.append("\nRequests: " + mRequestMap.size()); void dump(StringBuilder sb) { sb.append(" Entries: " + mEntries.size() + "\n"); sb.append(" Requests: " + mRequestMap.size() + "\n"); for (Entry entry : mEntries) { b.append("\n" + entry.serverIf + ": [" + entry.handle + "] "); sb.append(" " + entry.serverIf + ": [" + entry.handle + "] "); switch(entry.type) { case TYPE_SERVICE: b.append("Service " + entry.uuid); b.append(", started " + entry.started); sb.append("Service " + entry.uuid); sb.append(", started " + entry.started); break; case TYPE_CHARACTERISTIC: b.append(" Characteristic " + entry.uuid); sb.append(" Characteristic " + entry.uuid); break; case TYPE_DESCRIPTOR: b.append(" Descriptor " + entry.uuid); sb.append(" Descriptor " + entry.uuid); break; } } b.append("\n------------------------------------------------"); Log.d(TAG, b.toString()); sb.append("\n"); } } }