summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Reynolds <juliacr@google.com> 2024-05-23 09:53:32 -0400
committer Julia Reynolds <juliacr@google.com> 2024-06-07 15:37:42 +0000
commit93193a6a7601efab4b21b57a1ffa6973a957ab80 (patch)
tree4bab11b1dda01cee0d967f5ff66853cabf1b5e90
parent6b1196d01d0bea693e2e233000167a996d09eadf (diff)
Remove legacy behavior for pre-21 apps
This method, which has been deprecated and targetSdk gated for a decade is now a no-op. Test: none (test that tested the API behavior is removed) Bug: 340711546 Flag: BUG_FIX_ONLY Change-Id: I84b6186940a76a9329327d85e81dd2e8db0ba246 (cherry picked from commit ea6c36e8fc35cb2abcf80b27373956b7ce8f23a7)
-rwxr-xr-xservices/core/java/com/android/server/notification/NotificationManagerService.java30
1 files changed, 2 insertions, 28 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 02265aca79de..3331c2559da3 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -5392,34 +5392,8 @@ public class NotificationManagerService extends SystemService {
@Override
public void cancelNotificationFromListener(INotificationListener token, String pkg,
String tag, int id) {
- final int callingUid = Binder.getCallingUid();
- final int callingPid = Binder.getCallingPid();
- final long identity = Binder.clearCallingIdentity();
- final int packageImportance;
- try {
- if (lifetimeExtensionRefactor()) {
- packageImportance = getPackageImportanceWithIdentity(pkg);
- } else {
- packageImportance = IMPORTANCE_NONE;
- }
- synchronized (mNotificationLock) {
- final ManagedServiceInfo info = mListeners.checkServiceTokenLocked(token);
- int cancelReason = REASON_LISTENER_CANCEL;
- if (mAssistants.isServiceTokenValidLocked(token)) {
- cancelReason = REASON_ASSISTANT_CANCEL;
- }
- if (info.supportsProfiles()) {
- Slog.e(TAG, "Ignoring deprecated cancelNotification(pkg, tag, id) "
- + "from " + info.component
- + " use cancelNotification(key) instead.");
- } else {
- cancelNotificationFromListenerLocked(info, callingUid, callingPid,
- pkg, tag, id, info.userid, cancelReason, packageImportance);
- }
- }
- } finally {
- Binder.restoreCallingIdentity(identity);
- }
+ Slog.e(TAG, "Ignoring deprecated cancelNotification(pkg, tag, id) use " +
+ "cancelNotification(key) instead.");
}
/**