Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +13 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.graphics.drawable.Icon; import android.os.Parcelable; import android.os.UserHandle; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.util.Log; Loading @@ -59,6 +60,8 @@ public class Bubble implements BubbleViewProvider { private static final String TAG = "Bubble"; private final String mKey; @Nullable private final String mGroupKey; private final Executor mMainExecutor; private long mLastUpdated; Loading Loading @@ -165,6 +168,7 @@ public class Bubble implements BubbleViewProvider { mMetadataShortcutId = shortcutInfo.getId(); mShortcutInfo = shortcutInfo; mKey = key; mGroupKey = null; mFlags = 0; mUser = shortcutInfo.getUserHandle(); mPackageName = shortcutInfo.getPackage(); Loading @@ -182,6 +186,7 @@ public class Bubble implements BubbleViewProvider { final Bubbles.PendingIntentCanceledListener intentCancelListener, Executor mainExecutor) { mKey = entry.getKey(); mGroupKey = entry.getGroupKey(); mSuppressionListener = listener; mIntentCancelListener = intent -> { if (mIntent != null) { Loading @@ -200,6 +205,14 @@ public class Bubble implements BubbleViewProvider { return mKey; } /** * @see StatusBarNotification#getGroupKey() * @return the group key for this bubble, if one exists. */ public String getGroupKey() { return mGroupKey; } public UserHandle getUser() { return mUser; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +3 −6 Original line number Diff line number Diff line Loading @@ -893,10 +893,7 @@ public class BubbleController { return bubbleChildren; } for (Bubble bubble : mBubbleData.getActiveBubbles()) { // TODO(178620678): Prevent calling into SysUI since this can be a part of a blocking // call from SysUI to Shell final BubbleEntry entry = mSysuiProxy.getPendingOrActiveEntry(bubble.getKey()); if (entry != null && groupKey.equals(entry.getStatusBarNotification().getGroupKey())) { if (bubble.getGroupKey() != null && groupKey.equals(bubble.getGroupKey())) { bubbleChildren.add(bubble); } } Loading Loading @@ -1065,8 +1062,8 @@ public class BubbleController { private boolean isSummaryOfBubbles(BubbleEntry entry) { String groupKey = entry.getStatusBarNotification().getGroupKey(); ArrayList<Bubble> bubbleChildren = getBubblesInGroup(groupKey); boolean isSuppressedSummary = (mBubbleData.isSummarySuppressed(groupKey) && mBubbleData.getSummaryKey(groupKey).equals(entry.getKey())); boolean isSuppressedSummary = mBubbleData.isSummarySuppressed(groupKey) && mBubbleData.getSummaryKey(groupKey).equals(entry.getKey()); boolean isSummary = entry.getStatusBarNotification().getNotification().isGroupSummary(); return (isSuppressedSummary || isSummary) && !bubbleChildren.isEmpty(); } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +13 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.graphics.drawable.Icon; import android.os.Parcelable; import android.os.UserHandle; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.util.Log; Loading @@ -59,6 +60,8 @@ public class Bubble implements BubbleViewProvider { private static final String TAG = "Bubble"; private final String mKey; @Nullable private final String mGroupKey; private final Executor mMainExecutor; private long mLastUpdated; Loading Loading @@ -165,6 +168,7 @@ public class Bubble implements BubbleViewProvider { mMetadataShortcutId = shortcutInfo.getId(); mShortcutInfo = shortcutInfo; mKey = key; mGroupKey = null; mFlags = 0; mUser = shortcutInfo.getUserHandle(); mPackageName = shortcutInfo.getPackage(); Loading @@ -182,6 +186,7 @@ public class Bubble implements BubbleViewProvider { final Bubbles.PendingIntentCanceledListener intentCancelListener, Executor mainExecutor) { mKey = entry.getKey(); mGroupKey = entry.getGroupKey(); mSuppressionListener = listener; mIntentCancelListener = intent -> { if (mIntent != null) { Loading @@ -200,6 +205,14 @@ public class Bubble implements BubbleViewProvider { return mKey; } /** * @see StatusBarNotification#getGroupKey() * @return the group key for this bubble, if one exists. */ public String getGroupKey() { return mGroupKey; } public UserHandle getUser() { return mUser; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +3 −6 Original line number Diff line number Diff line Loading @@ -893,10 +893,7 @@ public class BubbleController { return bubbleChildren; } for (Bubble bubble : mBubbleData.getActiveBubbles()) { // TODO(178620678): Prevent calling into SysUI since this can be a part of a blocking // call from SysUI to Shell final BubbleEntry entry = mSysuiProxy.getPendingOrActiveEntry(bubble.getKey()); if (entry != null && groupKey.equals(entry.getStatusBarNotification().getGroupKey())) { if (bubble.getGroupKey() != null && groupKey.equals(bubble.getGroupKey())) { bubbleChildren.add(bubble); } } Loading Loading @@ -1065,8 +1062,8 @@ public class BubbleController { private boolean isSummaryOfBubbles(BubbleEntry entry) { String groupKey = entry.getStatusBarNotification().getGroupKey(); ArrayList<Bubble> bubbleChildren = getBubblesInGroup(groupKey); boolean isSuppressedSummary = (mBubbleData.isSummarySuppressed(groupKey) && mBubbleData.getSummaryKey(groupKey).equals(entry.getKey())); boolean isSuppressedSummary = mBubbleData.isSummarySuppressed(groupKey) && mBubbleData.getSummaryKey(groupKey).equals(entry.getKey()); boolean isSummary = entry.getStatusBarNotification().getNotification().isGroupSummary(); return (isSuppressedSummary || isSummary) && !bubbleChildren.isEmpty(); } Loading