libbinder: Add support for Value, Map, and IpPrefix types
Change-Id: I4cd06c7c65f69e6b787111573b29c4ff22f57981
diff --git a/libs/binder/PersistableBundle.cpp b/libs/binder/PersistableBundle.cpp
index e7078ba..d617b5a 100644
--- a/libs/binder/PersistableBundle.cpp
+++ b/libs/binder/PersistableBundle.cpp
@@ -17,6 +17,7 @@
#define LOG_TAG "PersistableBundle"
#include <binder/PersistableBundle.h>
+#include <private/binder/ParcelValTypes.h>
#include <limits>
@@ -35,27 +36,13 @@
using std::map;
using std::set;
using std::vector;
+using namespace ::android::binder;
enum {
// Keep in sync with BUNDLE_MAGIC in frameworks/base/core/java/android/os/BaseBundle.java.
BUNDLE_MAGIC = 0x4C444E42,
};
-enum {
- // Keep in sync with frameworks/base/core/java/android/os/Parcel.java.
- VAL_STRING = 0,
- VAL_INTEGER = 1,
- VAL_LONG = 6,
- VAL_DOUBLE = 8,
- VAL_BOOLEAN = 9,
- VAL_STRINGARRAY = 14,
- VAL_INTARRAY = 18,
- VAL_LONGARRAY = 19,
- VAL_BOOLEANARRAY = 23,
- VAL_PERSISTABLEBUNDLE = 25,
- VAL_DOUBLEARRAY = 28,
-};
-
namespace {
template <typename T>
bool getValue(const android::String16& key, T* out, const map<android::String16, T>& map) {