Fix for mic dislosure indicator getting stuck

When mic disclosure indicator comes to minimized state it should check
whether there are still active recordings and if not - dissmiss itself.
That was wrongly happening only if mRevealRecordingPackages is true.
This CL fixes it.

Bug: 161744641
Test: manually
Change-Id: I3009f64ae7afe556e9e4933101a04441c45b95ba
This commit is contained in:
Sergey Nikolaienkov
2020-08-13 21:50:44 +00:00
parent 400379c26f
commit 6abceeece2

View File

@@ -498,13 +498,11 @@ public class AudioRecordingDisclosureBar implements
mState = STATE_MINIMIZED;
if (mRevealRecordingPackages) {
if (!mPendingNotificationPackages.isEmpty()) {
// There is a new application that started recording, tell the user about it.
expand(mPendingNotificationPackages.poll());
} else {
hideIndicatorIfNeeded();
}
if (mRevealRecordingPackages && !mPendingNotificationPackages.isEmpty()) {
// There is a new application that started recording, tell the user about it.
expand(mPendingNotificationPackages.poll());
} else {
hideIndicatorIfNeeded();
}
}