Hide incomplete feature.
Test: make
Change-Id: I505a8ee2f2fbdb574f607005579832951f28022a
diff --git a/core/java/android/service/notification/Adjustment.java b/core/java/android/service/notification/Adjustment.java
index 9728fda..e39d53f 100644
--- a/core/java/android/service/notification/Adjustment.java
+++ b/core/java/android/service/notification/Adjustment.java
@@ -15,6 +15,8 @@
*/
package android.service.notification;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.app.NotificationChannel;
import android.os.Bundle;
import android.os.Parcel;
@@ -22,7 +24,10 @@
/**
* Ranking updates from the Assistant.
+ * @hide
*/
+@SystemApi
+@TestApi
public final class Adjustment implements Parcelable {
private final String mPackage;
private final String mKey;
diff --git a/core/java/android/service/notification/NotificationAssistantService.java b/core/java/android/service/notification/NotificationAssistantService.java
index de86b2d..46609df 100644
--- a/core/java/android/service/notification/NotificationAssistantService.java
+++ b/core/java/android/service/notification/NotificationAssistantService.java
@@ -19,6 +19,8 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.app.NotificationChannel;
import android.content.Context;
import android.content.Intent;
@@ -35,7 +37,10 @@
/**
* A service that helps the user manage notifications.
+ * @hide
*/
+@SystemApi
+@TestApi
public abstract class NotificationAssistantService extends NotificationListenerService {
private static final String TAG = "NotificationAssistants";
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index e5abdac..5f7ff67 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -16,6 +16,7 @@
package android.service.notification;
+import android.annotation.TestApi;
import android.app.NotificationChannel;
import android.os.Handler;
import android.os.Looper;
@@ -528,7 +529,10 @@
* @param key The key of the notification to snooze
* @param snoozeCriterionId The{@link SnoozeCriterion#getId()} of a context to snooze the
* notification until.
+ * @hide
*/
+ @SystemApi
+ @TestApi
public final void snoozeNotification(String key, String snoozeCriterionId) {
if (!isBound()) return;
try {
@@ -1257,7 +1261,10 @@
/**
* If the {@link NotificationAssistantService} has added people to this notification, then
* this will be non-null.
+ * @hide
*/
+ @SystemApi
+ @TestApi
public List<String> getAdditionalPeople() {
return mOverridePeople;
}
@@ -1266,7 +1273,10 @@
* Returns snooze criteria provided by the {@link NotificationAssistantService}. If your
* user interface displays options for snoozing notifications these criteria should be
* displayed as well.
+ * @hide
*/
+ @SystemApi
+ @TestApi
public List<SnoozeCriterion> getSnoozeCriteria() {
return mSnoozeCriteria;
}
diff --git a/core/java/android/service/notification/SnoozeCriterion.java b/core/java/android/service/notification/SnoozeCriterion.java
index f37f1ae..bd93eff 100644
--- a/core/java/android/service/notification/SnoozeCriterion.java
+++ b/core/java/android/service/notification/SnoozeCriterion.java
@@ -15,13 +15,18 @@
*/
package android.service.notification;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Represents an option to be shown to users for snoozing a notification until a given context
* instead of for a fixed amount of time.
+ * @hide
*/
+@SystemApi
+@TestApi
public final class SnoozeCriterion implements Parcelable {
private final String mId;
private final CharSequence mExplanation;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 97fbfa5..3ca2208 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3076,10 +3076,11 @@
<permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
android:protectionLevel="signature" />
- <!-- Must be required by an {@link
+ <!-- @SystemApi Must be required by an {@link
android.service.notification.NotificationAssistantService} to ensure that only the system
can bind to it.
<p>Protection level: signature
+ @hide
-->
<permission android:name="android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE"
android:protectionLevel="signature" />