diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2022-05-16 10:21:50 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2022-05-16 10:21:50 -0700 |
commit | e76785ff394a3a44c820c6bd90aa139f6a029d30 (patch) | |
tree | 77ccf8af533515d6266bed632a3fa4f1690abea0 | |
parent | 62e459a860e81fca0780c81c0af3edc0e5b925ee (diff) | |
parent | 0878d97504479f56b5b2b856fddb6fa4854cda85 (diff) |
Merge 0878d97504479f56b5b2b856fddb6fa4854cda85 on remote branch
Change-Id: I2bd88f7d22970d90c31b710956d1285458ec4c3b
-rw-r--r-- | core/java/android/view/ViewRootImpl.java | 6 | ||||
-rw-r--r-- | services/core/java/com/android/server/audio/AudioDeviceBroker.java | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 6aa85a6cc1d4..6584c66950d5 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -3393,6 +3393,12 @@ public final class ViewRootImpl implements ViewParent, mReportNextDraw = false; pendingDrawFinished(); } + + // Make sure the consumer is not waiting if the view root was just made invisible. + if (mBLASTDrawConsumer != null) { + mBLASTDrawConsumer.accept(null); + mBLASTDrawConsumer = null; + } } } diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java index 3817ceaa1d15..5d2076fd570b 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java +++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java @@ -585,7 +585,9 @@ import java.util.concurrent.atomic.AtomicBoolean; /** remove all previously scheduled connection and state change events for the given device */ @GuardedBy("mDeviceStateLock") private void removeScheduledA2dpEvents(@NonNull BluetoothDevice device, int profile) { - mBrokerHandler.removeEqualMessages(MSG_L_A2DP_DEVICE_CONFIG_CHANGE, device); + if (profile == BluetoothProfile.A2DP) { + mBrokerHandler.removeEqualMessages(MSG_L_A2DP_DEVICE_CONFIG_CHANGE, device); + } final BtDeviceConnectionInfo connectionInfoToRemove = new BtDeviceConnectionInfo(device, // the next parameters of the constructor will be ignored when finding the message |