Example usage for android.content ComponentName ComponentName

List of usage examples for android.content ComponentName ComponentName

Introduction

In this page you can find the example usage for android.content ComponentName ComponentName.

Prototype

public ComponentName(Parcel in) 

Source Link

Document

Instantiate a new ComponentName from the data in a Parcel that was previously written with #writeToParcel(Parcel,int) .

Usage

From source file:edu.umich.flowfence.common.QMDescriptor.java

public static QMDescriptor readFromParcel(Parcel source) {
    int kind = source.readInt();
    if (kind == KIND_NULL) {
        return null;
    }/*from  w  w  w .j a  v a 2 s.c  o  m*/

    ComponentName definingClass = new ComponentName(source);
    String methodName = source.readString();
    ArrayList<String> paramTypes = source.createStringArrayList();

    return new QMDescriptor(kind, definingClass, methodName, paramTypes, false);
}

From source file:edu.umich.oasis.common.SodaDescriptor.java

public static SodaDescriptor readFromParcel(Parcel source) {
    int kind = source.readInt();
    if (kind == KIND_NULL) {
        return null;
    }//from   ww w  .  j  ava 2 s  . c  om

    ComponentName definingClass = new ComponentName(source);
    String methodName = source.readString();
    ArrayList<String> paramTypes = source.createStringArrayList();

    return new SodaDescriptor(kind, definingClass, methodName, paramTypes, false);
}

From source file:edu.umich.flowfence.common.TaintSet.java

public static TaintSet readFromParcel(Parcel source) {
    int numTaints = source.readInt();
    if (numTaints == -1) {
        return null;
    }/*w  ww . jav a2s  . co m*/
    if (numTaints == 0) {
        return TaintSet.EMPTY;
    }
    Map<ComponentName, Float> taints = new HashMap<>(numTaints);
    while (numTaints-- > 0) {
        ComponentName taintKind = new ComponentName(source);
        float taintAmount = Math.max(source.readFloat(), 0.0f);
        taints.put(taintKind, taintAmount);
    }
    return new TaintSet(taints);
}