Make some APIs used by ExtService module @SystemApi
These are all pieces of data apps could get anyway; these are code nice-to-haves to reduce code replication Test: make Bug: 122138479 Bug: 138589409 Change-Id: Ie8ffacb6c28840f779c68f7aa95f1405e70f5ce5
This commit is contained in:
@@ -513,6 +513,8 @@ package android.app {
|
||||
}
|
||||
|
||||
public class Notification implements android.os.Parcelable {
|
||||
method @Nullable public android.util.Pair<android.app.RemoteInput,android.app.Notification.Action> findRemoteInputActionPair(boolean);
|
||||
method @NonNull public java.util.List<android.app.Notification.Action> getContextualActions();
|
||||
field public static final String CATEGORY_CAR_EMERGENCY = "car_emergency";
|
||||
field public static final String CATEGORY_CAR_INFORMATION = "car_information";
|
||||
field public static final String CATEGORY_CAR_WARNING = "car_warning";
|
||||
@@ -521,6 +523,10 @@ package android.app {
|
||||
field public static final int FLAG_AUTOGROUP_SUMMARY = 1024; // 0x400
|
||||
}
|
||||
|
||||
public static final class Notification.MessagingStyle.Message {
|
||||
method @Nullable public static android.app.Notification.MessagingStyle.Message getMessageFromBundle(@NonNull android.os.Bundle);
|
||||
}
|
||||
|
||||
public static final class Notification.TvExtender implements android.app.Notification.Extender {
|
||||
ctor public Notification.TvExtender();
|
||||
ctor public Notification.TvExtender(android.app.Notification);
|
||||
@@ -543,6 +549,7 @@ package android.app {
|
||||
method public void populateFromXml(org.xmlpull.v1.XmlPullParser);
|
||||
method public org.json.JSONObject toJson() throws org.json.JSONException;
|
||||
method public void writeXml(org.xmlpull.v1.XmlSerializer) throws java.io.IOException;
|
||||
field public static final int USER_LOCKED_SOUND = 32; // 0x20
|
||||
}
|
||||
|
||||
public final class NotificationChannelGroup implements android.os.Parcelable {
|
||||
@@ -6648,6 +6655,10 @@ package android.service.notification {
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.service.notification.SnoozeCriterion> CREATOR;
|
||||
}
|
||||
|
||||
public class StatusBarNotification implements android.os.Parcelable {
|
||||
method public boolean isAppGroup();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.service.oemlock {
|
||||
|
||||
@@ -3278,6 +3278,7 @@ public class Notification implements Parcelable
|
||||
* @hide
|
||||
*/
|
||||
@Nullable
|
||||
@SystemApi
|
||||
public Pair<RemoteInput, Action> findRemoteInputActionPair(boolean requiresFreeform) {
|
||||
if (actions == null) {
|
||||
return null;
|
||||
@@ -3304,7 +3305,8 @@ public class Notification implements Parcelable
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public List<Notification.Action> getContextualActions() {
|
||||
@SystemApi
|
||||
public @NonNull List<Notification.Action> getContextualActions() {
|
||||
if (actions == null) return Collections.emptyList();
|
||||
|
||||
List<Notification.Action> contextualActions = new ArrayList<>();
|
||||
@@ -7730,7 +7732,8 @@ public class Notification implements Parcelable
|
||||
* @hide
|
||||
*/
|
||||
@Nullable
|
||||
public static Message getMessageFromBundle(Bundle bundle) {
|
||||
@SystemApi
|
||||
public static Message getMessageFromBundle(@NonNull Bundle bundle) {
|
||||
try {
|
||||
if (!bundle.containsKey(KEY_TEXT) || !bundle.containsKey(KEY_TIMESTAMP)) {
|
||||
return null;
|
||||
|
||||
@@ -110,6 +110,7 @@ public final class NotificationChannel implements Parcelable {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final int USER_LOCKED_SOUND = 0x00000020;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.service.notification;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.UnsupportedAppUsage;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
@@ -172,6 +173,7 @@ public class StatusBarNotification implements Parcelable {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public boolean isAppGroup() {
|
||||
if (getNotification().getGroup() != null || getNotification().getSortKey() != null) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user