Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6eee7c9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow Nested Bundle with same constraints as top level Bundle" into main

parents 41d370b6 8ab60198
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -529,7 +529,6 @@ public final class OnDeviceIntelligenceManager {
     * {@link Bundle}s annotated with this type will be validated that they are in-effect read-only
     * when passed via Binder IPC. Following restrictions apply :
     * <ul>
     * <li> No Nested Bundles are allowed.</li>
     * <li> {@link PersistableBundle}s are allowed.</li>
     * <li> Any primitive types or their collections can be added as usual.</li>
     * <li>IBinder objects should *not* be added.</li>
+6 −3
Original line number Diff line number Diff line
@@ -82,8 +82,9 @@ public class BundleUtil {
            if (canMarshall(obj) || obj instanceof CursorWindow) {
                continue;
            }

            if (obj instanceof ParcelFileDescriptor) {
            if (obj instanceof Bundle) {
              sanitizeInferenceParams((Bundle) obj);
            } else if (obj instanceof ParcelFileDescriptor) {
                validatePfdReadOnly((ParcelFileDescriptor) obj);
            } else if (obj instanceof SharedMemory) {
                ((SharedMemory) obj).setProtect(PROT_READ);
@@ -128,7 +129,9 @@ public class BundleUtil {
                continue;
            }

            if (obj instanceof ParcelFileDescriptor) {
            if (obj instanceof Bundle) {
                sanitizeResponseParams((Bundle) obj);
            } else if (obj instanceof ParcelFileDescriptor) {
                validatePfdReadOnly((ParcelFileDescriptor) obj);
            } else if (obj instanceof Bitmap) {
                validateBitmap((Bitmap) obj);