FileDocCategorySizeDatePackage
MtpPropertyList.javaAPI DocAndroid 5.1 API2823Thu Mar 12 22:22:30 GMT 2015android.mtp

MtpPropertyList

public class MtpPropertyList extends Object
Encapsulates the ObjectPropList dataset used by the GetObjectPropList command. The fields of this class are read by JNI code in android_media_MtpDatabase.cpp

Fields Summary
private int
mCount
private final int
mMaxCount
public int
mResult
public final int[]
mObjectHandles
public final int[]
mPropertyCodes
public final int[]
mDataTypes
public long[]
mLongValues
public String[]
mStringValues
Constructors Summary
public MtpPropertyList(int maxCount, int result)

        mMaxCount = maxCount;
        mResult = result;
        mObjectHandles = new int[maxCount];
        mPropertyCodes = new int[maxCount];
        mDataTypes = new int[maxCount];
        // mLongValues and mStringValues are created lazily since both might not be necessary
    
Methods Summary
public voidappend(int handle, int property, int type, long value)

        int index = mCount++;
        if (mLongValues == null) {
            mLongValues = new long[mMaxCount];
        }
        mObjectHandles[index] = handle;
        mPropertyCodes[index] = property;
        mDataTypes[index] = type;
        mLongValues[index] = value;
    
public voidappend(int handle, int property, java.lang.String value)

        int index = mCount++;
        if (mStringValues == null) {
            mStringValues = new String[mMaxCount];
        }
        mObjectHandles[index] = handle;
        mPropertyCodes[index] = property;
        mDataTypes[index] = MtpConstants.TYPE_STR;
        mStringValues[index] = value;
    
public voidsetResult(int result)

        mResult = result;