Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +0 −4 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.logging.InstanceId; import com.android.launcher3.icons.BubbleBadgeIconFactory; import com.android.launcher3.icons.BubbleIconFactory; import com.android.wm.shell.bubbles.bar.BubbleBarExpandedView; import com.android.wm.shell.bubbles.bar.BubbleBarLayerView; Loading Loading @@ -436,7 +435,6 @@ public class Bubble implements BubbleViewProvider { * @param stackView the view the bubble is added to, iff showing as floating. * @param layerView the layer the bubble is added to, iff showing in the bubble bar. * @param iconFactory the icon factory use to create images for the bubble. * @param badgeIconFactory the icon factory to create app badges for the bubble. */ void inflate(BubbleViewInfoTask.Callback callback, Context context, Loading @@ -444,7 +442,6 @@ public class Bubble implements BubbleViewProvider { @Nullable BubbleStackView stackView, @Nullable BubbleBarLayerView layerView, BubbleIconFactory iconFactory, BubbleBadgeIconFactory badgeIconFactory, boolean skipInflation) { if (isBubbleLoading()) { mInflationTask.cancel(true /* mayInterruptIfRunning */); Loading @@ -455,7 +452,6 @@ public class Bubble implements BubbleViewProvider { stackView, layerView, iconFactory, badgeIconFactory, skipInflation, callback, mMainExecutor); Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +8 −12 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.statusbar.IStatusBarService; import com.android.launcher3.icons.BubbleBadgeIconFactory; import com.android.launcher3.icons.BubbleIconFactory; import com.android.wm.shell.R; import com.android.wm.shell.ShellTaskOrganizer; Loading Loading @@ -209,7 +208,6 @@ public class BubbleController implements ConfigurationChangeListener, @Nullable private BubbleStackView mStackView; @Nullable private BubbleBarLayerView mLayerView; private BubbleIconFactory mBubbleIconFactory; private BubbleBadgeIconFactory mBubbleBadgeIconFactory; private BubblePositioner mBubblePositioner; private Bubbles.SysuiProxy mSysuiProxy; Loading Loading @@ -321,8 +319,7 @@ public class BubbleController implements ConfigurationChangeListener, mBubbleData = data; mSavedUserBubbleData = new SparseArray<>(); mBubbleIconFactory = new BubbleIconFactory(context, context.getResources().getDimensionPixelSize(R.dimen.bubble_size)); mBubbleBadgeIconFactory = new BubbleBadgeIconFactory(context, context.getResources().getDimensionPixelSize(R.dimen.bubble_size), context.getResources().getDimensionPixelSize(R.dimen.bubble_badge_size), context.getResources().getColor(R.color.important_conversation), context.getResources().getDimensionPixelSize( Loading Loading @@ -700,6 +697,10 @@ public class BubbleController implements ConfigurationChangeListener, return mBubblePositioner; } BubbleIconFactory getIconFactory() { return mBubbleIconFactory; } public Bubbles.SysuiProxy getSysuiProxy() { return mSysuiProxy; } Loading Loading @@ -936,8 +937,7 @@ public class BubbleController implements ConfigurationChangeListener, mStackView.onThemeChanged(); } mBubbleIconFactory = new BubbleIconFactory(mContext, mContext.getResources().getDimensionPixelSize(R.dimen.bubble_size)); mBubbleBadgeIconFactory = new BubbleBadgeIconFactory(mContext, mContext.getResources().getDimensionPixelSize(R.dimen.bubble_size), mContext.getResources().getDimensionPixelSize(R.dimen.bubble_badge_size), mContext.getResources().getColor(R.color.important_conversation), mContext.getResources().getDimensionPixelSize( Loading @@ -951,7 +951,6 @@ public class BubbleController implements ConfigurationChangeListener, mStackView, mLayerView, mBubbleIconFactory, mBubbleBadgeIconFactory, false /* skipInflation */); } for (Bubble b : mBubbleData.getOverflowBubbles()) { Loading @@ -961,7 +960,6 @@ public class BubbleController implements ConfigurationChangeListener, mStackView, mLayerView, mBubbleIconFactory, mBubbleBadgeIconFactory, false /* skipInflation */); } } Loading @@ -978,8 +976,7 @@ public class BubbleController implements ConfigurationChangeListener, mScreenBounds.set(newConfig.windowConfiguration.getBounds()); mBubbleData.onMaxBubblesChanged(); mBubbleIconFactory = new BubbleIconFactory(mContext, mContext.getResources().getDimensionPixelSize(R.dimen.bubble_size)); mBubbleBadgeIconFactory = new BubbleBadgeIconFactory(mContext, mContext.getResources().getDimensionPixelSize(R.dimen.bubble_size), mContext.getResources().getDimensionPixelSize(R.dimen.bubble_badge_size), mContext.getResources().getColor(R.color.important_conversation), mContext.getResources().getDimensionPixelSize( Loading Loading @@ -1275,7 +1272,6 @@ public class BubbleController implements ConfigurationChangeListener, mStackView, mLayerView, mBubbleIconFactory, mBubbleBadgeIconFactory, true /* skipInflation */); }); return null; Loading Loading @@ -1351,7 +1347,7 @@ public class BubbleController implements ConfigurationChangeListener, bubble.setInflateSynchronously(mInflateSynchronously); bubble.inflate(b -> mBubbleData.notificationEntryUpdated(b, suppressFlyout, showInShade), mContext, this, mStackView, mLayerView, mBubbleIconFactory, mBubbleBadgeIconFactory, mBubbleIconFactory, false /* skipInflation */); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.FrameworkStatsLog; import com.android.launcher3.icons.BubbleIconFactory; import com.android.wm.shell.R; import com.android.wm.shell.bubbles.Bubbles.DismissReason; import com.android.wm.shell.common.bubbles.BubbleBarUpdate; Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflow.kt +5 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,11 @@ class BubbleOverflow( overflowBtn?.iconDrawable?.setTint(shapeColor) val iconFactory = BubbleIconFactory(context, context.getResources().getDimensionPixelSize(R.dimen.bubble_size)) context.getResources().getDimensionPixelSize(R.dimen.bubble_size), context.getResources().getDimensionPixelSize(R.dimen.bubble_badge_size), context.getResources().getColor(R.color.important_conversation), context.getResources().getDimensionPixelSize( com.android.internal.R.dimen.importance_ring_stroke_width)) // Update bitmap val fg = InsetDrawable(overflowBtn?.iconDrawable, overflowIconInset) Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTask.java +8 −13 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ import android.view.LayoutInflater; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.graphics.ColorUtils; import com.android.launcher3.icons.BitmapInfo; import com.android.launcher3.icons.BubbleBadgeIconFactory; import com.android.launcher3.icons.BubbleIconFactory; import com.android.wm.shell.R; import com.android.wm.shell.bubbles.bar.BubbleBarExpandedView; Loading Loading @@ -75,7 +74,6 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask private WeakReference<BubbleStackView> mStackView; private WeakReference<BubbleBarLayerView> mLayerView; private BubbleIconFactory mIconFactory; private BubbleBadgeIconFactory mBadgeIconFactory; private boolean mSkipInflation; private Callback mCallback; private Executor mMainExecutor; Loading @@ -90,7 +88,6 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask @Nullable BubbleStackView stackView, @Nullable BubbleBarLayerView layerView, BubbleIconFactory factory, BubbleBadgeIconFactory badgeFactory, boolean skipInflation, Callback c, Executor mainExecutor) { Loading @@ -100,7 +97,6 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask mStackView = new WeakReference<>(stackView); mLayerView = new WeakReference<>(layerView); mIconFactory = factory; mBadgeIconFactory = badgeFactory; mSkipInflation = skipInflation; mCallback = c; mMainExecutor = mainExecutor; Loading @@ -110,10 +106,10 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask protected BubbleViewInfo doInBackground(Void... voids) { if (mController.get().isShowingAsBubbleBar()) { return BubbleViewInfo.populateForBubbleBar(mContext.get(), mController.get(), mLayerView.get(), mBadgeIconFactory, mBubble, mSkipInflation); mLayerView.get(), mIconFactory, mBubble, mSkipInflation); } else { return BubbleViewInfo.populate(mContext.get(), mController.get(), mStackView.get(), mIconFactory, mBadgeIconFactory, mBubble, mSkipInflation); mIconFactory, mBubble, mSkipInflation); } } Loading Loading @@ -156,7 +152,7 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask @Nullable public static BubbleViewInfo populateForBubbleBar(Context c, BubbleController controller, BubbleBarLayerView layerView, BubbleBadgeIconFactory badgeIconFactory, Bubble b, BubbleBarLayerView layerView, BubbleIconFactory iconFactory, Bubble b, boolean skipInflation) { BubbleViewInfo info = new BubbleViewInfo(); Loading Loading @@ -195,7 +191,7 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask return null; } info.rawBadgeBitmap = badgeIconFactory.getBadgeBitmap(badgedIcon, false).icon; info.rawBadgeBitmap = iconFactory.getBadgeBitmap(badgedIcon, false).icon; return info; } Loading @@ -203,8 +199,7 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask @VisibleForTesting @Nullable public static BubbleViewInfo populate(Context c, BubbleController controller, BubbleStackView stackView, BubbleIconFactory iconFactory, BubbleBadgeIconFactory badgeIconFactory, Bubble b, BubbleStackView stackView, BubbleIconFactory iconFactory, Bubble b, boolean skipInflation) { BubbleViewInfo info = new BubbleViewInfo(); Loading Loading @@ -256,16 +251,16 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask bubbleDrawable = appIcon; } BitmapInfo badgeBitmapInfo = badgeIconFactory.getBadgeBitmap(badgedIcon, BitmapInfo badgeBitmapInfo = iconFactory.getBadgeBitmap(badgedIcon, b.isImportantConversation()); info.badgeBitmap = badgeBitmapInfo.icon; // Raw badge bitmap never includes the important conversation ring info.rawBadgeBitmap = b.isImportantConversation() ? badgeIconFactory.getBadgeBitmap(badgedIcon, false).icon ? iconFactory.getBadgeBitmap(badgedIcon, false).icon : badgeBitmapInfo.icon; float[] bubbleBitmapScale = new float[1]; info.bubbleBitmap = iconFactory.createIconBitmap(bubbleDrawable, bubbleBitmapScale); info.bubbleBitmap = iconFactory.getBubbleBitmap(bubbleDrawable, bubbleBitmapScale); // Dot color & placement Path iconPath = PathParser.createPathFromPathData( Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +0 −4 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.logging.InstanceId; import com.android.launcher3.icons.BubbleBadgeIconFactory; import com.android.launcher3.icons.BubbleIconFactory; import com.android.wm.shell.bubbles.bar.BubbleBarExpandedView; import com.android.wm.shell.bubbles.bar.BubbleBarLayerView; Loading Loading @@ -436,7 +435,6 @@ public class Bubble implements BubbleViewProvider { * @param stackView the view the bubble is added to, iff showing as floating. * @param layerView the layer the bubble is added to, iff showing in the bubble bar. * @param iconFactory the icon factory use to create images for the bubble. * @param badgeIconFactory the icon factory to create app badges for the bubble. */ void inflate(BubbleViewInfoTask.Callback callback, Context context, Loading @@ -444,7 +442,6 @@ public class Bubble implements BubbleViewProvider { @Nullable BubbleStackView stackView, @Nullable BubbleBarLayerView layerView, BubbleIconFactory iconFactory, BubbleBadgeIconFactory badgeIconFactory, boolean skipInflation) { if (isBubbleLoading()) { mInflationTask.cancel(true /* mayInterruptIfRunning */); Loading @@ -455,7 +452,6 @@ public class Bubble implements BubbleViewProvider { stackView, layerView, iconFactory, badgeIconFactory, skipInflation, callback, mMainExecutor); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +8 −12 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.statusbar.IStatusBarService; import com.android.launcher3.icons.BubbleBadgeIconFactory; import com.android.launcher3.icons.BubbleIconFactory; import com.android.wm.shell.R; import com.android.wm.shell.ShellTaskOrganizer; Loading Loading @@ -209,7 +208,6 @@ public class BubbleController implements ConfigurationChangeListener, @Nullable private BubbleStackView mStackView; @Nullable private BubbleBarLayerView mLayerView; private BubbleIconFactory mBubbleIconFactory; private BubbleBadgeIconFactory mBubbleBadgeIconFactory; private BubblePositioner mBubblePositioner; private Bubbles.SysuiProxy mSysuiProxy; Loading Loading @@ -321,8 +319,7 @@ public class BubbleController implements ConfigurationChangeListener, mBubbleData = data; mSavedUserBubbleData = new SparseArray<>(); mBubbleIconFactory = new BubbleIconFactory(context, context.getResources().getDimensionPixelSize(R.dimen.bubble_size)); mBubbleBadgeIconFactory = new BubbleBadgeIconFactory(context, context.getResources().getDimensionPixelSize(R.dimen.bubble_size), context.getResources().getDimensionPixelSize(R.dimen.bubble_badge_size), context.getResources().getColor(R.color.important_conversation), context.getResources().getDimensionPixelSize( Loading Loading @@ -700,6 +697,10 @@ public class BubbleController implements ConfigurationChangeListener, return mBubblePositioner; } BubbleIconFactory getIconFactory() { return mBubbleIconFactory; } public Bubbles.SysuiProxy getSysuiProxy() { return mSysuiProxy; } Loading Loading @@ -936,8 +937,7 @@ public class BubbleController implements ConfigurationChangeListener, mStackView.onThemeChanged(); } mBubbleIconFactory = new BubbleIconFactory(mContext, mContext.getResources().getDimensionPixelSize(R.dimen.bubble_size)); mBubbleBadgeIconFactory = new BubbleBadgeIconFactory(mContext, mContext.getResources().getDimensionPixelSize(R.dimen.bubble_size), mContext.getResources().getDimensionPixelSize(R.dimen.bubble_badge_size), mContext.getResources().getColor(R.color.important_conversation), mContext.getResources().getDimensionPixelSize( Loading @@ -951,7 +951,6 @@ public class BubbleController implements ConfigurationChangeListener, mStackView, mLayerView, mBubbleIconFactory, mBubbleBadgeIconFactory, false /* skipInflation */); } for (Bubble b : mBubbleData.getOverflowBubbles()) { Loading @@ -961,7 +960,6 @@ public class BubbleController implements ConfigurationChangeListener, mStackView, mLayerView, mBubbleIconFactory, mBubbleBadgeIconFactory, false /* skipInflation */); } } Loading @@ -978,8 +976,7 @@ public class BubbleController implements ConfigurationChangeListener, mScreenBounds.set(newConfig.windowConfiguration.getBounds()); mBubbleData.onMaxBubblesChanged(); mBubbleIconFactory = new BubbleIconFactory(mContext, mContext.getResources().getDimensionPixelSize(R.dimen.bubble_size)); mBubbleBadgeIconFactory = new BubbleBadgeIconFactory(mContext, mContext.getResources().getDimensionPixelSize(R.dimen.bubble_size), mContext.getResources().getDimensionPixelSize(R.dimen.bubble_badge_size), mContext.getResources().getColor(R.color.important_conversation), mContext.getResources().getDimensionPixelSize( Loading Loading @@ -1275,7 +1272,6 @@ public class BubbleController implements ConfigurationChangeListener, mStackView, mLayerView, mBubbleIconFactory, mBubbleBadgeIconFactory, true /* skipInflation */); }); return null; Loading Loading @@ -1351,7 +1347,7 @@ public class BubbleController implements ConfigurationChangeListener, bubble.setInflateSynchronously(mInflateSynchronously); bubble.inflate(b -> mBubbleData.notificationEntryUpdated(b, suppressFlyout, showInShade), mContext, this, mStackView, mLayerView, mBubbleIconFactory, mBubbleBadgeIconFactory, mBubbleIconFactory, false /* skipInflation */); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.FrameworkStatsLog; import com.android.launcher3.icons.BubbleIconFactory; import com.android.wm.shell.R; import com.android.wm.shell.bubbles.Bubbles.DismissReason; import com.android.wm.shell.common.bubbles.BubbleBarUpdate; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflow.kt +5 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,11 @@ class BubbleOverflow( overflowBtn?.iconDrawable?.setTint(shapeColor) val iconFactory = BubbleIconFactory(context, context.getResources().getDimensionPixelSize(R.dimen.bubble_size)) context.getResources().getDimensionPixelSize(R.dimen.bubble_size), context.getResources().getDimensionPixelSize(R.dimen.bubble_badge_size), context.getResources().getColor(R.color.important_conversation), context.getResources().getDimensionPixelSize( com.android.internal.R.dimen.importance_ring_stroke_width)) // Update bitmap val fg = InsetDrawable(overflowBtn?.iconDrawable, overflowIconInset) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTask.java +8 −13 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ import android.view.LayoutInflater; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.graphics.ColorUtils; import com.android.launcher3.icons.BitmapInfo; import com.android.launcher3.icons.BubbleBadgeIconFactory; import com.android.launcher3.icons.BubbleIconFactory; import com.android.wm.shell.R; import com.android.wm.shell.bubbles.bar.BubbleBarExpandedView; Loading Loading @@ -75,7 +74,6 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask private WeakReference<BubbleStackView> mStackView; private WeakReference<BubbleBarLayerView> mLayerView; private BubbleIconFactory mIconFactory; private BubbleBadgeIconFactory mBadgeIconFactory; private boolean mSkipInflation; private Callback mCallback; private Executor mMainExecutor; Loading @@ -90,7 +88,6 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask @Nullable BubbleStackView stackView, @Nullable BubbleBarLayerView layerView, BubbleIconFactory factory, BubbleBadgeIconFactory badgeFactory, boolean skipInflation, Callback c, Executor mainExecutor) { Loading @@ -100,7 +97,6 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask mStackView = new WeakReference<>(stackView); mLayerView = new WeakReference<>(layerView); mIconFactory = factory; mBadgeIconFactory = badgeFactory; mSkipInflation = skipInflation; mCallback = c; mMainExecutor = mainExecutor; Loading @@ -110,10 +106,10 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask protected BubbleViewInfo doInBackground(Void... voids) { if (mController.get().isShowingAsBubbleBar()) { return BubbleViewInfo.populateForBubbleBar(mContext.get(), mController.get(), mLayerView.get(), mBadgeIconFactory, mBubble, mSkipInflation); mLayerView.get(), mIconFactory, mBubble, mSkipInflation); } else { return BubbleViewInfo.populate(mContext.get(), mController.get(), mStackView.get(), mIconFactory, mBadgeIconFactory, mBubble, mSkipInflation); mIconFactory, mBubble, mSkipInflation); } } Loading Loading @@ -156,7 +152,7 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask @Nullable public static BubbleViewInfo populateForBubbleBar(Context c, BubbleController controller, BubbleBarLayerView layerView, BubbleBadgeIconFactory badgeIconFactory, Bubble b, BubbleBarLayerView layerView, BubbleIconFactory iconFactory, Bubble b, boolean skipInflation) { BubbleViewInfo info = new BubbleViewInfo(); Loading Loading @@ -195,7 +191,7 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask return null; } info.rawBadgeBitmap = badgeIconFactory.getBadgeBitmap(badgedIcon, false).icon; info.rawBadgeBitmap = iconFactory.getBadgeBitmap(badgedIcon, false).icon; return info; } Loading @@ -203,8 +199,7 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask @VisibleForTesting @Nullable public static BubbleViewInfo populate(Context c, BubbleController controller, BubbleStackView stackView, BubbleIconFactory iconFactory, BubbleBadgeIconFactory badgeIconFactory, Bubble b, BubbleStackView stackView, BubbleIconFactory iconFactory, Bubble b, boolean skipInflation) { BubbleViewInfo info = new BubbleViewInfo(); Loading Loading @@ -256,16 +251,16 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask bubbleDrawable = appIcon; } BitmapInfo badgeBitmapInfo = badgeIconFactory.getBadgeBitmap(badgedIcon, BitmapInfo badgeBitmapInfo = iconFactory.getBadgeBitmap(badgedIcon, b.isImportantConversation()); info.badgeBitmap = badgeBitmapInfo.icon; // Raw badge bitmap never includes the important conversation ring info.rawBadgeBitmap = b.isImportantConversation() ? badgeIconFactory.getBadgeBitmap(badgedIcon, false).icon ? iconFactory.getBadgeBitmap(badgedIcon, false).icon : badgeBitmapInfo.icon; float[] bubbleBitmapScale = new float[1]; info.bubbleBitmap = iconFactory.createIconBitmap(bubbleDrawable, bubbleBitmapScale); info.bubbleBitmap = iconFactory.getBubbleBitmap(bubbleDrawable, bubbleBitmapScale); // Dot color & placement Path iconPath = PathParser.createPathFromPathData( Loading