安卓构建: QPP5.190530.015
模拟器: Pixel 2
HashMap<String,Object> map = new HashMap<>();
map.put("key1", true);
map.put("key2", "String");
map.put("key3", 3);
Parcel parcel = Parcel.obtain();
parcel.writeMap(map);
parcel.setDataPosition(0);
ContentValues contentValues = ContentValues.CREATOR.createFromParcel(parcel);
Run Code Online (Sandbox Code Playgroud)
预期结果:
contentValues would contain the data of the given map.
实际结果 :
contentValues is empty