diff options
author | hughchen <hughchen@google.com> | 2020-05-05 11:26:28 +0800 |
---|---|---|
committer | hughchen <hughchen@google.com> | 2020-05-05 11:26:28 +0800 |
commit | 47994dea19690658137b2cda6f3697ace2aeb120 (patch) | |
tree | 90f32232789ca198eb6691d98de75c9ce5109f32 /src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java | |
parent | 2b42301a6ec9cd439fd8acd8f6f3adda7fb73bb0 (diff) | |
download | packages_apps_Settings-47994dea19690658137b2cda6f3697ace2aeb120.tar.gz packages_apps_Settings-47994dea19690658137b2cda6f3697ace2aeb120.tar.bz2 packages_apps_Settings-47994dea19690658137b2cda6f3697ace2aeb120.zip |
Add log for debug
This CL use flag to decide which log should be show on.
This flag can be dynamic turn on when use below command:
adb shell setprop log.tag."your tag" VERBOSE
Bug: 155121301
Test: manually test
Change-Id: I0f3a28c11f6bd055efc84feb41d646b6c033f5b7
Diffstat (limited to 'src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java')
-rw-r--r-- | src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java b/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java index a0633274b5..a86b441c3b 100644 --- a/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java +++ b/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java @@ -63,6 +63,7 @@ public class AdvancedBluetoothDetailsHeaderController extends BasePreferenceCont LifecycleObserver, OnStart, OnStop, OnDestroy, CachedBluetoothDevice.Callback { private static final String TAG = "AdvancedBtHeaderCtrl"; private static final int LOW_BATTERY_LEVEL = 15; + private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG); @VisibleForTesting LayoutPreference mLayoutPreference; @@ -215,6 +216,11 @@ public class AdvancedBluetoothDetailsHeaderController extends BasePreferenceCont final int batteryLevel = BluetoothUtils.getIntMetaData(bluetoothDevice, batteryMetaKey); final boolean charging = BluetoothUtils.getBooleanMetaData(bluetoothDevice, chargeMetaKey); + if (DBG) { + Log.d(TAG, "updateSubLayout() icon : " + iconMetaKey + ", battery : " + batteryMetaKey + + ", charge : " + chargeMetaKey + ", batteryLevel : " + batteryLevel + + ", charging : " + charging + ", iconUri : " + iconUri); + } if (batteryLevel != BluetoothUtils.META_INT_ERROR) { linearLayout.setVisibility(View.VISIBLE); final TextView textView = linearLayout.findViewById(R.id.bt_battery_summary); @@ -268,6 +274,9 @@ public class AdvancedBluetoothDetailsHeaderController extends BasePreferenceCont final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); final String iconUri = BluetoothUtils.getStringMetaData(bluetoothDevice, BluetoothDevice.METADATA_MAIN_ICON); + if (DBG) { + Log.d(TAG, "updateDisconnectLayout() iconUri : " + iconUri); + } if (iconUri != null) { final ImageView imageView = linearLayout.findViewById(R.id.header_icon); updateIcon(imageView, iconUri); |