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

Commit e75a66e8 authored by Geoffrey Pitsch's avatar Geoffrey Pitsch
Browse files

Listener in createNotificationChannel

Necessary for when this will eventually trigger an Activity.
New unit test file for NotificationServiceManager.

Test: runtest systemui-notification (cts tests in separate CL)
Change-Id: I8f3e8e34ddcebb1acb9ddd84bffc68affb4b6e89
parent 8d86417c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ LOCAL_SRC_FILES += \
	core/java/android/app/IBackupAgent.aidl \
	core/java/android/app/IEphemeralResolver.aidl \
	core/java/android/app/IInstrumentationWatcher.aidl \
	core/java/android/app/IOnNotificationChannelCreatedListener.aidl \
	core/java/android/app/INotificationManager.aidl \
	core/java/android/app/IProcessObserver.aidl \
	core/java/android/app/ISearchManager.aidl \
+5 −1
Original line number Diff line number Diff line
@@ -5387,7 +5387,7 @@ package android.app {
    method public void cancel(int);
    method public void cancel(java.lang.String, int);
    method public void cancelAll();
    method public void createNotificationChannel(android.app.NotificationChannel);
    method public void createNotificationChannel(android.app.NotificationChannel, android.app.NotificationManager.OnNotificationChannelCreatedListener, android.os.Handler);
    method public void deleteNotificationChannel(java.lang.String);
    method public android.service.notification.StatusBarNotification[] getActiveNotifications();
    method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String);
@@ -5421,6 +5421,10 @@ package android.app {
    field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0
  }
  public static abstract interface NotificationManager.OnNotificationChannelCreatedListener {
    method public abstract void onNotificationChannelCreated(android.app.NotificationChannel);
  }
  public static class NotificationManager.Policy implements android.os.Parcelable {
    ctor public NotificationManager.Policy(int, int, int);
    ctor public NotificationManager.Policy(int, int, int, int);
+5 −1
Original line number Diff line number Diff line
@@ -5554,7 +5554,7 @@ package android.app {
    method public void cancel(int);
    method public void cancel(java.lang.String, int);
    method public void cancelAll();
    method public void createNotificationChannel(android.app.NotificationChannel);
    method public void createNotificationChannel(android.app.NotificationChannel, android.app.NotificationManager.OnNotificationChannelCreatedListener, android.os.Handler);
    method public void deleteNotificationChannel(java.lang.String);
    method public android.service.notification.StatusBarNotification[] getActiveNotifications();
    method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String);
@@ -5588,6 +5588,10 @@ package android.app {
    field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0
  }
  public static abstract interface NotificationManager.OnNotificationChannelCreatedListener {
    method public abstract void onNotificationChannelCreated(android.app.NotificationChannel);
  }
  public static class NotificationManager.Policy implements android.os.Parcelable {
    ctor public NotificationManager.Policy(int, int, int);
    ctor public NotificationManager.Policy(int, int, int, int);
+5 −1
Original line number Diff line number Diff line
@@ -5397,7 +5397,7 @@ package android.app {
    method public void cancel(int);
    method public void cancel(java.lang.String, int);
    method public void cancelAll();
    method public void createNotificationChannel(android.app.NotificationChannel);
    method public void createNotificationChannel(android.app.NotificationChannel, android.app.NotificationManager.OnNotificationChannelCreatedListener, android.os.Handler);
    method public void deleteNotificationChannel(java.lang.String);
    method public android.service.notification.StatusBarNotification[] getActiveNotifications();
    method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String);
@@ -5432,6 +5432,10 @@ package android.app {
    field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0
  }
  public static abstract interface NotificationManager.OnNotificationChannelCreatedListener {
    method public abstract void onNotificationChannelCreated(android.app.NotificationChannel);
  }
  public static class NotificationManager.Policy implements android.os.Parcelable {
    ctor public NotificationManager.Policy(int, int, int);
    ctor public NotificationManager.Policy(int, int, int, int);
+11 −9
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

package android.app;

import android.app.IOnNotificationChannelCreatedListener;
import android.app.ITransientNotification;
import android.app.Notification;
import android.app.NotificationChannel;
@@ -58,7 +59,8 @@ interface INotificationManager
    int getImportance(String pkg, int uid);
    int getPackageImportance(String pkg);

    void createNotificationChannel(String pkg, in NotificationChannel channel);
    void createNotificationChannel(String pkg, in NotificationChannel channel,
            in IOnNotificationChannelCreatedListener listener);
    void updateNotificationChannelForPackage(String pkg, int uid, in NotificationChannel channel);
    NotificationChannel getNotificationChannel(String pkg, String channelId);
    NotificationChannel getNotificationChannelForPackage(String pkg, int uid, String channelId);
Loading