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

The following are Jave code examples for showing how to use writeMap() 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: easyfilemanager   File: BaseActivity.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(action);
    out.writeInt(userMode);
    out.writeInt(acceptMimes.length);
    out.writeStringArray(acceptMimes);
    out.writeInt(userSortOrder);
    out.writeInt(allowMultiple ? 1 : 0);
    out.writeInt(showSize ? 1 : 0);
    out.writeInt(showFolderSize ? 1 : 0);
    out.writeInt(showThumbnail ? 1 : 0);
    out.writeInt(showHiddenFiles ? 1 : 0);
    out.writeInt(localOnly ? 1 : 0);
    out.writeInt(forceAdvanced ? 1 : 0);
    out.writeInt(showAdvanced ? 1 : 0);
    out.writeInt(rootMode ? 1 : 0);
    out.writeInt(stackTouched ? 1 : 0);
    out.writeInt(restored ? 1 : 0);
    DurableUtils.writeToParcel(out, stack);
    out.writeString(currentSearch);
    out.writeMap(dirState);
}
 
Example 2
Project: FireFiles   File: BaseActivity.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(action);
    out.writeInt(userMode);
    out.writeInt(acceptMimes.length);
    out.writeStringArray(acceptMimes);
    out.writeInt(userSortOrder);
    out.writeInt(allowMultiple ? 1 : 0);
    out.writeInt(showSize ? 1 : 0);
    out.writeInt(showFolderSize ? 1 : 0);
    out.writeInt(showThumbnail ? 1 : 0);
    out.writeInt(showHiddenFiles ? 1 : 0);
    out.writeInt(localOnly ? 1 : 0);
    out.writeInt(forceAdvanced ? 1 : 0);
    out.writeInt(showAdvanced ? 1 : 0);
    out.writeInt(rootMode ? 1 : 0);
    out.writeInt(stackTouched ? 1 : 0);
    out.writeInt(restored ? 1 : 0);
    DurableUtils.writeToParcel(out, stack);
    out.writeString(currentSearch);
    out.writeMap(dirState);
}
 
Example 3
Project: simple-share-android   File: BaseActivity.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(action);
    out.writeInt(userMode);
    out.writeInt(acceptMimes.length);
    out.writeStringArray(acceptMimes);
    out.writeInt(userSortOrder);
    out.writeInt(allowMultiple ? 1 : 0);
    out.writeInt(showSize ? 1 : 0);
    out.writeInt(showFolderSize ? 1 : 0);
    out.writeInt(showThumbnail ? 1 : 0);
    out.writeInt(showHiddenFiles ? 1 : 0);
    out.writeInt(localOnly ? 1 : 0);
    out.writeInt(forceAdvanced ? 1 : 0);
    out.writeInt(showAdvanced ? 1 : 0);
    out.writeInt(rootMode ? 1 : 0);
    out.writeInt(stackTouched ? 1 : 0);
    out.writeInt(restored ? 1 : 0);
    DurableUtils.writeToParcel(out, stack);
    out.writeString(currentSearch);
    out.writeMap(dirState);
}
 
Example 4
Project: Dispatch   File: Team.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeString(teamName);
    parcel.writeString(teamID);
    parcel.writeFloat(latitude);
    parcel.writeFloat(longitude);
    parcel.writeString(status);
    parcel.writeInt(travelTime);
    parcel.writeString(travelTimeReadable);
    parcel.writeMap(teamMembers);
    parcel.writeMap(tokens);
}
 
Example 5
Project: VirtualHook   File: ParcelHelper.java   View Source Code Vote up 5 votes
public static void writeMeta(Parcel p, Bundle meta) {
    Map<String, String> map = new HashMap<>();
    if (meta != null) {
        for (String key : meta.keySet()) {
            map.put(key, meta.getString(key));
        }
    }
    p.writeMap(map);
}
 
Example 6
Project: VirtualHook   File: VSPersistenceLayer.java   View Source Code Vote up 5 votes
@Override
public void writePersistenceData(Parcel p) {
    final SparseArray<HashMap<String, VSConfig>> configs = mService.getConfigs();
    int N = configs.size();
    p.writeInt(N);
    while (N-- > 0) {
        int userId = configs.keyAt(N);
        Map<String, VSConfig> userMap = configs.valueAt(N);
        p.writeInt(userId);
        p.writeMap(userMap);
    }

}
 
Example 7
Project: TPlayer   File: ParcelHelper.java   View Source Code Vote up 5 votes
public static void writeMeta(Parcel p, Bundle meta) {
    Map<String, String> map = new HashMap<>();
    if (meta != null) {
        for (String key : meta.keySet()) {
            map.put(key, meta.getString(key));
        }
    }
    p.writeMap(map);
}
 
