Loading core/java/android/app/INotificationManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ interface INotificationManager StatusBarNotification[] getActiveNotifications(String callingPkg); StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count); void registerListener(in INotificationListener listener, in ComponentName component, int userid, boolean asRanker); void registerListener(in INotificationListener listener, in ComponentName component, int userid); void unregisterListener(in INotificationListener listener, int userid); void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id); Loading core/java/android/app/NotificationManager.java +0 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ public class NotificationManager public static final String ACTION_INTERRUPTION_FILTER_CHANGED_INTERNAL = "android.app.action.INTERRUPTION_FILTER_CHANGED_INTERNAL"; /** @hide */ @IntDef({INTERRUPTION_FILTER_NONE, INTERRUPTION_FILTER_PRIORITY, INTERRUPTION_FILTER_ALARMS, INTERRUPTION_FILTER_ALL, INTERRUPTION_FILTER_UNKNOWN}) Loading core/java/android/service/notification/NotificationListenerService.java +2 −8 Original line number Diff line number Diff line Loading @@ -680,18 +680,12 @@ public abstract class NotificationListenerService extends Service { @SystemApi public void registerAsSystemService(Context context, ComponentName componentName, int currentUser) throws RemoteException { registerAsSystemServiceImpl(context, componentName, currentUser, false /* asRanker */); } /** @hide */ protected void registerAsSystemServiceImpl(Context context, ComponentName componentName, int currentUser, boolean asRanker) throws RemoteException { mSystemContext = context; if (mWrapper == null) { mWrapper = new NotificationListenerWrapper(); } mSystemContext = context; INotificationManager noMan = getNotificationInterface(); noMan.registerListener(mWrapper, componentName, currentUser, asRanker); noMan.registerListener(mWrapper, componentName, currentUser); mCurrentUser = currentUser; mHandler = new MyHandler(context.getMainLooper()); } Loading core/java/android/service/notification/NotificationRankerService.java +3 −4 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ import com.android.internal.os.SomeArgs; */ @SystemApi public abstract class NotificationRankerService extends NotificationListenerService { private static final String TAG = "NotificationRanker"; private static final String TAG = "NotificationRankers"; /** * The {@link Intent} that must be declared as handled by the service. Loading Loading @@ -118,9 +118,8 @@ public abstract class NotificationRankerService extends NotificationListenerServ /** @hide */ @Override public void registerAsSystemService(Context context, ComponentName componentName, int currentUser) throws RemoteException { registerAsSystemServiceImpl(context, componentName, currentUser, true /* as Ranker */); mHandler = new MyHandler(getContext().getMainLooper()); int currentUser) { throw new IllegalStateException("the ranker may not start itself."); } @Override Loading packages/ExtServices/AndroidManifest.xml +10 −1 Original line number Diff line number Diff line Loading @@ -15,18 +15,27 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" package="android.ext.services" android:versionCode="1" android:versionName="1" coreApp="true"> <application android:label="@string/app_name" android:allowBackup="false" android:forceDeviceEncrypted="true" android:encryptionAware="true"> <library android:name="android.ext.services"/> <service android:name=".notification.Ranker" android:label="@string/notification_ranker" android:permission="android.permission.BIND_NOTIFICATION_RANKER_SERVICE" android:exported="true"> <intent-filter> <action android:name="android.service.notification.NotificationRankerService" /> </intent-filter> </service> </application> </manifest> Loading
core/java/android/app/INotificationManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ interface INotificationManager StatusBarNotification[] getActiveNotifications(String callingPkg); StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count); void registerListener(in INotificationListener listener, in ComponentName component, int userid, boolean asRanker); void registerListener(in INotificationListener listener, in ComponentName component, int userid); void unregisterListener(in INotificationListener listener, int userid); void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id); Loading
core/java/android/app/NotificationManager.java +0 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ public class NotificationManager public static final String ACTION_INTERRUPTION_FILTER_CHANGED_INTERNAL = "android.app.action.INTERRUPTION_FILTER_CHANGED_INTERNAL"; /** @hide */ @IntDef({INTERRUPTION_FILTER_NONE, INTERRUPTION_FILTER_PRIORITY, INTERRUPTION_FILTER_ALARMS, INTERRUPTION_FILTER_ALL, INTERRUPTION_FILTER_UNKNOWN}) Loading
core/java/android/service/notification/NotificationListenerService.java +2 −8 Original line number Diff line number Diff line Loading @@ -680,18 +680,12 @@ public abstract class NotificationListenerService extends Service { @SystemApi public void registerAsSystemService(Context context, ComponentName componentName, int currentUser) throws RemoteException { registerAsSystemServiceImpl(context, componentName, currentUser, false /* asRanker */); } /** @hide */ protected void registerAsSystemServiceImpl(Context context, ComponentName componentName, int currentUser, boolean asRanker) throws RemoteException { mSystemContext = context; if (mWrapper == null) { mWrapper = new NotificationListenerWrapper(); } mSystemContext = context; INotificationManager noMan = getNotificationInterface(); noMan.registerListener(mWrapper, componentName, currentUser, asRanker); noMan.registerListener(mWrapper, componentName, currentUser); mCurrentUser = currentUser; mHandler = new MyHandler(context.getMainLooper()); } Loading
core/java/android/service/notification/NotificationRankerService.java +3 −4 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ import com.android.internal.os.SomeArgs; */ @SystemApi public abstract class NotificationRankerService extends NotificationListenerService { private static final String TAG = "NotificationRanker"; private static final String TAG = "NotificationRankers"; /** * The {@link Intent} that must be declared as handled by the service. Loading Loading @@ -118,9 +118,8 @@ public abstract class NotificationRankerService extends NotificationListenerServ /** @hide */ @Override public void registerAsSystemService(Context context, ComponentName componentName, int currentUser) throws RemoteException { registerAsSystemServiceImpl(context, componentName, currentUser, true /* as Ranker */); mHandler = new MyHandler(getContext().getMainLooper()); int currentUser) { throw new IllegalStateException("the ranker may not start itself."); } @Override Loading
packages/ExtServices/AndroidManifest.xml +10 −1 Original line number Diff line number Diff line Loading @@ -15,18 +15,27 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" package="android.ext.services" android:versionCode="1" android:versionName="1" coreApp="true"> <application android:label="@string/app_name" android:allowBackup="false" android:forceDeviceEncrypted="true" android:encryptionAware="true"> <library android:name="android.ext.services"/> <service android:name=".notification.Ranker" android:label="@string/notification_ranker" android:permission="android.permission.BIND_NOTIFICATION_RANKER_SERVICE" android:exported="true"> <intent-filter> <action android:name="android.service.notification.NotificationRankerService" /> </intent-filter> </service> </application> </manifest>