Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +1 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,7 @@ public class Bubble implements BubbleViewProvider { getUser().getIdentifier(), getPackageName(), getTitle(), getAppName(), isImportantConversation()); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleInfo.java +11 −1 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -57,6 +59,7 @@ public class BubbleInfo implements Parcelable { mUserId = userId; mPackageName = packageName; mTitle = title; mAppName = appName; mIsImportantConversation = isImportantConversation; } Loading @@ -68,6 +71,7 @@ public class BubbleInfo implements Parcelable { mUserId = source.readInt(); mPackageName = source.readString(); mTitle = source.readString(); mAppName = source.readString(); mIsImportantConversation = source.readBoolean(); } Loading Loading @@ -102,6 +106,11 @@ public class BubbleInfo implements Parcelable { return mTitle; } @Nullable public String getAppName() { return mAppName; } public boolean isImportantConversation() { return mIsImportantConversation; } Loading Loading @@ -161,6 +170,7 @@ public class BubbleInfo implements Parcelable { parcel.writeInt(mUserId); parcel.writeString(mPackageName); parcel.writeString(mTitle); parcel.writeString(mAppName); parcel.writeBoolean(mIsImportantConversation); } Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/bubbles/BubbleInfoTest.kt +12 −1 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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) } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +1 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,7 @@ public class Bubble implements BubbleViewProvider { getUser().getIdentifier(), getPackageName(), getTitle(), getAppName(), isImportantConversation()); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleInfo.java +11 −1 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -57,6 +59,7 @@ public class BubbleInfo implements Parcelable { mUserId = userId; mPackageName = packageName; mTitle = title; mAppName = appName; mIsImportantConversation = isImportantConversation; } Loading @@ -68,6 +71,7 @@ public class BubbleInfo implements Parcelable { mUserId = source.readInt(); mPackageName = source.readString(); mTitle = source.readString(); mAppName = source.readString(); mIsImportantConversation = source.readBoolean(); } Loading Loading @@ -102,6 +106,11 @@ public class BubbleInfo implements Parcelable { return mTitle; } @Nullable public String getAppName() { return mAppName; } public boolean isImportantConversation() { return mIsImportantConversation; } Loading Loading @@ -161,6 +170,7 @@ public class BubbleInfo implements Parcelable { parcel.writeInt(mUserId); parcel.writeString(mPackageName); parcel.writeString(mTitle); parcel.writeString(mAppName); parcel.writeBoolean(mIsImportantConversation); } Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/bubbles/BubbleInfoTest.kt +12 −1 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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) } Loading