Simplify NotificationListenerService API

Use ParceledListSlice to send the list of active notifications
from NoMan to NotificationListeners.

This allows us to simplify the API to what it was before
introducing the "String[] key" workaround for dealing with large
numbers of StatusBarNotifications.

While we're at it, rename Ranking.getIndexOfKey to something that
makes more sense.

Bug: 15126927
Change-Id: I02c2087978c6c4ec1198be496c6250a66143ecb3
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index b917263..a3ffc00 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -21,6 +21,7 @@
 import android.app.Notification;
 import android.content.ComponentName;
 import android.content.Intent;
+import android.content.pm.ParceledListSlice;
 import android.net.Uri;
 import android.service.notification.Condition;
 import android.service.notification.IConditionListener;
@@ -43,6 +44,8 @@
     void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled);
     boolean areNotificationsEnabledForPackage(String pkg, int uid);
 
+    // TODO: Remove this when callers have been migrated to the equivalent
+    // INotificationListener method.
     StatusBarNotification[] getActiveNotifications(String callingPkg);
     StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count);
 
@@ -52,8 +55,7 @@
     void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id);
     void cancelNotificationsFromListener(in INotificationListener token, in String[] keys);
 
-    StatusBarNotification[] getActiveNotificationsFromListener(in INotificationListener token, in String[] keys);
-    String[] getActiveNotificationKeysFromListener(in INotificationListener token);
+    ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token);
 
     ZenModeConfig getZenModeConfig();
     boolean setZenModeConfig(in ZenModeConfig config);