Loading core/java/android/app/INotificationManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ interface INotificationManager void updateNotificationChannelForPackage(String pkg, int uid, in NotificationChannel channel); NotificationChannel getNotificationChannel(String callingPkg, int userId, String pkg, String channelId); NotificationChannel getConversationNotificationChannel(String callingPkg, int userId, String pkg, String channelId, boolean returnParentIfNoConversationChannel, String conversationId); void createConversationNotificationChannelForPackage(String pkg, int uid, String triggeringKey, in NotificationChannel parentChannel, String conversationId); void createConversationNotificationChannelForPackage(String pkg, int uid, in NotificationChannel parentChannel, String conversationId); NotificationChannel getNotificationChannelForPackage(String pkg, int uid, String channelId, String conversationId, boolean includeDeleted); void deleteNotificationChannel(String pkg, String channelId); void deleteConversationNotificationChannels(String pkg, int uid, String conversationId); Loading core/java/android/app/people/ConversationChannel.java +21 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.app.people; import android.app.NotificationChannel; import android.app.NotificationChannelGroup; import android.content.pm.ShortcutInfo; import android.os.Parcel; import android.os.Parcelable; Loading @@ -30,7 +31,9 @@ import android.os.Parcelable; public final class ConversationChannel implements Parcelable { private ShortcutInfo mShortcutInfo; private int mUid; private NotificationChannel mParentNotificationChannel; private NotificationChannelGroup mParentNotificationChannelGroup; private long mLastEventTimestamp; private boolean mHasActiveNotifications; Loading @@ -46,18 +49,24 @@ public final class ConversationChannel implements Parcelable { } }; public ConversationChannel(ShortcutInfo shortcutInfo, NotificationChannel parentNotificationChannel, long lastEventTimestamp, public ConversationChannel(ShortcutInfo shortcutInfo, int uid, NotificationChannel parentNotificationChannel, NotificationChannelGroup parentNotificationChannelGroup, long lastEventTimestamp, boolean hasActiveNotifications) { mShortcutInfo = shortcutInfo; mUid = uid; mParentNotificationChannel = parentNotificationChannel; mParentNotificationChannelGroup = parentNotificationChannelGroup; mLastEventTimestamp = lastEventTimestamp; mHasActiveNotifications = hasActiveNotifications; } public ConversationChannel(Parcel in) { mShortcutInfo = in.readParcelable(ShortcutInfo.class.getClassLoader()); mUid = in.readInt(); mParentNotificationChannel = in.readParcelable(NotificationChannel.class.getClassLoader()); mParentNotificationChannelGroup = in.readParcelable(NotificationChannelGroup.class.getClassLoader()); mLastEventTimestamp = in.readLong(); mHasActiveNotifications = in.readBoolean(); } Loading @@ -70,7 +79,9 @@ public final class ConversationChannel implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(mShortcutInfo, flags); dest.writeInt(mUid); dest.writeParcelable(mParentNotificationChannel, flags); dest.writeParcelable(mParentNotificationChannelGroup, flags); dest.writeLong(mLastEventTimestamp); dest.writeBoolean(mHasActiveNotifications); } Loading @@ -79,10 +90,18 @@ public final class ConversationChannel implements Parcelable { return mShortcutInfo; } public int getUid() { return mUid; } public NotificationChannel getParentNotificationChannel() { return mParentNotificationChannel; } public NotificationChannelGroup getParentNotificationChannelGroup() { return mParentNotificationChannelGroup; } public long getLastEventTimestamp() { return mLastEventTimestamp; } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationChannelHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public class NotificationChannelHelper { try { channel.setName(getName(entry)); notificationManager.createConversationNotificationChannelForPackage( pkg, appUid, entry.getSbn().getKey(), channel, pkg, appUid, channel, conversationId); channel = notificationManager.getConversationNotificationChannel( context.getOpPackageName(), UserHandle.getUserId(appUid), pkg, Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -995,7 +995,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { mTestHandler, null, Optional.of(mBubbles)); verify(mMockINotificationManager, times(1)).createConversationNotificationChannelForPackage( anyString(), anyInt(), anyString(), any(), eq(CONVERSATION_ID)); anyString(), anyInt(), any(), eq(CONVERSATION_ID)); } @Test Loading @@ -1020,7 +1020,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { mTestHandler, null, Optional.of(mBubbles)); verify(mMockINotificationManager, never()).createConversationNotificationChannelForPackage( anyString(), anyInt(), anyString(), any(), eq(CONVERSATION_ID)); anyString(), anyInt(), any(), eq(CONVERSATION_ID)); } @Test Loading services/core/java/com/android/server/notification/NotificationManagerInternal.java +2 −0 Original line number Diff line number Diff line Loading @@ -18,11 +18,13 @@ package com.android.server.notification; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationChannelGroup; import java.util.Set; public interface NotificationManagerInternal { NotificationChannel getNotificationChannel(String pkg, int uid, String channelId); NotificationChannelGroup getNotificationChannelGroup(String pkg, int uid, String channelId); void enqueueNotification(String pkg, String basePkg, int callingUid, int callingPid, String tag, int id, Notification notification, int userId); void cancelNotification(String pkg, String basePkg, int callingUid, int callingPid, Loading Loading
core/java/android/app/INotificationManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ interface INotificationManager void updateNotificationChannelForPackage(String pkg, int uid, in NotificationChannel channel); NotificationChannel getNotificationChannel(String callingPkg, int userId, String pkg, String channelId); NotificationChannel getConversationNotificationChannel(String callingPkg, int userId, String pkg, String channelId, boolean returnParentIfNoConversationChannel, String conversationId); void createConversationNotificationChannelForPackage(String pkg, int uid, String triggeringKey, in NotificationChannel parentChannel, String conversationId); void createConversationNotificationChannelForPackage(String pkg, int uid, in NotificationChannel parentChannel, String conversationId); NotificationChannel getNotificationChannelForPackage(String pkg, int uid, String channelId, String conversationId, boolean includeDeleted); void deleteNotificationChannel(String pkg, String channelId); void deleteConversationNotificationChannels(String pkg, int uid, String conversationId); Loading
core/java/android/app/people/ConversationChannel.java +21 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.app.people; import android.app.NotificationChannel; import android.app.NotificationChannelGroup; import android.content.pm.ShortcutInfo; import android.os.Parcel; import android.os.Parcelable; Loading @@ -30,7 +31,9 @@ import android.os.Parcelable; public final class ConversationChannel implements Parcelable { private ShortcutInfo mShortcutInfo; private int mUid; private NotificationChannel mParentNotificationChannel; private NotificationChannelGroup mParentNotificationChannelGroup; private long mLastEventTimestamp; private boolean mHasActiveNotifications; Loading @@ -46,18 +49,24 @@ public final class ConversationChannel implements Parcelable { } }; public ConversationChannel(ShortcutInfo shortcutInfo, NotificationChannel parentNotificationChannel, long lastEventTimestamp, public ConversationChannel(ShortcutInfo shortcutInfo, int uid, NotificationChannel parentNotificationChannel, NotificationChannelGroup parentNotificationChannelGroup, long lastEventTimestamp, boolean hasActiveNotifications) { mShortcutInfo = shortcutInfo; mUid = uid; mParentNotificationChannel = parentNotificationChannel; mParentNotificationChannelGroup = parentNotificationChannelGroup; mLastEventTimestamp = lastEventTimestamp; mHasActiveNotifications = hasActiveNotifications; } public ConversationChannel(Parcel in) { mShortcutInfo = in.readParcelable(ShortcutInfo.class.getClassLoader()); mUid = in.readInt(); mParentNotificationChannel = in.readParcelable(NotificationChannel.class.getClassLoader()); mParentNotificationChannelGroup = in.readParcelable(NotificationChannelGroup.class.getClassLoader()); mLastEventTimestamp = in.readLong(); mHasActiveNotifications = in.readBoolean(); } Loading @@ -70,7 +79,9 @@ public final class ConversationChannel implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(mShortcutInfo, flags); dest.writeInt(mUid); dest.writeParcelable(mParentNotificationChannel, flags); dest.writeParcelable(mParentNotificationChannelGroup, flags); dest.writeLong(mLastEventTimestamp); dest.writeBoolean(mHasActiveNotifications); } Loading @@ -79,10 +90,18 @@ public final class ConversationChannel implements Parcelable { return mShortcutInfo; } public int getUid() { return mUid; } public NotificationChannel getParentNotificationChannel() { return mParentNotificationChannel; } public NotificationChannelGroup getParentNotificationChannelGroup() { return mParentNotificationChannelGroup; } public long getLastEventTimestamp() { return mLastEventTimestamp; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationChannelHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public class NotificationChannelHelper { try { channel.setName(getName(entry)); notificationManager.createConversationNotificationChannelForPackage( pkg, appUid, entry.getSbn().getKey(), channel, pkg, appUid, channel, conversationId); channel = notificationManager.getConversationNotificationChannel( context.getOpPackageName(), UserHandle.getUserId(appUid), pkg, Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -995,7 +995,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { mTestHandler, null, Optional.of(mBubbles)); verify(mMockINotificationManager, times(1)).createConversationNotificationChannelForPackage( anyString(), anyInt(), anyString(), any(), eq(CONVERSATION_ID)); anyString(), anyInt(), any(), eq(CONVERSATION_ID)); } @Test Loading @@ -1020,7 +1020,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { mTestHandler, null, Optional.of(mBubbles)); verify(mMockINotificationManager, never()).createConversationNotificationChannelForPackage( anyString(), anyInt(), anyString(), any(), eq(CONVERSATION_ID)); anyString(), anyInt(), any(), eq(CONVERSATION_ID)); } @Test Loading
services/core/java/com/android/server/notification/NotificationManagerInternal.java +2 −0 Original line number Diff line number Diff line Loading @@ -18,11 +18,13 @@ package com.android.server.notification; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationChannelGroup; import java.util.Set; public interface NotificationManagerInternal { NotificationChannel getNotificationChannel(String pkg, int uid, String channelId); NotificationChannelGroup getNotificationChannelGroup(String pkg, int uid, String channelId); void enqueueNotification(String pkg, String basePkg, int callingUid, int callingPid, String tag, int id, Notification notification, int userId); void cancelNotification(String pkg, String basePkg, int callingUid, int callingPid, Loading