Java Code Examples for android.os.Parcel.readHashMap()

The following are Jave code examples for showing how to use readHashMap() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: VirtualHook   File: ParcelHelper.java   View Source Code Vote up 7 votes
public static Bundle readMeta(Parcel p) {
    Bundle meta = new Bundle();
    //noinspection unchecked
    Map<String, String> map = p.readHashMap(String.class.getClassLoader());
    for (Map.Entry<String, String> entry : map.entrySet()) {
        meta.putString(entry.getKey(), entry.getValue());
    }
    return meta;
}
 
Example 2
Project: VirtualHook   File: VSPersistenceLayer.java   View Source Code Vote up 6 votes
@Override
public void readPersistenceData(Parcel p) {
    final SparseArray<HashMap<String, VSConfig>> configs = mService.getConfigs();
    int N = p.readInt();
    while (N-- > 0) {
        int userId = p.readInt();
        //noinspection unchecked
        HashMap<String, VSConfig> userMap = p.readHashMap(VSConfig.class.getClassLoader());
        configs.put(userId, userMap);
    }
}
 
Example 3
Project: TPlayer   File: VSPersistenceLayer.java   View Source Code Vote up 6 votes
@Override
public void readPersistenceData(Parcel p) {
    final SparseArray<HashMap<String, VSConfig>> configs = mService.getConfigs();
    int N = p.readInt();
    while (N-- > 0) {
        int userId = p.readInt();
        //noinspection unchecked
        HashMap<String, VSConfig> userMap = p.readHashMap(VSConfig.class.getClassLoader());
        configs.put(userId, userMap);
    }
}
 
Example 4
Project: TPlayer   File: ParcelHelper.java   View Source Code Vote up 5 votes
public static Bundle readMeta(Parcel p) {
    Bundle meta = new Bundle();
    //noinspection unchecked
    Map<String, String> map = p.readHashMap(String.class.getClassLoader());
    for (Map.Entry<String, String> entry : map.entrySet()) {
        meta.putString(entry.getKey(), entry.getValue());
    }
    return meta;
}
 
Example 5
Project: TPlayer   File: VirtualLocationService.java   View Source Code Vote up 5 votes
@Override
public void readPersistenceData(Parcel p) {
    mGlobalConfig.set(new VLocConfig(p));
    mLocConfigs.clear();
    int size = p.readInt();
    while (size-- > 0) {
        int userId = p.readInt();
        //noinspection unchecked
        Map<String, VLocConfig> pkgs = p.readHashMap(getClass().getClassLoader());
        mLocConfigs.put(userId, pkgs);
    }
}
 
Example 6
Project: GitHub   File: FileDownloadHeader.java   View Source Code Vote up 4 votes
protected FileDownloadHeader(Parcel in) {
    //noinspection unchecked
    this.mHeaderMap = in.readHashMap(String.class.getClassLoader());
}
 
Example 7
Project: JobSchedulerCompat   File: PersistableBundle.java   View Source Code Vote up 4 votes
@SuppressWarnings("unchecked")
PersistableBundle(Parcel in) {
    this.map = (HashMap<String, Object>) in.readHashMap(PersistableBundle.class.getClassLoader());
}
 
Example 8
Project: YuiHatano   File: ContentValues.java   View Source Code Vote up 4 votes
public ContentValues createFromParcel(Parcel in) {
            HashMap values = in.readHashMap(null);
//            return new ContentValues(values, null);
            return new ContentValues(values);
        }
 
Example 9
Project: FileDownloader-master   File: FileDownloadHeader.java   View Source Code Vote up 4 votes
protected FileDownloadHeader(Parcel in) {
    //noinspection unchecked
    this.mHeaderMap = in.readHashMap(String.class.getClassLoader());
}
 
Example 10
Project: KBUnitTest   File: ContentValues.java   View Source Code Vote up 4 votes
public ContentValues createFromParcel(Parcel in) {
            HashMap values = in.readHashMap(null);
//            return new ContentValues(values, null);
            return new ContentValues(values);
        }
 
Example 11
Project: RLibrary   File: FileDownloadHeader.java   View Source Code Vote up 4 votes
protected FileDownloadHeader(Parcel in) {
    //noinspection unchecked
    this.mHeaderMap = in.readHashMap(String.class.getClassLoader());
}