Merge "Remove old quickshare chip when adding a new one" into tm-qpr-dev am: 2e5bc09147

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20668086

Change-Id: I62e6e9cfe363f56cffa9346d1fcd1dca642dc60a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Miranda Kephart
2022-12-09 21:55:14 +00:00
committed by Automerger Merge Worker

View File

@@ -881,6 +881,13 @@ public class ScreenshotView extends FrameLayout implements
}
void addQuickShareChip(Notification.Action quickShareAction) {
if (mQuickShareChip != null) {
mSmartChips.remove(mQuickShareChip);
mActionsView.removeView(mQuickShareChip);
}
if (mPendingInteraction == PendingInteraction.QUICK_SHARE) {
mPendingInteraction = null;
}
if (mPendingInteraction == null) {
LayoutInflater inflater = LayoutInflater.from(mContext);
mQuickShareChip = (OverlayActionChip) inflater.inflate(