Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java +1 −1 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ public class A2dpProfile implements LocalBluetoothProfile { return R.string.bluetooth_a2dp_profile_summary_connected; default: return Utils.getConnectionStateSummary(state); return BluetoothUtils.getConnectionStateSummary(state); } } Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java +1 −1 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ final class A2dpSinkProfile implements LocalBluetoothProfile { return R.string.bluetooth_a2dp_profile_summary_connected; default: return Utils.getConnectionStateSummary(state); return BluetoothUtils.getConnectionStateSummary(state); } } Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -379,7 +379,7 @@ public class BluetoothEventManager { Log.w(TAG, "showUnbondMessage: Not displaying any message for reason: " + reason); return; } Utils.showError(context, name, errorMsg); BluetoothUtils.showError(context, name, errorMsg); } } Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/Utils.java→packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +11 −11 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ import com.android.settingslib.graph.BluetoothDeviceLayerDrawable; import java.util.List; public class Utils { public class BluetoothUtils { public static final boolean V = false; // verbose logging public static final boolean D = true; // regular logging Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +20 −15 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import java.util.List; */ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> { private static final String TAG = "CachedBluetoothDevice"; private static final boolean DEBUG = Utils.V; private final Context mContext; private final LocalBluetoothAdapter mLocalAdapter; Loading Loading @@ -103,7 +102,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } public void setHiSyncId(long id) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "setHiSyncId: mDevice " + mDevice + ", id " + id); } mHiSyncId = id; Loading Loading @@ -142,13 +141,15 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } void onProfileStateChanged(LocalBluetoothProfile profile, int newProfileState) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "onProfileStateChanged: profile " + profile + " newProfileState " + newProfileState); } if (mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_TURNING_OFF) { if (Utils.D) Log.d(TAG, " BT Turninig Off...Profile conn state change ignored..."); if (BluetoothUtils.D) { Log.d(TAG, " BT Turninig Off...Profile conn state change ignored..."); } return; } mProfileConnectionState.put(profile, newProfileState); Loading Loading @@ -209,7 +210,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> public void disconnect(LocalBluetoothProfile profile) { if (profile.disconnect(mDevice)) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "Command sent successfully:DISCONNECT " + describe(profile)); } } Loading Loading @@ -256,7 +257,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } } } if (DEBUG) Log.d(TAG, "Preferred profiles = " + preferredProfiles); if (BluetoothUtils.D) Log.d(TAG, "Preferred profiles = " + preferredProfiles); if (preferredProfiles == 0) { connectAutoConnectableProfiles(); Loading Loading @@ -297,7 +298,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> return; } if (profile.connect(mDevice)) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "Command sent successfully:CONNECT " + describe(profile)); } return; Loading Loading @@ -347,10 +348,10 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> if (dev != null) { final boolean successful = dev.removeBond(); if (successful) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "Command sent successfully:REMOVE_BOND " + describe(null)); } } else if (Utils.V) { } else if (BluetoothUtils.V) { Log.v(TAG, "Framework rejected command immediately:REMOVE_BOND " + describe(null)); } Loading @@ -369,7 +370,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> public void clearProfileConnectionState () { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG," Clearing all connection state for dev:" + mDevice.getName()); } for (LocalBluetoothProfile profile :getProfiles()) { Loading Loading @@ -473,7 +474,9 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> if (TextUtils.isEmpty(mName)) { mName = mDevice.getAddress(); if (DEBUG) Log.d(TAG, "Device has no name (yet), use address: " + mName); if (BluetoothUtils.D) { Log.d(TAG, "Device has no name (yet), use address: " + mName); } } } Loading Loading @@ -629,7 +632,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> mProfileManager.updateProfiles(uuids, localUuids, mProfiles, mRemovedProfiles, mLocalNapRoleConnected, mDevice); if (DEBUG) { if (BluetoothUtils.D) { Log.e(TAG, "updating profiles for " + mDevice.getAliasName()); BluetoothClass bluetoothClass = mDevice.getBluetoothClass(); Loading Loading @@ -678,7 +681,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> timeout = MAX_HOGP_DELAY_FOR_AUTO_CONNECT; } if (DEBUG) { if (BluetoothUtils.D) { Log.d(TAG, "onUuidChanged: Time since last connect" + (SystemClock.elapsedRealtime() - mConnectAttempted)); } Loading Loading @@ -995,7 +998,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> switch (connectionStatus) { case BluetoothProfile.STATE_CONNECTING: case BluetoothProfile.STATE_DISCONNECTING: return mContext.getString(Utils.getConnectionStateSummary(connectionStatus)); return mContext.getString( BluetoothUtils.getConnectionStateSummary(connectionStatus)); case BluetoothProfile.STATE_CONNECTED: profileConnected = true; Loading Loading @@ -1090,7 +1094,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> switch (connectionStatus) { case BluetoothProfile.STATE_CONNECTING: case BluetoothProfile.STATE_DISCONNECTING: return mContext.getString(Utils.getConnectionStateSummary(connectionStatus)); return mContext.getString( BluetoothUtils.getConnectionStateSummary(connectionStatus)); case BluetoothProfile.STATE_CONNECTED: profileConnected = true; Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java +1 −1 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ public class A2dpProfile implements LocalBluetoothProfile { return R.string.bluetooth_a2dp_profile_summary_connected; default: return Utils.getConnectionStateSummary(state); return BluetoothUtils.getConnectionStateSummary(state); } } Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java +1 −1 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ final class A2dpSinkProfile implements LocalBluetoothProfile { return R.string.bluetooth_a2dp_profile_summary_connected; default: return Utils.getConnectionStateSummary(state); return BluetoothUtils.getConnectionStateSummary(state); } } Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -379,7 +379,7 @@ public class BluetoothEventManager { Log.w(TAG, "showUnbondMessage: Not displaying any message for reason: " + reason); return; } Utils.showError(context, name, errorMsg); BluetoothUtils.showError(context, name, errorMsg); } } Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/Utils.java→packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +11 −11 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ import com.android.settingslib.graph.BluetoothDeviceLayerDrawable; import java.util.List; public class Utils { public class BluetoothUtils { public static final boolean V = false; // verbose logging public static final boolean D = true; // regular logging Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +20 −15 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import java.util.List; */ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> { private static final String TAG = "CachedBluetoothDevice"; private static final boolean DEBUG = Utils.V; private final Context mContext; private final LocalBluetoothAdapter mLocalAdapter; Loading Loading @@ -103,7 +102,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } public void setHiSyncId(long id) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "setHiSyncId: mDevice " + mDevice + ", id " + id); } mHiSyncId = id; Loading Loading @@ -142,13 +141,15 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } void onProfileStateChanged(LocalBluetoothProfile profile, int newProfileState) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "onProfileStateChanged: profile " + profile + " newProfileState " + newProfileState); } if (mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_TURNING_OFF) { if (Utils.D) Log.d(TAG, " BT Turninig Off...Profile conn state change ignored..."); if (BluetoothUtils.D) { Log.d(TAG, " BT Turninig Off...Profile conn state change ignored..."); } return; } mProfileConnectionState.put(profile, newProfileState); Loading Loading @@ -209,7 +210,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> public void disconnect(LocalBluetoothProfile profile) { if (profile.disconnect(mDevice)) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "Command sent successfully:DISCONNECT " + describe(profile)); } } Loading Loading @@ -256,7 +257,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } } } if (DEBUG) Log.d(TAG, "Preferred profiles = " + preferredProfiles); if (BluetoothUtils.D) Log.d(TAG, "Preferred profiles = " + preferredProfiles); if (preferredProfiles == 0) { connectAutoConnectableProfiles(); Loading Loading @@ -297,7 +298,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> return; } if (profile.connect(mDevice)) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "Command sent successfully:CONNECT " + describe(profile)); } return; Loading Loading @@ -347,10 +348,10 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> if (dev != null) { final boolean successful = dev.removeBond(); if (successful) { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG, "Command sent successfully:REMOVE_BOND " + describe(null)); } } else if (Utils.V) { } else if (BluetoothUtils.V) { Log.v(TAG, "Framework rejected command immediately:REMOVE_BOND " + describe(null)); } Loading @@ -369,7 +370,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> public void clearProfileConnectionState () { if (Utils.D) { if (BluetoothUtils.D) { Log.d(TAG," Clearing all connection state for dev:" + mDevice.getName()); } for (LocalBluetoothProfile profile :getProfiles()) { Loading Loading @@ -473,7 +474,9 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> if (TextUtils.isEmpty(mName)) { mName = mDevice.getAddress(); if (DEBUG) Log.d(TAG, "Device has no name (yet), use address: " + mName); if (BluetoothUtils.D) { Log.d(TAG, "Device has no name (yet), use address: " + mName); } } } Loading Loading @@ -629,7 +632,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> mProfileManager.updateProfiles(uuids, localUuids, mProfiles, mRemovedProfiles, mLocalNapRoleConnected, mDevice); if (DEBUG) { if (BluetoothUtils.D) { Log.e(TAG, "updating profiles for " + mDevice.getAliasName()); BluetoothClass bluetoothClass = mDevice.getBluetoothClass(); Loading Loading @@ -678,7 +681,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> timeout = MAX_HOGP_DELAY_FOR_AUTO_CONNECT; } if (DEBUG) { if (BluetoothUtils.D) { Log.d(TAG, "onUuidChanged: Time since last connect" + (SystemClock.elapsedRealtime() - mConnectAttempted)); } Loading Loading @@ -995,7 +998,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> switch (connectionStatus) { case BluetoothProfile.STATE_CONNECTING: case BluetoothProfile.STATE_DISCONNECTING: return mContext.getString(Utils.getConnectionStateSummary(connectionStatus)); return mContext.getString( BluetoothUtils.getConnectionStateSummary(connectionStatus)); case BluetoothProfile.STATE_CONNECTED: profileConnected = true; Loading Loading @@ -1090,7 +1094,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> switch (connectionStatus) { case BluetoothProfile.STATE_CONNECTING: case BluetoothProfile.STATE_DISCONNECTING: return mContext.getString(Utils.getConnectionStateSummary(connectionStatus)); return mContext.getString( BluetoothUtils.getConnectionStateSummary(connectionStatus)); case BluetoothProfile.STATE_CONNECTED: profileConnected = true; Loading