Merge "Update the method to check custom parcelable"

This commit is contained in:
Hyundo Moon
2021-10-13 05:54:45 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 4 deletions

View File

@@ -302,8 +302,9 @@ public class MediaSession2 implements AutoCloseable {
parcel.setDataPosition(0);
Bundle out = parcel.readBundle(null);
// Calling Bundle#size() will trigger Bundle#unparcel().
out.size();
for (String key : out.keySet()) {
out.get(key);
}
} catch (BadParcelableException e) {
Log.d(TAG, "Custom parcelable in bundle.", e);
return true;

View File

@@ -657,8 +657,9 @@ public final class MediaSession {
parcel.setDataPosition(0);
Bundle out = parcel.readBundle(null);
// Calling Bundle#size() will trigger Bundle#unparcel().
out.size();
for (String key : out.keySet()) {
out.get(key);
}
} catch (BadParcelableException e) {
Log.d(TAG, "Custom parcelable in bundle.", e);
return true;