Loading framework/java/android/bluetooth/BluetoothProfile.java +24 −0 Original line number Diff line number Diff line Loading @@ -254,4 +254,28 @@ public interface BluetoothProfile { */ public void onServiceDisconnected(int profile); } /** * Convert an integer value of connection state into human readable string * * @param connectionState - One of {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTING}, * {@link #STATE_CONNECTED}, or {@link #STATE_DISCONNECTED} * @return a string representation of the connection state, STATE_UNKNOWN if the state * is not defined * @hide */ static String getConnectionStateName(int connectionState) { switch (connectionState) { case STATE_DISCONNECTED: return "STATE_DISCONNECTED"; case STATE_CONNECTING: return "STATE_CONNECTING"; case STATE_CONNECTED: return "STATE_CONNECTED"; case STATE_DISCONNECTING: return "STATE_DISCONNECTING"; default: return "STATE_UNKNOWN"; } } } Loading
framework/java/android/bluetooth/BluetoothProfile.java +24 −0 Original line number Diff line number Diff line Loading @@ -254,4 +254,28 @@ public interface BluetoothProfile { */ public void onServiceDisconnected(int profile); } /** * Convert an integer value of connection state into human readable string * * @param connectionState - One of {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTING}, * {@link #STATE_CONNECTED}, or {@link #STATE_DISCONNECTED} * @return a string representation of the connection state, STATE_UNKNOWN if the state * is not defined * @hide */ static String getConnectionStateName(int connectionState) { switch (connectionState) { case STATE_DISCONNECTED: return "STATE_DISCONNECTED"; case STATE_CONNECTING: return "STATE_CONNECTING"; case STATE_CONNECTED: return "STATE_CONNECTED"; case STATE_DISCONNECTING: return "STATE_DISCONNECTING"; default: return "STATE_UNKNOWN"; } } }