Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f14a72ed authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Add a bit to bubble info to indicate if the app badge should be shown" into main

parents 0828739b 9ab45eb9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -349,7 +349,8 @@ public class Bubble implements BubbleViewProvider {
                getPackageName(),
                getTitle(),
                getAppName(),
                isImportantConversation());
                isImportantConversation(),
                !isAppLaunchIntent());
    }

    @Override
+9 −1
Original line number Diff line number Diff line
@@ -48,10 +48,11 @@ public class BubbleInfo implements Parcelable {
    @Nullable
    private String mAppName;
    private boolean mIsImportantConversation;
    private boolean mShowAppBadge;

    public BubbleInfo(String key, int flags, @Nullable String shortcutId, @Nullable Icon icon,
            int userId, String packageName, @Nullable String title, @Nullable String appName,
            boolean isImportantConversation) {
            boolean isImportantConversation, boolean showAppBadge) {
        mKey = key;
        mFlags = flags;
        mShortcutId = shortcutId;
@@ -61,6 +62,7 @@ public class BubbleInfo implements Parcelable {
        mTitle = title;
        mAppName = appName;
        mIsImportantConversation = isImportantConversation;
        mShowAppBadge = showAppBadge;
    }

    private BubbleInfo(Parcel source) {
@@ -73,6 +75,7 @@ public class BubbleInfo implements Parcelable {
        mTitle = source.readString();
        mAppName = source.readString();
        mIsImportantConversation = source.readBoolean();
        mShowAppBadge = source.readBoolean();
    }

    public String getKey() {
@@ -115,6 +118,10 @@ public class BubbleInfo implements Parcelable {
        return mIsImportantConversation;
    }

    public boolean showAppBadge() {
        return mShowAppBadge;
    }

    /**
     * Whether this bubble is currently being hidden from the stack.
     */
@@ -172,6 +179,7 @@ public class BubbleInfo implements Parcelable {
        parcel.writeString(mTitle);
        parcel.writeString(mAppName);
        parcel.writeBoolean(mIsImportantConversation);
        parcel.writeBoolean(mShowAppBadge);
    }

    @NonNull
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ class BubbleInfoTest : ShellTestCase() {
                "com.some.package",
                "title",
                "Some app",
                true,
                true
            )
        val parcel = Parcel.obtain()