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

Commit c2a85d0b authored by Alisa Hung's avatar Alisa Hung
Browse files

Allow the NAS to update channels and add @SystemApi to...

Allow the NAS to update channels and add @SystemApi to NotificationChannel#setImportantConversation.

This is to support the new conversation notification channel management feature.

Design doc: go/nas-25q2-blue

Bug: 374268500
Bug: 373599715
Change-Id: I044bf6800d092ec59be0d664912c3358b3dba60f
Flag: android.service.notification.notification_conversation_channel_management
API-Coverage-Bug: 374688623
parent 7e9ad046
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1047,6 +1047,7 @@ package android.app {
    method public int getUserLockedFields();
    method public boolean isDeleted();
    method public void populateFromXml(org.xmlpull.v1.XmlPullParser);
    method @FlaggedApi("android.service.notification.notification_conversation_channel_management") public void setImportantConversation(boolean);
    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
+1 −1
Original line number Diff line number Diff line
@@ -377,7 +377,7 @@ package android.app {
    method public void setDeletedTimeMs(long);
    method public void setDemoted(boolean);
    method public void setImportanceLockedByCriticalDeviceFunction(boolean);
    method public void setImportantConversation(boolean);
    method @FlaggedApi("android.service.notification.notification_conversation_channel_management") public void setImportantConversation(boolean);
    method public void setOriginalImportance(int);
    method public void setUserVisibleTaskShown(boolean);
    field @FlaggedApi("android.service.notification.notification_classification") public static final String NEWS_ID = "android.app.news";
+3 −3
Original line number Diff line number Diff line
@@ -551,10 +551,10 @@ public final class NotificationChannel implements Parcelable {
        mDeletedTime = time;
    }

    /**
     * @hide
     */
    /** @hide */
    @TestApi
    @SystemApi
    @FlaggedApi(FLAG_NOTIFICATION_CONVERSATION_CHANNEL_MANAGEMENT)
    public void setImportantConversation(boolean importantConvo) {
        mImportantConvo = importantConvo;
    }
+1 −1
Original line number Diff line number Diff line
@@ -920,7 +920,7 @@ public abstract class NotificationListenerService extends Service {
     * <p>This method will throw a security exception if you don't have access to notifications
     * for the given user.</p>
     * <p>The caller must have {@link CompanionDeviceManager#getAssociations() an associated
     * device} in order to use this method.
     * device} or be the notification assistant in order to use this method.
     *
     * @param pkg The package the channel belongs to.
     * @param user The user the channel belongs to.
+1 −1
Original line number Diff line number Diff line
@@ -6726,7 +6726,7 @@ public class NotificationManagerService extends SystemService {
            Objects.requireNonNull(pkg);
            Objects.requireNonNull(user);
            verifyPrivilegedListener(token, user, false);
            verifyPrivilegedListener(token, user, true);
            final NotificationChannel originalChannel = mPreferencesHelper.getNotificationChannel(
                    pkg, getUidForPackageAndUser(pkg, user), channel.getId(), true);
Loading