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

Commit 4c6d2c76 authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge "Remove unneeded methods" into oc-dev

am: 9a8f6418

Change-Id: I5532580c81fcb337bf7a7d22cf148b72f73ba8f6
parents b9a8fe0b 9a8f6418
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -40359,7 +40359,6 @@ package android.service.notification {
    method public int getUser();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.notification.Adjustment> CREATOR;
    field public static final java.lang.String KEY_CHANNEL_ID = "key_channel_id";
    field public static final java.lang.String KEY_PEOPLE = "key_people";
    field public static final java.lang.String KEY_SNOOZE_CRITERIA = "key_snooze_criteria";
  }
@@ -40414,14 +40413,10 @@ package android.service.notification {
    ctor public NotificationAssistantService();
    method public final void adjustNotification(android.service.notification.Adjustment);
    method public final void adjustNotifications(java.util.List<android.service.notification.Adjustment>);
    method public void createNotificationChannel(java.lang.String, android.app.NotificationChannel);
    method public void deleteNotificationChannel(java.lang.String, java.lang.String);
    method public java.util.List<android.app.NotificationChannel> getNotificationChannels(java.lang.String);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
    method public abstract void onNotificationSnoozedUntilContext(android.service.notification.StatusBarNotification, java.lang.String);
    method public final void unsnoozeNotification(java.lang.String);
    method public void updateNotificationChannel(java.lang.String, android.app.NotificationChannel);
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationAssistantService";
  }
+0 −5
Original line number Diff line number Diff line
@@ -37455,7 +37455,6 @@ package android.service.notification {
    method public int getUser();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.notification.Adjustment> CREATOR;
    field public static final java.lang.String KEY_CHANNEL_ID = "key_channel_id";
    field public static final java.lang.String KEY_PEOPLE = "key_people";
    field public static final java.lang.String KEY_SNOOZE_CRITERIA = "key_snooze_criteria";
  }
@@ -37510,14 +37509,10 @@ package android.service.notification {
    ctor public NotificationAssistantService();
    method public final void adjustNotification(android.service.notification.Adjustment);
    method public final void adjustNotifications(java.util.List<android.service.notification.Adjustment>);
    method public void createNotificationChannel(java.lang.String, android.app.NotificationChannel);
    method public void deleteNotificationChannel(java.lang.String, java.lang.String);
    method public java.util.List<android.app.NotificationChannel> getNotificationChannels(java.lang.String);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
    method public abstract void onNotificationSnoozedUntilContext(android.service.notification.StatusBarNotification, java.lang.String);
    method public final void unsnoozeNotification(java.lang.String);
    method public void updateNotificationChannel(java.lang.String, android.app.NotificationChannel);
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationAssistantService";
  }
+0 −4
Original line number Diff line number Diff line
@@ -104,10 +104,6 @@ interface INotificationManager
    void applyEnqueuedAdjustmentFromAssistant(in INotificationListener token, in Adjustment adjustment);
    void applyAdjustmentFromAssistant(in INotificationListener token, in Adjustment adjustment);
    void applyAdjustmentsFromAssistant(in INotificationListener token, in List<Adjustment> adjustments);
    void createNotificationChannelFromAssistant(in INotificationListener token, String pkg, in NotificationChannel channel);
    void updateNotificationChannelFromAssistant(in INotificationListener token, String pkg, in NotificationChannel channel);
    void deleteNotificationChannelFromAssistant(in INotificationListener token, String pkg, String channelId);
    ParceledListSlice getNotificationChannelsFromAssistant(in INotificationListener token, String pkg);
    void unsnoozeNotificationFromAssistant(in INotificationListener token, String key);

    ComponentName getEffectsSuppressor();
+0 −4
Original line number Diff line number Diff line
@@ -35,10 +35,6 @@ public final class Adjustment implements Parcelable {
    private final Bundle mSignals;
    private final int mUser;

    /**
     * Data type: {@code String}. See {@link NotificationChannel#getId()}.
     */
    public static final String KEY_CHANNEL_ID = "key_channel_id";
    /**
     * Data type: ArrayList of {@code String}, where each is a representation of a
     * {@link android.provider.ContactsContract.Contacts#CONTENT_LOOKUP_URI}.
+0 −63
Original line number Diff line number Diff line
@@ -138,69 +138,6 @@ public abstract class NotificationAssistantService extends NotificationListenerS
        }
    }

    /**
     * Creates a notification channel that notifications can be posted to for a given package.
     *
     * @param pkg The package to create a channel for.
     * @param channel  the channel to attempt to create.
     */
    public void createNotificationChannel(@NonNull String pkg,
            @NonNull NotificationChannel channel) {
        if (!isBound()) return;
        try {
            getNotificationInterface().createNotificationChannelFromAssistant(
                    mWrapper, pkg, channel);
        } catch (RemoteException e) {
            Log.v(TAG, "Unable to contact notification manager", e);
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Updates a notification channel for a given package.
     *
     * @param pkg The package to the channel belongs to.
     * @param channel the channel to attempt to update.
     */
    public void updateNotificationChannel(@NonNull String pkg,
            @NonNull NotificationChannel channel) {
        if (!isBound()) return;
        try {
            getNotificationInterface().updateNotificationChannelFromAssistant(
                    mWrapper, pkg, channel);
        } catch (RemoteException e) {
            Log.v(TAG, "Unable to contact notification manager", e);
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Returns all notification channels belonging to the given package.
     */
    public List<NotificationChannel> getNotificationChannels(@NonNull String pkg) {
        if (!isBound()) return null;
        try {
            return getNotificationInterface().getNotificationChannelsFromAssistant(
                    mWrapper, pkg).getList();
        } catch (RemoteException e) {
            Log.v(TAG, "Unable to contact notification manager", e);
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Deletes the given notification channel.
     */
    public void deleteNotificationChannel(@NonNull String pkg, @NonNull String channelId) {
        if (!isBound()) return;
        try {
            getNotificationInterface().deleteNotificationChannelFromAssistant(
                    mWrapper, pkg, channelId);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }


    private class NotificationAssistantServiceWrapper extends NotificationListenerWrapper {
        @Override
Loading