Example 8
Project: TPlayer   File: VSPersistenceLayer.java   View Source Code Vote up 5 votes
@Override
public void writePersistenceData(Parcel p) {
    final SparseArray<HashMap<String, VSConfig>> configs = mService.getConfigs();
    int N = configs.size();
    p.writeInt(N);
    while (N-- > 0) {
        int userId = configs.keyAt(N);
        Map<String, VSConfig> userMap = configs.valueAt(N);
        p.writeInt(userId);
        p.writeMap(userMap);
    }

}
 
Example 9
Project: TPlayer   File: VirtualLocationService.java   View Source Code Vote up 5 votes
@Override
public void writePersistenceData(Parcel p) {
    mGlobalConfig.writeToParcel(p, 0);
    p.writeInt(mLocConfigs.size());
    for (int i = 0; i < mLocConfigs.size(); i++) {
        int userId = mLocConfigs.keyAt(i);
        Map<String, VLocConfig> pkgs = mLocConfigs.valueAt(i);
        p.writeInt(userId);
        p.writeMap(pkgs);
    }
}
 
Example 10
Project: anycall   File: Anycall.java   View Source Code Vote up 5 votes
public void callMethod(final String className, final String serviceName,
                       final String methodName, final Object... paramsAndListener) {
    Parcel data = Parcel.obtain();
    data.writeInterfaceToken(className);
    for (int i = 0; i < paramsAndListener.length - 1; i++) {
        Object p = paramsAndListener[i];
        if (p instanceof Byte)
            data.writeByte((Byte) p);
        else if (p instanceof Integer)
            data.writeInt((Integer) p);
        else if (p instanceof Long)
            data.writeLong((Long) p);
        else if (p instanceof String)
            data.writeString((String) p);
        else if (p instanceof Bundle)
            data.writeBundle((Bundle) p);
        else if (p instanceof Float)
            data.writeFloat((Float) p);
        else if (p instanceof FileDescriptor)
            data.writeFileDescriptor((FileDescriptor) p);
        else if (p instanceof List)
            data.writeList((List) p);
        else if (p instanceof Exception)
            data.writeException((Exception) p);
        else if (p instanceof IBinder)
            data.writeStrongBinder((IBinder) p);
        else if (p instanceof Double)
            data.writeDouble((Double) p);
        else if (p instanceof Map)
            data.writeMap((Map) p);
        else if (p instanceof boolean[])
            data.writeBooleanArray((boolean[]) p);
        else if (p instanceof byte[])
            data.writeByteArray((byte[]) p);
        else if (p instanceof char[])
            data.writeCharArray((char[]) p);
        else if (p instanceof int[])
            data.writeIntArray((int[]) p);
        else if (p instanceof IBinder[])
            data.writeBinderArray((IBinder[]) p);
        else if (p instanceof double[])
            data.writeDoubleArray((double[]) p);
        else if (p instanceof Object[])
            data.writeArray((Object[]) p);
        else data.writeValue(p);
    }

    Object lastParam = paramsAndListener[paramsAndListener.length - 1];
    CallMethodResultListener listener = lastParam == null ? null :
            (CallMethodResultListener) lastParam;

    callMethod(className, serviceName, methodName, data, listener);
    data.recycle();
}
 
Example 11
Project: aos-MediaLib   File: BaseTags.java   View Source Code Vote up 5 votes
public void writeToParcel(Parcel out, int flags) {
    out.writeLong(mId);
    out.writeString(nonNull(mTitle));
    out.writeFloat(mRating);
    out.writeString(nonNull(mPlot));
    out.writeMap(mActors);
    out.writeStringList(mDirectors);
    out.writeString(mFile!=null?mFile.toString():"");
}
 
Example 12
Project: GitHub   File: FileDownloadHeader.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeMap(mHeaderMap);
}
 
Example 13
Project: JobSchedulerCompat   File: PersistableBundle.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeMap(map);
}
 
Example 14
Project: YuiHatano   File: ContentValues.java   View Source Code Vote up 4 votes
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeMap(this.mValues);
}
 
Example 15
Project: FileDownloader-master   File: FileDownloadHeader.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeMap(mHeaderMap);
}
 
Example 16
Project: KBUnitTest   File: ContentValues.java   View Source Code Vote up 4 votes
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeMap(this.mValues);
}
 
Example 17
Project: RLibrary   File: FileDownloadHeader.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeMap(mHeaderMap);
}