mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Merge "Revert "Revert "Fix the badge in badge (triple badging), by simp..."" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
6ea6ffa94a
@@ -22,6 +22,7 @@ import static com.android.launcher3.Flags.enableCursorHoverStates;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_ICON_LABEL_AUTO_SCALING;
|
||||
import static com.android.launcher3.graphics.PreloadIconDrawable.newPendingIcon;
|
||||
import static com.android.launcher3.icons.BitmapInfo.FLAG_NO_BADGE;
|
||||
import static com.android.launcher3.icons.BitmapInfo.FLAG_SKIP_USER_BADGE;
|
||||
import static com.android.launcher3.icons.BitmapInfo.FLAG_THEMED;
|
||||
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
|
||||
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_INCREMENTAL_DOWNLOAD_ACTIVE;
|
||||
@@ -164,6 +165,8 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
@ViewDebug.ExportedProperty(category = "launcher")
|
||||
private boolean mHideBadge = false;
|
||||
@ViewDebug.ExportedProperty(category = "launcher")
|
||||
private boolean mSkipUserBadge = false;
|
||||
@ViewDebug.ExportedProperty(category = "launcher")
|
||||
private boolean mIsIconVisible = true;
|
||||
@ViewDebug.ExportedProperty(category = "launcher")
|
||||
private int mTextColor;
|
||||
@@ -268,6 +271,10 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
mHideBadge = hideBadge;
|
||||
}
|
||||
|
||||
public void setSkipUserBadge(boolean skipUserBadge) {
|
||||
mSkipUserBadge = skipUserBadge;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the view so it can be recycled.
|
||||
*/
|
||||
@@ -397,6 +404,9 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
if (mHideBadge || mDisplay == DISPLAY_SEARCH_RESULT_SMALL) {
|
||||
flags |= FLAG_NO_BADGE;
|
||||
}
|
||||
if (mSkipUserBadge) {
|
||||
flags |= FLAG_SKIP_USER_BADGE;
|
||||
}
|
||||
FastBitmapDrawable iconDrawable = info.newIcon(getContext(), flags);
|
||||
mDotParams.appColor = iconDrawable.getIconColor();
|
||||
mDotParams.dotColor = Themes.getAttrColor(getContext(), R.attr.notificationDotColor);
|
||||
|
||||
Reference in New Issue
Block a user