Loading packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java +12 −3 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,7 @@ class Bubble implements BubbleViewProvider { // Items that are typically loaded later // Items that are typically loaded later private String mAppName; private String mAppName; private ShortcutInfo mShortcutInfo; private ShortcutInfo mShortcutInfo; private String mMetadataShortcutId; private BadgedImageView mIconView; private BadgedImageView mIconView; private BubbleExpandedView mExpandedView; private BubbleExpandedView mExpandedView; Loading Loading @@ -218,6 +219,14 @@ class Bubble implements BubbleViewProvider { return mTitle; return mTitle; } } String getMetadataShortcutId() { return mMetadataShortcutId; } boolean hasMetadataShortcutId() { return (mMetadataShortcutId != null && !mMetadataShortcutId.isEmpty()); } /** /** * Call when the views should be removed, ensure this is called to clean up ActivityView * Call when the views should be removed, ensure this is called to clean up ActivityView * content. * content. Loading Loading @@ -350,9 +359,9 @@ class Bubble implements BubbleViewProvider { mAppUid = entry.getSbn().getUid(); mAppUid = entry.getSbn().getUid(); mInstanceId = entry.getSbn().getInstanceId(); mInstanceId = entry.getSbn().getInstanceId(); mFlyoutMessage = BubbleViewInfoTask.extractFlyoutMessage(entry); mFlyoutMessage = BubbleViewInfoTask.extractFlyoutMessage(entry); mShortcutInfo = (entry.getBubbleMetadata() != null mShortcutInfo = (entry.getRanking() != null ? entry.getRanking().getShortcutInfo() : null); && entry.getBubbleMetadata().getShortcutId() != null mMetadataShortcutId = (entry.getBubbleMetadata() != null && entry.getRanking() != null) ? entry.getRanking().getShortcutInfo() : null; ? entry.getBubbleMetadata().getShortcutId() : null); if (entry.getRanking() != null) { if (entry.getRanking() != null) { mIsVisuallyInterruptive = entry.getRanking().visuallyInterruptive(); mIsVisuallyInterruptive = entry.getRanking().visuallyInterruptive(); } } Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleDataRepository.kt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -77,7 +77,7 @@ internal class BubbleDataRepository @Inject constructor( BubbleEntity( BubbleEntity( userId, userId, b.packageName, b.packageName, b.shortcutInfo?.id ?: return@mapNotNull null, b.metadataShortcutId ?: return@mapNotNull null, b.key, b.key, b.rawDesiredHeight, b.rawDesiredHeight, b.rawDesiredHeightResId, b.rawDesiredHeightResId, Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -173,7 +173,8 @@ public class BubbleExpandedView extends LinearLayout { return; return; } } try { try { if (!mIsOverflow && mBubble.getShortcutInfo() != null) { if (!mIsOverflow && mBubble.hasMetadataShortcutId() && mBubble.getShortcutInfo() != null) { options.setApplyActivityFlagsForBubbles(true); options.setApplyActivityFlagsForBubbles(true); mActivityView.startShortcutActivity(mBubble.getShortcutInfo(), mActivityView.startShortcutActivity(mBubble.getShortcutInfo(), options, null /* sourceBounds */); options, null /* sourceBounds */); Loading Loading @@ -616,7 +617,7 @@ public class BubbleExpandedView extends LinearLayout { if (isNew) { if (isNew) { mPendingIntent = mBubble.getBubbleIntent(); mPendingIntent = mBubble.getBubbleIntent(); if (mPendingIntent != null || mBubble.getShortcutInfo() != null) { if (mPendingIntent != null || mBubble.hasMetadataShortcutId()) { setContentVisibility(false); setContentVisibility(false); mActivityView.setVisibility(VISIBLE); mActivityView.setVisibility(VISIBLE); } } Loading Loading @@ -788,7 +789,7 @@ public class BubbleExpandedView extends LinearLayout { } } private boolean usingActivityView() { private boolean usingActivityView() { return (mPendingIntent != null || mBubble.getShortcutInfo() != null) return (mPendingIntent != null || mBubble.hasMetadataShortcutId()) && mActivityView != null; && mActivityView != null; } } Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java +12 −3 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,7 @@ class Bubble implements BubbleViewProvider { // Items that are typically loaded later // Items that are typically loaded later private String mAppName; private String mAppName; private ShortcutInfo mShortcutInfo; private ShortcutInfo mShortcutInfo; private String mMetadataShortcutId; private BadgedImageView mIconView; private BadgedImageView mIconView; private BubbleExpandedView mExpandedView; private BubbleExpandedView mExpandedView; Loading Loading @@ -218,6 +219,14 @@ class Bubble implements BubbleViewProvider { return mTitle; return mTitle; } } String getMetadataShortcutId() { return mMetadataShortcutId; } boolean hasMetadataShortcutId() { return (mMetadataShortcutId != null && !mMetadataShortcutId.isEmpty()); } /** /** * Call when the views should be removed, ensure this is called to clean up ActivityView * Call when the views should be removed, ensure this is called to clean up ActivityView * content. * content. Loading Loading @@ -350,9 +359,9 @@ class Bubble implements BubbleViewProvider { mAppUid = entry.getSbn().getUid(); mAppUid = entry.getSbn().getUid(); mInstanceId = entry.getSbn().getInstanceId(); mInstanceId = entry.getSbn().getInstanceId(); mFlyoutMessage = BubbleViewInfoTask.extractFlyoutMessage(entry); mFlyoutMessage = BubbleViewInfoTask.extractFlyoutMessage(entry); mShortcutInfo = (entry.getBubbleMetadata() != null mShortcutInfo = (entry.getRanking() != null ? entry.getRanking().getShortcutInfo() : null); && entry.getBubbleMetadata().getShortcutId() != null mMetadataShortcutId = (entry.getBubbleMetadata() != null && entry.getRanking() != null) ? entry.getRanking().getShortcutInfo() : null; ? entry.getBubbleMetadata().getShortcutId() : null); if (entry.getRanking() != null) { if (entry.getRanking() != null) { mIsVisuallyInterruptive = entry.getRanking().visuallyInterruptive(); mIsVisuallyInterruptive = entry.getRanking().visuallyInterruptive(); } } Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleDataRepository.kt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -77,7 +77,7 @@ internal class BubbleDataRepository @Inject constructor( BubbleEntity( BubbleEntity( userId, userId, b.packageName, b.packageName, b.shortcutInfo?.id ?: return@mapNotNull null, b.metadataShortcutId ?: return@mapNotNull null, b.key, b.key, b.rawDesiredHeight, b.rawDesiredHeight, b.rawDesiredHeightResId, b.rawDesiredHeightResId, Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -173,7 +173,8 @@ public class BubbleExpandedView extends LinearLayout { return; return; } } try { try { if (!mIsOverflow && mBubble.getShortcutInfo() != null) { if (!mIsOverflow && mBubble.hasMetadataShortcutId() && mBubble.getShortcutInfo() != null) { options.setApplyActivityFlagsForBubbles(true); options.setApplyActivityFlagsForBubbles(true); mActivityView.startShortcutActivity(mBubble.getShortcutInfo(), mActivityView.startShortcutActivity(mBubble.getShortcutInfo(), options, null /* sourceBounds */); options, null /* sourceBounds */); Loading Loading @@ -616,7 +617,7 @@ public class BubbleExpandedView extends LinearLayout { if (isNew) { if (isNew) { mPendingIntent = mBubble.getBubbleIntent(); mPendingIntent = mBubble.getBubbleIntent(); if (mPendingIntent != null || mBubble.getShortcutInfo() != null) { if (mPendingIntent != null || mBubble.hasMetadataShortcutId()) { setContentVisibility(false); setContentVisibility(false); mActivityView.setVisibility(VISIBLE); mActivityView.setVisibility(VISIBLE); } } Loading Loading @@ -788,7 +789,7 @@ public class BubbleExpandedView extends LinearLayout { } } private boolean usingActivityView() { private boolean usingActivityView() { return (mPendingIntent != null || mBubble.getShortcutInfo() != null) return (mPendingIntent != null || mBubble.hasMetadataShortcutId()) && mActivityView != null; && mActivityView != null; } } Loading