Support multiple filters per association request

By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
 - Letting the user select from a list of devices of more then one medium
 type (e.g. Bluetooth and BLE)
 - Allowing to provide multiple criteria for any field (e.g. filtering by
 more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided

Change-Id: I0a978787551a1ee5750ec5544b241d3bbfed5a7c
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index f94e89a..7a39d23 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -601,6 +601,11 @@
         nativeWriteString(mNativePtr, val);
     }
 
+    /** @hide */
+    public final void writeBoolean(boolean val) {
+        writeInt(val ? 1 : 0);
+    }
+
     /**
      * Write a CharSequence value into the parcel at the current dataPosition(),
      * growing dataCapacity() if needed.
@@ -1964,6 +1969,11 @@
         return nativeReadString(mNativePtr);
     }
 
+    /** @hide */
+    public final boolean readBoolean() {
+        return readInt() != 0;
+    }
+
     /**
      * Read a CharSequence value from the parcel at the current dataPosition().
      * @hide
@@ -2490,11 +2500,11 @@
      * @see #writeParcelableList(List, int)
      * @hide
      */
-    public final <T extends Parcelable> void readParcelableList(List<T> list, ClassLoader cl) {
+    public final <T extends Parcelable> List<T> readParcelableList(List<T> list, ClassLoader cl) {
         final int N = readInt();
         if (N == -1) {
             list.clear();
-            return;
+            return list;
         }
 
         final int M = list.size();
@@ -2508,6 +2518,7 @@
         for (; i<M; i++) {
             list.remove(N);
         }
+        return list;
     }
 
     /**