Loading api/current.txt +4 −5 Original line number Original line Diff line number Diff line Loading @@ -4454,7 +4454,7 @@ package android.app { ctor public AutomaticZenRule(android.os.Parcel); ctor public AutomaticZenRule(android.os.Parcel); method public int describeContents(); method public int describeContents(); method public android.net.Uri getConditionId(); method public android.net.Uri getConditionId(); method public android.content.ComponentName getConfigurationActivity(); method @Nullable public android.content.ComponentName getConfigurationActivity(); method public long getCreationTime(); method public long getCreationTime(); method public int getInterruptionFilter(); method public int getInterruptionFilter(); method public String getName(); method public String getName(); Loading @@ -4462,7 +4462,7 @@ package android.app { method public android.service.notification.ZenPolicy getZenPolicy(); method public android.service.notification.ZenPolicy getZenPolicy(); method public boolean isEnabled(); method public boolean isEnabled(); method public void setConditionId(android.net.Uri); method public void setConditionId(android.net.Uri); method public void setConfigurationActivity(android.content.ComponentName); method public void setConfigurationActivity(@Nullable android.content.ComponentName); method public void setEnabled(boolean); method public void setEnabled(boolean); method public void setInterruptionFilter(int); method public void setInterruptionFilter(int); method public void setName(String); method public void setName(String); Loading Loading @@ -5819,10 +5819,9 @@ package android.app { method public void notify(String, int, android.app.Notification); method public void notify(String, int, android.app.Notification); method public void notifyAsPackage(@NonNull String, @NonNull String, int, @NonNull android.app.Notification); method public void notifyAsPackage(@NonNull String, @NonNull String, int, @NonNull android.app.Notification); method public boolean removeAutomaticZenRule(String); method public boolean removeAutomaticZenRule(String); method public void revokeNotificationDelegate(); method public void setAutomaticZenRuleState(@NonNull String, @NonNull android.service.notification.Condition); method public void setAutomaticZenRuleState(@NonNull String, @NonNull android.service.notification.Condition); method public final void setInterruptionFilter(int); method public final void setInterruptionFilter(int); method public void setNotificationDelegate(@NonNull String); method public void setNotificationDelegate(@Nullable String); method public void setNotificationPolicy(@NonNull android.app.NotificationManager.Policy); method public void setNotificationPolicy(@NonNull android.app.NotificationManager.Policy); method public boolean shouldHideSilentStatusBarIcons(); method public boolean shouldHideSilentStatusBarIcons(); method public boolean updateAutomaticZenRule(String, android.app.AutomaticZenRule); method public boolean updateAutomaticZenRule(String, android.app.AutomaticZenRule); Loading Loading @@ -41763,7 +41762,7 @@ package android.service.notification { method public int getId(); method public int getId(); method public String getKey(); method public String getKey(); method public android.app.Notification getNotification(); method public android.app.Notification getNotification(); method public String getOpPkg(); method @NonNull public String getOpPkg(); method public String getOverrideGroupKey(); method public String getOverrideGroupKey(); method public String getPackageName(); method public String getPackageName(); method public long getPostTime(); method public long getPostTime(); core/java/android/app/AutomaticZenRule.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -136,7 +136,7 @@ public final class AutomaticZenRule implements Parcelable { * Returns the {@link ComponentName} of the activity that shows configuration options * Returns the {@link ComponentName} of the activity that shows configuration options * for this rule. * for this rule. */ */ public ComponentName getConfigurationActivity() { public @Nullable ComponentName getConfigurationActivity() { return configurationActivity; return configurationActivity; } } Loading Loading @@ -237,9 +237,10 @@ public final class AutomaticZenRule implements Parcelable { /** /** * Sets the configuration activity - an activity that handles * Sets the configuration activity - an activity that handles * {@link NotificationManager#ACTION_AUTOMATIC_ZEN_RULE} that shows the user more information * {@link NotificationManager#ACTION_AUTOMATIC_ZEN_RULE} that shows the user more information * about this rule and/or allows them to configure it. * about this rule and/or allows them to configure it. This is required to be non-null for rules * that are not backed by {@link android.service.notification.ConditionProviderService}. */ */ public void setConfigurationActivity(ComponentName componentName) { public void setConfigurationActivity(@Nullable ComponentName componentName) { this.configurationActivity = componentName; this.configurationActivity = componentName; } } Loading core/java/android/app/INotificationManager.aidl +0 −1 Original line number Original line Diff line number Diff line Loading @@ -192,7 +192,6 @@ interface INotificationManager ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); void setNotificationDelegate(String callingPkg, String delegate); void setNotificationDelegate(String callingPkg, String delegate); void revokeNotificationDelegate(String callingPkg); String getNotificationDelegate(String callingPkg); String getNotificationDelegate(String callingPkg); boolean canNotifyAsPackage(String callingPkg, String targetPkg); boolean canNotifyAsPackage(String callingPkg, String targetPkg); Loading core/java/android/app/NotificationManager.java +2 −16 Original line number Original line Diff line number Diff line Loading @@ -589,11 +589,11 @@ public class NotificationManager { * received on your behalf from the cloud, without your process having to wake up. * received on your behalf from the cloud, without your process having to wake up. * * * You can check if you have an allowed delegate with {@link #getNotificationDelegate()} and * You can check if you have an allowed delegate with {@link #getNotificationDelegate()} and * revoke your delegate with {@link #revokeNotificationDelegate()}. * revoke your delegate by passing null to this method. * * * @param delegate Package name of the app which can send notifications on your behalf. * @param delegate Package name of the app which can send notifications on your behalf. */ */ public void setNotificationDelegate(@NonNull String delegate) { public void setNotificationDelegate(@Nullable String delegate) { INotificationManager service = getService(); INotificationManager service = getService(); String pkg = mContext.getPackageName(); String pkg = mContext.getPackageName(); if (localLOGV) Log.v(TAG, pkg + ": cancelAll()"); if (localLOGV) Log.v(TAG, pkg + ": cancelAll()"); Loading @@ -604,20 +604,6 @@ public class NotificationManager { } } } } /** * Revokes permission for your {@link #setNotificationDelegate(String) notification delegate} * to post notifications on your behalf. */ public void revokeNotificationDelegate() { INotificationManager service = getService(); String pkg = mContext.getPackageName(); try { service.revokeNotificationDelegate(pkg); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** /** * Returns the {@link #setNotificationDelegate(String) delegate} that can post notifications on * Returns the {@link #setNotificationDelegate(String) delegate} that can post notifications on * your behalf, if there currently is one. * your behalf, if there currently is one. Loading core/java/android/service/notification/StatusBarNotification.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.service.notification; package android.service.notification; import android.annotation.NonNull; import android.annotation.UnsupportedAppUsage; import android.annotation.UnsupportedAppUsage; import android.app.Notification; import android.app.Notification; import android.app.NotificationManager; import android.app.NotificationManager; Loading Loading @@ -299,7 +300,7 @@ public class StatusBarNotification implements Parcelable { * Might be different from {@link #getPackageName()} if the app owning the notification has * Might be different from {@link #getPackageName()} if the app owning the notification has * a {@link NotificationManager#setNotificationDelegate(String) notification delegate}. * a {@link NotificationManager#setNotificationDelegate(String) notification delegate}. */ */ public String getOpPkg() { public @NonNull String getOpPkg() { return opPkg; return opPkg; } } Loading Loading
api/current.txt +4 −5 Original line number Original line Diff line number Diff line Loading @@ -4454,7 +4454,7 @@ package android.app { ctor public AutomaticZenRule(android.os.Parcel); ctor public AutomaticZenRule(android.os.Parcel); method public int describeContents(); method public int describeContents(); method public android.net.Uri getConditionId(); method public android.net.Uri getConditionId(); method public android.content.ComponentName getConfigurationActivity(); method @Nullable public android.content.ComponentName getConfigurationActivity(); method public long getCreationTime(); method public long getCreationTime(); method public int getInterruptionFilter(); method public int getInterruptionFilter(); method public String getName(); method public String getName(); Loading @@ -4462,7 +4462,7 @@ package android.app { method public android.service.notification.ZenPolicy getZenPolicy(); method public android.service.notification.ZenPolicy getZenPolicy(); method public boolean isEnabled(); method public boolean isEnabled(); method public void setConditionId(android.net.Uri); method public void setConditionId(android.net.Uri); method public void setConfigurationActivity(android.content.ComponentName); method public void setConfigurationActivity(@Nullable android.content.ComponentName); method public void setEnabled(boolean); method public void setEnabled(boolean); method public void setInterruptionFilter(int); method public void setInterruptionFilter(int); method public void setName(String); method public void setName(String); Loading Loading @@ -5819,10 +5819,9 @@ package android.app { method public void notify(String, int, android.app.Notification); method public void notify(String, int, android.app.Notification); method public void notifyAsPackage(@NonNull String, @NonNull String, int, @NonNull android.app.Notification); method public void notifyAsPackage(@NonNull String, @NonNull String, int, @NonNull android.app.Notification); method public boolean removeAutomaticZenRule(String); method public boolean removeAutomaticZenRule(String); method public void revokeNotificationDelegate(); method public void setAutomaticZenRuleState(@NonNull String, @NonNull android.service.notification.Condition); method public void setAutomaticZenRuleState(@NonNull String, @NonNull android.service.notification.Condition); method public final void setInterruptionFilter(int); method public final void setInterruptionFilter(int); method public void setNotificationDelegate(@NonNull String); method public void setNotificationDelegate(@Nullable String); method public void setNotificationPolicy(@NonNull android.app.NotificationManager.Policy); method public void setNotificationPolicy(@NonNull android.app.NotificationManager.Policy); method public boolean shouldHideSilentStatusBarIcons(); method public boolean shouldHideSilentStatusBarIcons(); method public boolean updateAutomaticZenRule(String, android.app.AutomaticZenRule); method public boolean updateAutomaticZenRule(String, android.app.AutomaticZenRule); Loading Loading @@ -41763,7 +41762,7 @@ package android.service.notification { method public int getId(); method public int getId(); method public String getKey(); method public String getKey(); method public android.app.Notification getNotification(); method public android.app.Notification getNotification(); method public String getOpPkg(); method @NonNull public String getOpPkg(); method public String getOverrideGroupKey(); method public String getOverrideGroupKey(); method public String getPackageName(); method public String getPackageName(); method public long getPostTime(); method public long getPostTime();
core/java/android/app/AutomaticZenRule.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -136,7 +136,7 @@ public final class AutomaticZenRule implements Parcelable { * Returns the {@link ComponentName} of the activity that shows configuration options * Returns the {@link ComponentName} of the activity that shows configuration options * for this rule. * for this rule. */ */ public ComponentName getConfigurationActivity() { public @Nullable ComponentName getConfigurationActivity() { return configurationActivity; return configurationActivity; } } Loading Loading @@ -237,9 +237,10 @@ public final class AutomaticZenRule implements Parcelable { /** /** * Sets the configuration activity - an activity that handles * Sets the configuration activity - an activity that handles * {@link NotificationManager#ACTION_AUTOMATIC_ZEN_RULE} that shows the user more information * {@link NotificationManager#ACTION_AUTOMATIC_ZEN_RULE} that shows the user more information * about this rule and/or allows them to configure it. * about this rule and/or allows them to configure it. This is required to be non-null for rules * that are not backed by {@link android.service.notification.ConditionProviderService}. */ */ public void setConfigurationActivity(ComponentName componentName) { public void setConfigurationActivity(@Nullable ComponentName componentName) { this.configurationActivity = componentName; this.configurationActivity = componentName; } } Loading
core/java/android/app/INotificationManager.aidl +0 −1 Original line number Original line Diff line number Diff line Loading @@ -192,7 +192,6 @@ interface INotificationManager ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); void setNotificationDelegate(String callingPkg, String delegate); void setNotificationDelegate(String callingPkg, String delegate); void revokeNotificationDelegate(String callingPkg); String getNotificationDelegate(String callingPkg); String getNotificationDelegate(String callingPkg); boolean canNotifyAsPackage(String callingPkg, String targetPkg); boolean canNotifyAsPackage(String callingPkg, String targetPkg); Loading
core/java/android/app/NotificationManager.java +2 −16 Original line number Original line Diff line number Diff line Loading @@ -589,11 +589,11 @@ public class NotificationManager { * received on your behalf from the cloud, without your process having to wake up. * received on your behalf from the cloud, without your process having to wake up. * * * You can check if you have an allowed delegate with {@link #getNotificationDelegate()} and * You can check if you have an allowed delegate with {@link #getNotificationDelegate()} and * revoke your delegate with {@link #revokeNotificationDelegate()}. * revoke your delegate by passing null to this method. * * * @param delegate Package name of the app which can send notifications on your behalf. * @param delegate Package name of the app which can send notifications on your behalf. */ */ public void setNotificationDelegate(@NonNull String delegate) { public void setNotificationDelegate(@Nullable String delegate) { INotificationManager service = getService(); INotificationManager service = getService(); String pkg = mContext.getPackageName(); String pkg = mContext.getPackageName(); if (localLOGV) Log.v(TAG, pkg + ": cancelAll()"); if (localLOGV) Log.v(TAG, pkg + ": cancelAll()"); Loading @@ -604,20 +604,6 @@ public class NotificationManager { } } } } /** * Revokes permission for your {@link #setNotificationDelegate(String) notification delegate} * to post notifications on your behalf. */ public void revokeNotificationDelegate() { INotificationManager service = getService(); String pkg = mContext.getPackageName(); try { service.revokeNotificationDelegate(pkg); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** /** * Returns the {@link #setNotificationDelegate(String) delegate} that can post notifications on * Returns the {@link #setNotificationDelegate(String) delegate} that can post notifications on * your behalf, if there currently is one. * your behalf, if there currently is one. Loading
core/java/android/service/notification/StatusBarNotification.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.service.notification; package android.service.notification; import android.annotation.NonNull; import android.annotation.UnsupportedAppUsage; import android.annotation.UnsupportedAppUsage; import android.app.Notification; import android.app.Notification; import android.app.NotificationManager; import android.app.NotificationManager; Loading Loading @@ -299,7 +300,7 @@ public class StatusBarNotification implements Parcelable { * Might be different from {@link #getPackageName()} if the app owning the notification has * Might be different from {@link #getPackageName()} if the app owning the notification has * a {@link NotificationManager#setNotificationDelegate(String) notification delegate}. * a {@link NotificationManager#setNotificationDelegate(String) notification delegate}. */ */ public String getOpPkg() { public @NonNull String getOpPkg() { return opPkg; return opPkg; } } Loading