summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alexander Roederer <aroederer@google.com> 2023-10-11 16:15:34 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-10-11 16:15:34 +0000
commitf9b19b9ce2caa769f97cc339035a9c0264ed0380 (patch)
treed2ddabdd5e01cf1c1a185c390d58e0b8f9c38b46
parentb901daf153885ad092cce260cbf736580a4920c5 (diff)
parentc410509f20ecb8ca58f4ff0857489e4895ef996a (diff)
Merge "Remove new TestAPI in NotificationRankingUpdate" into main
-rw-r--r--core/api/test-current.txt4
-rw-r--r--core/java/android/service/notification/NotificationRankingUpdate.java5
2 files changed, 1 insertions, 8 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index b87a6407a195..e94b94a7f58f 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -2957,10 +2957,6 @@ package android.service.notification {
method @Deprecated public boolean isBound();
}
- public class NotificationRankingUpdate implements android.os.Parcelable {
- method public final boolean isFdNotNullAndClosed();
- }
-
}
package android.service.quickaccesswallet {
diff --git a/core/java/android/service/notification/NotificationRankingUpdate.java b/core/java/android/service/notification/NotificationRankingUpdate.java
index 0dad96eb3b5b..79c8fb4a6620 100644
--- a/core/java/android/service/notification/NotificationRankingUpdate.java
+++ b/core/java/android/service/notification/NotificationRankingUpdate.java
@@ -17,7 +17,6 @@ package android.service.notification;
import android.annotation.Nullable;
import android.annotation.SuppressLint;
-import android.annotation.TestApi;
import android.app.Notification;
import android.os.Bundle;
import android.os.Parcel;
@@ -40,7 +39,6 @@ import java.util.List;
* @hide
*/
@SuppressLint({"ParcelNotFinal", "ParcelCreator"})
-@TestApi
public class NotificationRankingUpdate implements Parcelable {
private final NotificationListenerService.RankingMap mRankingMap;
@@ -101,7 +99,7 @@ public class NotificationRankingUpdate implements Parcelable {
throw new RuntimeException(e);
} finally {
mapParcel.recycle();
- if (buffer != null) {
+ if (buffer != null && mRankingMapFd != null) {
mRankingMapFd.unmap(buffer);
mRankingMapFd.close();
}
@@ -140,7 +138,6 @@ public class NotificationRankingUpdate implements Parcelable {
*
* @hide
*/
- @TestApi
public final boolean isFdNotNullAndClosed() {
return mRankingMapFd != null && mRankingMapFd.getFd() == -1;
}