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

Commit e9a3872a authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Send app name to launcher" into main

parents 18be7057 0108a504
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -305,6 +305,7 @@ public class Bubble implements BubbleViewProvider {
                getUser().getIdentifier(),
                getPackageName(),
                getTitle(),
                getAppName(),
                isImportantConversation());
    }

+11 −1
Original line number Diff line number Diff line
@@ -45,10 +45,12 @@ public class BubbleInfo implements Parcelable {
    private Icon mIcon;
    @Nullable
    private String mTitle;
    @Nullable
    private String mAppName;
    private boolean mIsImportantConversation;

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

@@ -68,6 +71,7 @@ public class BubbleInfo implements Parcelable {
        mUserId = source.readInt();
        mPackageName = source.readString();
        mTitle = source.readString();
        mAppName = source.readString();
        mIsImportantConversation = source.readBoolean();
    }

@@ -102,6 +106,11 @@ public class BubbleInfo implements Parcelable {
        return mTitle;
    }

    @Nullable
    public String getAppName() {
        return mAppName;
    }

    public boolean isImportantConversation() {
        return mIsImportantConversation;
    }
@@ -161,6 +170,7 @@ public class BubbleInfo implements Parcelable {
        parcel.writeInt(mUserId);
        parcel.writeString(mPackageName);
        parcel.writeString(mTitle);
        parcel.writeString(mAppName);
        parcel.writeBoolean(mIsImportantConversation);
    }

+12 −1
Original line number Diff line number Diff line
@@ -32,7 +32,17 @@ class BubbleInfoTest : ShellTestCase() {
    @Test
    fun bubbleInfo() {
        val bubbleInfo =
            BubbleInfo("key", 0, "shortcut id", null, 6, "com.some.package", "title", true)
            BubbleInfo(
                "key",
                0,
                "shortcut id",
                null,
                6,
                "com.some.package",
                "title",
                "Some app",
                true
            )
        val parcel = Parcel.obtain()
        bubbleInfo.writeToParcel(parcel, PARCELABLE_WRITE_RETURN_VALUE)
        parcel.setDataPosition(0)
@@ -46,6 +56,7 @@ class BubbleInfoTest : ShellTestCase() {
        assertThat(bubbleInfo.userId).isEqualTo(bubbleInfoFromParcel.userId)
        assertThat(bubbleInfo.packageName).isEqualTo(bubbleInfoFromParcel.packageName)
        assertThat(bubbleInfo.title).isEqualTo(bubbleInfoFromParcel.title)
        assertThat(bubbleInfo.appName).isEqualTo(bubbleInfoFromParcel.appName)
        assertThat(bubbleInfo.isImportantConversation)
            .isEqualTo(bubbleInfoFromParcel.isImportantConversation)
    }