Java Code Examples for android.os.Parcel#readArray()

The following examples show how to use android.os.Parcel#readArray() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ERC875ContractTransaction.java    From alpha-wallet-android with MIT License 6 votes vote down vote up
private ERC875ContractTransaction(Parcel in) {
    address = in.readString();
    name = in.readString();
    balance = in.readString();
    symbol = in.readString();
    int typeCode = in.readInt();
    if (typeCode >= TransactionType.ILLEGAL_VALUE.ordinal()) typeCode = TransactionType.ILLEGAL_VALUE.ordinal();
    operation = TransactionType.values()[typeCode];
    type = in.readInt();
    otherParty = in.readString();
    int arrayCount = in.readInt();
    indices = new ArrayList<>();
    if (arrayCount > 0)
    {
        Object[] readObjArray = in.readArray(Object.class.getClassLoader());

        for (Object o : readObjArray)
        {
            Integer val = (Integer) o;
            indices.add(val);
        }
    }
}
 
Example 2
Source File: ERC721Ticket.java    From alpha-wallet-android with MIT License 6 votes vote down vote up
private ERC721Ticket(Parcel in) {
    super(in);
    balanceArray = new ArrayList<>();
    int objSize = in.readInt();
    int interfaceOrdinal = in.readInt();
    contractType = ContractType.values()[interfaceOrdinal];
    if (objSize > 0)
    {
        Object[] readObjArray = in.readArray(Object.class.getClassLoader());
        for (Object o : readObjArray)
        {
            BigInteger val = (BigInteger)o;
            balanceArray.add(val);
        }
    }
}
 
Example 3
Source File: Ticket.java    From alpha-wallet-android with MIT License 6 votes vote down vote up
private Ticket(Parcel in) {
    super(in);
    balanceArray = new ArrayList<>();
    int objSize = in.readInt();
    int interfaceOrdinal = in.readInt();
    contractType = ContractType.values()[interfaceOrdinal];
    if (objSize > 0)
    {
        Object[] readObjArray = in.readArray(Object.class.getClassLoader());
        for (Object o : readObjArray)
        {
            BigInteger val = (BigInteger)o;
            balanceArray.add(val);
        }
    }
}
 
Example 4
Source File: HistoryData.java    From data-mediator with Apache License 2.0 6 votes vote down vote up
protected HistoryData(Parcel in) {
    this.age = in.readInt();
    this.id = in.readLong();
    this.testShort = (short) in.readInt();
    this.testByte = in.readByte();
    this.testBoolean = in.readByte() != 0;
    this.testFloat = in.readFloat();
    this.testDouble = in.readDouble();
    this.testChar = (char) in.readInt();
    this.testLONG = (Long) in.readValue(Long.class.getClassLoader());
    this.testDOUBLE = (Double) in.readValue(Double.class.getClassLoader());
    this.testCharacter = (Character) in.readSerializable();
    this.testBOOLEAN = (Boolean) in.readValue(Boolean.class.getClassLoader());
    this.testSHORT = (Short) in.readValue(Short.class.getClassLoader());
    this.name = in.readString();
    this.data = in.readParcelable(ResultData.class.getClassLoader());
    this.datas = in.createTypedArrayList(ResultData.CREATOR);
    this.testArrayResultData = in.createTypedArray(ResultData.CREATOR);
    this.testArrayInt = in.createIntArray();
    this.testArrayInteger = (Integer[]) in.readArray(Integer[].class.getClassLoader());
}
 
Example 5
Source File: RRCTask.java    From Mobilyzer with Apache License 2.0 6 votes vote down vote up
protected RRCDesc(Parcel in) {
      super(in);
//      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      echoHost = in.readString();
      target = in.readString();
      MIN = in.readInt();
      MAX = in.readInt();
      port = in.readInt();
      size = in.readInt();
      sizeGranularity = in.readInt();
      DNS = in.readByte() != 0;
      HTTP = in.readByte() != 0;
      TCP = in.readByte() != 0;
      RRC = in.readByte() != 0;
      SIZES = in.readByte() != 0;
      RESULT_VISIBILITY = in.readByte() != 0;
      GIVEUP_THRESHHOLD = in.readInt();
      Object[] temp = in.readArray(Integer.class.getClassLoader());
      times = Arrays.copyOf(temp, temp.length, Integer[].class);
    }
 
