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

Commit 8ab60198 authored by sandeepbandaru's avatar sandeepbandaru
Browse files

Allow Nested Bundle with same constraints as top level Bundle

Test: cts
Change-Id: I2dad76dc29f78c558732538a5652c6eecca94c16
parent 84bc45af
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line 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
     * {@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 :
     * when passed via Binder IPC. Following restrictions apply :
     * <ul>
     * <ul>
     * <li> No Nested Bundles are allowed.</li>
     * <li> {@link PersistableBundle}s are allowed.</li>
     * <li> {@link PersistableBundle}s are allowed.</li>
     * <li> Any primitive types or their collections can be added as usual.</li>
     * <li> Any primitive types or their collections can be added as usual.</li>
     * <li>IBinder objects should *not* be added.</li>
     * <li>IBinder objects should *not* be added.</li>
+6 −3
Original line number Original line Diff line number Diff line
@@ -82,8 +82,9 @@ public class BundleUtil {
            if (canMarshall(obj) || obj instanceof CursorWindow) {
            if (canMarshall(obj) || obj instanceof CursorWindow) {
                continue;
                continue;
            }
            }

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


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