Update the method to check custom parcelable

Bug: 198449110
Test: Passed MediaSession(2)Test and MediaController2Test
Change-Id: I0b3c514fa04e5d2a9616f360573c15fc5d6d53a0
This commit is contained in:
Hyundo Moon
2021-10-12 11:14:52 +09:00
parent a3101b665b
commit b12dbce52c
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;