Example 6
Source File: LogItem.java    From Cake-VPN with GNU General Public License v2.0 5 votes vote down vote up
public LogItem(Parcel in) {
    mArgs = in.readArray(Object.class.getClassLoader());
    mMessage = in.readString();
    mRessourceId = in.readInt();
    mLevel = VpnStatus.LogLevel.getEnumByValue(in.readInt());
    mVerbosityLevel = in.readInt();
    logtime = in.readLong();


}
 
Example 7
Source File: LogItem.java    From SimpleOpenVpn-Android with Apache License 2.0 5 votes vote down vote up
public LogItem(Parcel in) {
    mArgs = in.readArray(Object.class.getClassLoader());
    mMessage = in.readString();
    mRessourceId = in.readInt();
    mLevel = VpnStatus.LogLevel.getEnumByValue(in.readInt());
    mVerbosityLevel = in.readInt();
    logtime = in.readLong();
}
 
Example 8
Source File: TicketRangeParcel.java    From alpha-wallet-android with MIT License 5 votes vote down vote up
private TicketRangeParcel(Parcel in)
{
    Object[] readObjArray = in.readArray(Object.class.getClassLoader());
    List tIds = new ArrayList<>();
    tIds.addAll(Arrays.asList(readObjArray));

    boolean isChecked = in.readInt() == 1;

    String contractAddress = in.readString();

    range = new TicketRange(tIds, contractAddress, isChecked);
}
 
Example 9
Source File: LogItem.java    From Cybernet-VPN with GNU General Public License v3.0 5 votes vote down vote up
public LogItem(Parcel in) {
    mArgs = in.readArray(Object.class.getClassLoader());
    mMessage = in.readString();
    mRessourceId = in.readInt();
    mLevel = VpnStatus.LogLevel.getEnumByValue(in.readInt());
    mVerbosityLevel = in.readInt();
    logtime = in.readLong();
}
 
Example 10
Source File: LogItem.java    From EasyVPN-Free with GNU General Public License v3.0 5 votes vote down vote up
public LogItem(Parcel in) {
    mArgs = in.readArray(Object.class.getClassLoader());
    mMessage = in.readString();
    mRessourceId = in.readInt();
    mLevel = VpnStatus.LogLevel.getEnumByValue(in.readInt());
    mVerbosityLevel = in.readInt();
    logtime = in.readLong();
}
 
Example 11
Source File: VpnStatus.java    From android with GNU General Public License v3.0 5 votes vote down vote up
public LogItem(Parcel in) {
    mArgs = in.readArray(Object.class.getClassLoader());
    mMessage = in.readString();
    mRessourceId = in.readInt();
    mLevel = LogLevel.getEnumByValue(in.readInt());
    mVerbosityLevel = in.readInt();
    logtime = in.readLong();
}
 
Example 12
Source File: ParcelableResult.java    From android-test with Apache License 2.0 5 votes vote down vote up
private ParcelableResult(Parcel in) {
  this.failures = new ArrayList<>();
  Object[] failures = in.readArray(ParcelableFailure[].class.getClassLoader());
  for (Object failure : failures) {
    this.failures.add((ParcelableFailure) failure);
  }
}
 
Example 13
Source File: LogItem.java    From bitmask_android with GNU General Public License v3.0 5 votes vote down vote up
public LogItem(Parcel in) {
    mArgs = in.readArray(Object.class.getClassLoader());
    mMessage = in.readString();
    mRessourceId = in.readInt();
    mLevel = VpnStatus.LogLevel.getEnumByValue(in.readInt());
    mVerbosityLevel = in.readInt();
    logtime = in.readLong();
}
 
Example 14
Source File: ClassCaller.java    From AppOpsX with MIT License 4 votes vote down vote up
protected ClassCaller(Parcel in) {
    this.packageName = in.readString();
    this.className = in.readString();
    this.sParamsType = in.createStringArray();
    this.params = in.readArray(Object[].class.getClassLoader());
}
 
Example 15
Source File: SystemServiceCaller.java    From AppOpsX with MIT License 4 votes vote down vote up
protected SystemServiceCaller(Parcel in) {
    this.serviceName = in.readString();
    this.methodName = in.readString();
    this.sParamsType = in.createStringArray();
    this.params = in.readArray(Object[].class.getClassLoader());
}
 
Example 16
Source File: MethodInvocation.java    From island with Apache License 2.0 4 votes vote down vote up
private MethodInvocation(final Parcel in) {
	clazz = in.readString();
	args = in.readArray(getClass().getClassLoader());
}