Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +8 −8 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class Bubble implements BubbleViewProvider { private Icon mIcon; private boolean mIsBubble; private boolean mIsTextChanged; private boolean mIsClearable; private boolean mIsDismissable; private boolean mShouldSuppressNotificationDot; private boolean mShouldSuppressNotificationList; private boolean mShouldSuppressPeek; Loading Loading @@ -181,7 +181,7 @@ public class Bubble implements BubbleViewProvider { @VisibleForTesting(visibility = PRIVATE) public Bubble(@NonNull final String key, @NonNull final ShortcutInfo shortcutInfo, final int desiredHeight, final int desiredHeightResId, @Nullable final String title, int taskId, @Nullable final String locus, boolean isClearable, Executor mainExecutor, int taskId, @Nullable final String locus, boolean isDismissable, Executor mainExecutor, final Bubbles.BubbleMetadataFlagListener listener) { Objects.requireNonNull(key); Objects.requireNonNull(shortcutInfo); Loading @@ -190,7 +190,7 @@ public class Bubble implements BubbleViewProvider { mKey = key; mGroupKey = null; mLocusId = locus != null ? new LocusId(locus) : null; mIsClearable = isClearable; mIsDismissable = isDismissable; mFlags = 0; mUser = shortcutInfo.getUserHandle(); mPackageName = shortcutInfo.getPackage(); Loading Loading @@ -248,8 +248,8 @@ public class Bubble implements BubbleViewProvider { } @Hide public boolean isClearable() { return mIsClearable; public boolean isDismissable() { return mIsDismissable; } /** Loading Loading @@ -533,7 +533,7 @@ public class Bubble implements BubbleViewProvider { mDeleteIntent = entry.getBubbleMetadata().getDeleteIntent(); } mIsClearable = entry.isClearable(); mIsDismissable = entry.isDismissable(); mShouldSuppressNotificationDot = entry.shouldSuppressNotificationDot(); mShouldSuppressNotificationList = entry.shouldSuppressNotificationList(); mShouldSuppressPeek = entry.shouldSuppressPeek(); Loading Loading @@ -612,7 +612,7 @@ public class Bubble implements BubbleViewProvider { * Whether this notification should be shown in the shade. */ boolean showInShade() { return !shouldSuppressNotification() || !mIsClearable; return !shouldSuppressNotification() || !mIsDismissable; } /** Loading Loading @@ -877,7 +877,7 @@ public class Bubble implements BubbleViewProvider { pw.print(" desiredHeight: "); pw.println(getDesiredHeightString()); pw.print(" suppressNotif: "); pw.println(shouldSuppressNotification()); pw.print(" autoExpand: "); pw.println(shouldAutoExpand()); pw.print(" isClearable: "); pw.println(mIsClearable); pw.print(" isDismissable: "); pw.println(mIsDismissable); pw.println(" bubbleMetadataFlagListener null: " + (mBubbleMetadataFlagListener == null)); if (mExpandedView != null) { mExpandedView.dump(pw); Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleDataRepository.kt +2 −2 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ internal class BubbleDataRepository( b.title, b.taskId, b.locusId?.id, b.isClearable b.isDismissable ) } } Loading Loading @@ -206,7 +206,7 @@ internal class BubbleDataRepository( entity.title, entity.taskId, entity.locus, entity.isClearable, entity.isDismissable, mainExecutor, bubbleMetadataFlagListener ) Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleEntry.java +6 −6 Original line number Diff line number Diff line Loading @@ -38,18 +38,18 @@ public class BubbleEntry { private StatusBarNotification mSbn; private Ranking mRanking; private boolean mIsClearable; private boolean mIsDismissable; private boolean mShouldSuppressNotificationDot; private boolean mShouldSuppressNotificationList; private boolean mShouldSuppressPeek; public BubbleEntry(@NonNull StatusBarNotification sbn, Ranking ranking, boolean isClearable, boolean shouldSuppressNotificationDot, Ranking ranking, boolean isDismissable, boolean shouldSuppressNotificationDot, boolean shouldSuppressNotificationList, boolean shouldSuppressPeek) { mSbn = sbn; mRanking = ranking; mIsClearable = isClearable; mIsDismissable = isDismissable; mShouldSuppressNotificationDot = shouldSuppressNotificationDot; mShouldSuppressNotificationList = shouldSuppressNotificationList; mShouldSuppressPeek = shouldSuppressPeek; Loading Loading @@ -115,9 +115,9 @@ public class BubbleEntry { return mRanking.canBubble(); } /** @return true if this notification is clearable. */ public boolean isClearable() { return mIsClearable; /** @return true if this notification can be dismissed. */ public boolean isDismissable() { return mIsDismissable; } /** @return true if {@link Policy#SUPPRESSED_EFFECT_BADGE} set for this notification. */ Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/storage/BubbleEntity.kt +1 −1 Original line number Diff line number Diff line Loading @@ -28,5 +28,5 @@ data class BubbleEntity( val title: String? = null, val taskId: Int, val locus: String? = null, val isClearable: Boolean = false val isDismissable: Boolean = false ) libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/storage/BubbleXmlHelper.kt +3 −5 Original line number Diff line number Diff line Loading @@ -43,9 +43,7 @@ private const val ATTR_DESIRED_HEIGHT_RES_ID = "hid" private const val ATTR_TITLE = "t" private const val ATTR_TASK_ID = "tid" private const val ATTR_LOCUS = "l" // TODO rename it to dismissable to follow NotificationEntry namings private const val ATTR_CLEARABLE = "d" private const val ATTR_DISMISSABLE = "d" /** * Writes the bubbles in xml format into given output stream. Loading Loading @@ -87,7 +85,7 @@ private fun writeXmlEntry(serializer: XmlSerializer, bubble: BubbleEntity) { bubble.title?.let { serializer.attribute(null, ATTR_TITLE, it) } serializer.attribute(null, ATTR_TASK_ID, bubble.taskId.toString()) bubble.locus?.let { serializer.attribute(null, ATTR_LOCUS, it) } serializer.attribute(null, ATTR_CLEARABLE, bubble.isClearable.toString()) serializer.attribute(null, ATTR_DISMISSABLE, bubble.isDismissable.toString()) serializer.endTag(null, TAG_BUBBLE) } catch (e: IOException) { throw RuntimeException(e) Loading Loading @@ -147,7 +145,7 @@ private fun readXmlEntry(parser: XmlPullParser): BubbleEntity? { parser.getAttributeWithName(ATTR_TITLE), parser.getAttributeWithName(ATTR_TASK_ID)?.toInt() ?: INVALID_TASK_ID, parser.getAttributeWithName(ATTR_LOCUS), parser.getAttributeWithName(ATTR_CLEARABLE)?.toBoolean() ?: false parser.getAttributeWithName(ATTR_DISMISSABLE)?.toBoolean() ?: false ) } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +8 −8 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class Bubble implements BubbleViewProvider { private Icon mIcon; private boolean mIsBubble; private boolean mIsTextChanged; private boolean mIsClearable; private boolean mIsDismissable; private boolean mShouldSuppressNotificationDot; private boolean mShouldSuppressNotificationList; private boolean mShouldSuppressPeek; Loading Loading @@ -181,7 +181,7 @@ public class Bubble implements BubbleViewProvider { @VisibleForTesting(visibility = PRIVATE) public Bubble(@NonNull final String key, @NonNull final ShortcutInfo shortcutInfo, final int desiredHeight, final int desiredHeightResId, @Nullable final String title, int taskId, @Nullable final String locus, boolean isClearable, Executor mainExecutor, int taskId, @Nullable final String locus, boolean isDismissable, Executor mainExecutor, final Bubbles.BubbleMetadataFlagListener listener) { Objects.requireNonNull(key); Objects.requireNonNull(shortcutInfo); Loading @@ -190,7 +190,7 @@ public class Bubble implements BubbleViewProvider { mKey = key; mGroupKey = null; mLocusId = locus != null ? new LocusId(locus) : null; mIsClearable = isClearable; mIsDismissable = isDismissable; mFlags = 0; mUser = shortcutInfo.getUserHandle(); mPackageName = shortcutInfo.getPackage(); Loading Loading @@ -248,8 +248,8 @@ public class Bubble implements BubbleViewProvider { } @Hide public boolean isClearable() { return mIsClearable; public boolean isDismissable() { return mIsDismissable; } /** Loading Loading @@ -533,7 +533,7 @@ public class Bubble implements BubbleViewProvider { mDeleteIntent = entry.getBubbleMetadata().getDeleteIntent(); } mIsClearable = entry.isClearable(); mIsDismissable = entry.isDismissable(); mShouldSuppressNotificationDot = entry.shouldSuppressNotificationDot(); mShouldSuppressNotificationList = entry.shouldSuppressNotificationList(); mShouldSuppressPeek = entry.shouldSuppressPeek(); Loading Loading @@ -612,7 +612,7 @@ public class Bubble implements BubbleViewProvider { * Whether this notification should be shown in the shade. */ boolean showInShade() { return !shouldSuppressNotification() || !mIsClearable; return !shouldSuppressNotification() || !mIsDismissable; } /** Loading Loading @@ -877,7 +877,7 @@ public class Bubble implements BubbleViewProvider { pw.print(" desiredHeight: "); pw.println(getDesiredHeightString()); pw.print(" suppressNotif: "); pw.println(shouldSuppressNotification()); pw.print(" autoExpand: "); pw.println(shouldAutoExpand()); pw.print(" isClearable: "); pw.println(mIsClearable); pw.print(" isDismissable: "); pw.println(mIsDismissable); pw.println(" bubbleMetadataFlagListener null: " + (mBubbleMetadataFlagListener == null)); if (mExpandedView != null) { mExpandedView.dump(pw); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleDataRepository.kt +2 −2 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ internal class BubbleDataRepository( b.title, b.taskId, b.locusId?.id, b.isClearable b.isDismissable ) } } Loading Loading @@ -206,7 +206,7 @@ internal class BubbleDataRepository( entity.title, entity.taskId, entity.locus, entity.isClearable, entity.isDismissable, mainExecutor, bubbleMetadataFlagListener ) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleEntry.java +6 −6 Original line number Diff line number Diff line Loading @@ -38,18 +38,18 @@ public class BubbleEntry { private StatusBarNotification mSbn; private Ranking mRanking; private boolean mIsClearable; private boolean mIsDismissable; private boolean mShouldSuppressNotificationDot; private boolean mShouldSuppressNotificationList; private boolean mShouldSuppressPeek; public BubbleEntry(@NonNull StatusBarNotification sbn, Ranking ranking, boolean isClearable, boolean shouldSuppressNotificationDot, Ranking ranking, boolean isDismissable, boolean shouldSuppressNotificationDot, boolean shouldSuppressNotificationList, boolean shouldSuppressPeek) { mSbn = sbn; mRanking = ranking; mIsClearable = isClearable; mIsDismissable = isDismissable; mShouldSuppressNotificationDot = shouldSuppressNotificationDot; mShouldSuppressNotificationList = shouldSuppressNotificationList; mShouldSuppressPeek = shouldSuppressPeek; Loading Loading @@ -115,9 +115,9 @@ public class BubbleEntry { return mRanking.canBubble(); } /** @return true if this notification is clearable. */ public boolean isClearable() { return mIsClearable; /** @return true if this notification can be dismissed. */ public boolean isDismissable() { return mIsDismissable; } /** @return true if {@link Policy#SUPPRESSED_EFFECT_BADGE} set for this notification. */ Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/storage/BubbleEntity.kt +1 −1 Original line number Diff line number Diff line Loading @@ -28,5 +28,5 @@ data class BubbleEntity( val title: String? = null, val taskId: Int, val locus: String? = null, val isClearable: Boolean = false val isDismissable: Boolean = false )
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/storage/BubbleXmlHelper.kt +3 −5 Original line number Diff line number Diff line Loading @@ -43,9 +43,7 @@ private const val ATTR_DESIRED_HEIGHT_RES_ID = "hid" private const val ATTR_TITLE = "t" private const val ATTR_TASK_ID = "tid" private const val ATTR_LOCUS = "l" // TODO rename it to dismissable to follow NotificationEntry namings private const val ATTR_CLEARABLE = "d" private const val ATTR_DISMISSABLE = "d" /** * Writes the bubbles in xml format into given output stream. Loading Loading @@ -87,7 +85,7 @@ private fun writeXmlEntry(serializer: XmlSerializer, bubble: BubbleEntity) { bubble.title?.let { serializer.attribute(null, ATTR_TITLE, it) } serializer.attribute(null, ATTR_TASK_ID, bubble.taskId.toString()) bubble.locus?.let { serializer.attribute(null, ATTR_LOCUS, it) } serializer.attribute(null, ATTR_CLEARABLE, bubble.isClearable.toString()) serializer.attribute(null, ATTR_DISMISSABLE, bubble.isDismissable.toString()) serializer.endTag(null, TAG_BUBBLE) } catch (e: IOException) { throw RuntimeException(e) Loading Loading @@ -147,7 +145,7 @@ private fun readXmlEntry(parser: XmlPullParser): BubbleEntity? { parser.getAttributeWithName(ATTR_TITLE), parser.getAttributeWithName(ATTR_TASK_ID)?.toInt() ?: INVALID_TASK_ID, parser.getAttributeWithName(ATTR_LOCUS), parser.getAttributeWithName(ATTR_CLEARABLE)?.toBoolean() ?: false parser.getAttributeWithName(ATTR_DISMISSABLE)?.toBoolean() ?: false ) } Loading