Merge "Add logs to debug anr issues" into main
This commit is contained in:
@@ -296,6 +296,10 @@ public final class BluetoothDevicePreference extends GearPreference {
|
|||||||
void onPreferenceAttributesChanged() {
|
void onPreferenceAttributesChanged() {
|
||||||
try {
|
try {
|
||||||
ThreadUtils.postOnBackgroundThread(() -> {
|
ThreadUtils.postOnBackgroundThread(() -> {
|
||||||
|
if (mCachedDevice.getDevice() != null) {
|
||||||
|
Log.d(TAG, "onPreferenceAttributesChanged, start updating for device "
|
||||||
|
+ mCachedDevice.getDevice().getAnonymizedAddress());
|
||||||
|
}
|
||||||
@Nullable String name = mCachedDevice.getName();
|
@Nullable String name = mCachedDevice.getName();
|
||||||
// Null check is done at the framework
|
// Null check is done at the framework
|
||||||
@Nullable String connectionSummary = getConnectionSummary();
|
@Nullable String connectionSummary = getConnectionSummary();
|
||||||
@@ -325,6 +329,7 @@ public final class BluetoothDevicePreference extends GearPreference {
|
|||||||
notifyHierarchyChanged();
|
notifyHierarchyChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Log.d(TAG, "onPreferenceAttributesChanged, complete updating for device " + name);
|
||||||
});
|
});
|
||||||
} catch (RejectedExecutionException e) {
|
} catch (RejectedExecutionException e) {
|
||||||
Log.w(TAG, "Handler thread unavailable, skipping getConnectionSummary!");
|
Log.w(TAG, "Handler thread unavailable, skipping getConnectionSummary!");
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ public class AvailableMediaDeviceGroupController extends BasePreferenceControlle
|
|||||||
var unused =
|
var unused =
|
||||||
ThreadUtils.postOnBackgroundThread(
|
ThreadUtils.postOnBackgroundThread(
|
||||||
() -> {
|
() -> {
|
||||||
|
Log.d(TAG, "updateTitle, check current status");
|
||||||
int titleResId;
|
int titleResId;
|
||||||
if (isAudioModeOngoingCall(mContext)) {
|
if (isAudioModeOngoingCall(mContext)) {
|
||||||
// in phone call
|
// in phone call
|
||||||
@@ -347,6 +348,7 @@ public class AvailableMediaDeviceGroupController extends BasePreferenceControlle
|
|||||||
// without phone call, not audio sharing
|
// without phone call, not audio sharing
|
||||||
titleResId = R.string.connected_device_media_device_title;
|
titleResId = R.string.connected_device_media_device_title;
|
||||||
}
|
}
|
||||||
|
Log.d(TAG, "updateTitle, title = " + titleResId);
|
||||||
mContext.getMainExecutor()
|
mContext.getMainExecutor()
|
||||||
.execute(
|
.execute(
|
||||||
() -> {
|
() -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user