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

The following examples show how to use android.os.Parcel#createTypedArray() .
Example 1
Project: android_9.0.0_r45   File: JobParameters.java    License: Apache License 2.0 6 votes vote down vote up
private JobParameters(Parcel in) {
    jobId = in.readInt();
    extras = in.readPersistableBundle();
    transientExtras = in.readBundle();
    if (in.readInt() != 0) {
        clipData = ClipData.CREATOR.createFromParcel(in);
        clipGrantFlags = in.readInt();
    } else {
        clipData = null;
        clipGrantFlags = 0;
    }
    callback = in.readStrongBinder();
    overrideDeadlineExpired = in.readInt() == 1;
    mTriggeredContentUris = in.createTypedArray(Uri.CREATOR);
    mTriggeredContentAuthorities = in.createStringArray();
    if (in.readInt() != 0) {
        network = Network.CREATOR.createFromParcel(in);
    } else {
        network = null;
    }
    stopReason = in.readInt();
    debugStopReason = in.readString();
}
 
Example 2
Project: android_9.0.0_r45   File: SoundTrigger.java    License: Apache License 2.0 6 votes vote down vote up
private static KeyphraseRecognitionEvent fromParcelForKeyphrase(Parcel in) {
    int status = in.readInt();
    int soundModelHandle = in.readInt();
    boolean captureAvailable = in.readByte() == 1;
    int captureSession = in.readInt();
    int captureDelayMs = in.readInt();
    int capturePreambleMs = in.readInt();
    boolean triggerInData = in.readByte() == 1;
    AudioFormat captureFormat = null;
    if (in.readByte() == 1) {
        int sampleRate = in.readInt();
        int encoding = in.readInt();
        int channelMask = in.readInt();
        captureFormat = (new AudioFormat.Builder())
            .setChannelMask(channelMask)
            .setEncoding(encoding)
            .setSampleRate(sampleRate)
            .build();
    }
    byte[] data = in.readBlob();
    KeyphraseRecognitionExtra[] keyphraseExtras =
            in.createTypedArray(KeyphraseRecognitionExtra.CREATOR);
    return new KeyphraseRecognitionEvent(status, soundModelHandle, captureAvailable,
            captureSession, captureDelayMs, capturePreambleMs, triggerInData,
            captureFormat, data, keyphraseExtras);
}
 
Example 3
Project: android_9.0.0_r45   File: EuiccProfileInfo.java    License: Apache License 2.0 6 votes vote down vote up
private EuiccProfileInfo(Parcel in) {
    mIccid = in.readString();
    mNickname = in.readString();
    mServiceProviderName = in.readString();
    mProfileName = in.readString();
    mProfileClass = in.readInt();
    mState = in.readInt();
    byte exist = in.readByte();
    if (exist == (byte) 1) {
        mCarrierIdentifier = CarrierIdentifier.CREATOR.createFromParcel(in);
    } else {
        mCarrierIdentifier = null;
    }
    mPolicyRules = in.readInt();
    mAccessRules = in.createTypedArray(UiccAccessRule.CREATOR);
}
 
Example 4
Project: android   File: Issue.java    License: MIT License 5 votes vote down vote up
protected Issue(Parcel in) {
    id = in.readString();
    name = in.readString();
    reason = in.readString();
    script = in.readString();
    link = in.readString();
    linkTitle = in.readString();
    active = in.readInt() != 0;
    isSplit = in.readInt() != 0;
    contacts = in.createTypedArrayList(Contact.CREATOR);
    contactAreas = in.createStringArrayList();
    outcomeModels = in.createTypedArrayList(Outcome.CREATOR);
    categories = in.createTypedArray(Category.CREATOR);
}
 
Example 5
Project: android_9.0.0_r45   File: SoundTrigger.java    License: Apache License 2.0 5 votes vote down vote up
private static KeyphraseRecognitionExtra fromParcel(Parcel in) {
    int id = in.readInt();
    int recognitionModes = in.readInt();
    int coarseConfidenceLevel = in.readInt();
    ConfidenceLevel[] confidenceLevels = in.createTypedArray(ConfidenceLevel.CREATOR);
    return new KeyphraseRecognitionExtra(id, recognitionModes, coarseConfidenceLevel,
            confidenceLevels);
}
 
Example 6
Project: android_9.0.0_r45   File: JobInfo.java    License: Apache License 2.0 5 votes vote down vote up
private JobInfo(Parcel in) {
    jobId = in.readInt();
    extras = in.readPersistableBundle();
    transientExtras = in.readBundle();
    if (in.readInt() != 0) {
        clipData = ClipData.CREATOR.createFromParcel(in);
        clipGrantFlags = in.readInt();
    } else {
        clipData = null;
        clipGrantFlags = 0;
    }
    service = in.readParcelable(null);
    constraintFlags = in.readInt();
    triggerContentUris = in.createTypedArray(TriggerContentUri.CREATOR);
    triggerContentUpdateDelay = in.readLong();
    triggerContentMaxDelay = in.readLong();
    if (in.readInt() != 0) {
        networkRequest = NetworkRequest.CREATOR.createFromParcel(in);
    } else {
        networkRequest = null;
    }
    networkDownloadBytes = in.readLong();
    networkUploadBytes = in.readLong();
    minLatencyMillis = in.readLong();
    maxExecutionDelayMillis = in.readLong();
    isPeriodic = in.readInt() == 1;
    isPersisted = in.readInt() == 1;
    intervalMillis = in.readLong();
    flexMillis = in.readLong();
    initialBackoffMillis = in.readLong();
    backoffPolicy = in.readInt();
    hasEarlyConstraint = in.readInt() == 1;
    hasLateConstraint = in.readInt() == 1;
    priority = in.readInt();
    flags = in.readInt();
}
 
Example 7
Project: android_9.0.0_r45   File: ProviderInfo.java    License: Apache License 2.0 5 votes vote down vote up
private ProviderInfo(Parcel in) {
    super(in);
    authority = in.readString();
    readPermission = in.readString();
    writePermission = in.readString();
    grantUriPermissions = in.readInt() != 0;
    uriPermissionPatterns = in.createTypedArray(PatternMatcher.CREATOR);
    pathPermissions = in.createTypedArray(PathPermission.CREATOR);
    multiprocess = in.readInt() != 0;
    initOrder = in.readInt();
    flags = in.readInt();
    isSyncable = in.readInt() != 0;
}
 
Example 8
Project: android-chromium   File: BrailleDisplayProperties.java    License: BSD 2-Clause "Simplified" License 5 votes vote down vote up
private BrailleDisplayProperties(Parcel in) {
    mNumTextCells = in.readInt();
    mNumStatusCells = in.readInt();
    mKeyBindings = in.createTypedArray(BrailleKeyBinding.CREATOR);
    int size = in.readInt();
    Map<String, String> names = new HashMap<String, String>(size);
    for (int i = 0; i < size; ++i) {
        names.put(in.readString(), in.readString());
    }
    mFriendlyKeyNames = Collections.unmodifiableMap(names);
}
 
Example 9
Project: brailleback   File: BrailleDisplayProperties.java    License: Apache License 2.0 5 votes vote down vote up
private BrailleDisplayProperties(Parcel in) {
    mNumTextCells = in.readInt();
    mNumStatusCells = in.readInt();
    mKeyBindings = in.createTypedArray(BrailleKeyBinding.CREATOR);
    int size = in.readInt();
    Map<String, String> names = new HashMap<String, String>(size);
    for (int i = 0; i < size; ++i) {
        names.put(in.readString(), in.readString());
    }
    mFriendlyKeyNames = Collections.unmodifiableMap(names);
}
 
Example 10
Project: android_9.0.0_r45   File: ProgramSelector.java    License: Apache License 2.0 5 votes vote down vote up
private ProgramSelector(Parcel in) {
    mProgramType = in.readInt();
    mPrimaryId = in.readTypedObject(Identifier.CREATOR);
    mSecondaryIds = in.createTypedArray(Identifier.CREATOR);
    if (Stream.of(mSecondaryIds).anyMatch(id -> id == null)) {
        throw new IllegalArgumentException("secondaryIds list must not contain nulls");
    }
    mVendorIds = in.createLongArray();
}
 
Example 11
Project: android_9.0.0_r45   File: SoundTrigger.java    License: Apache License 2.0 5 votes vote down vote up
private static RecognitionConfig fromParcel(Parcel in) {
    boolean captureRequested = in.readByte() == 1;
    boolean allowMultipleTriggers = in.readByte() == 1;
    KeyphraseRecognitionExtra[] keyphrases =
            in.createTypedArray(KeyphraseRecognitionExtra.CREATOR);
    byte[] data = in.readBlob();
    return new RecognitionConfig(captureRequested, allowMultipleTriggers, keyphrases, data);
}
 
Example 12
Project: TelePlus-Android   File: DrmInitData.java    License: GNU General Public License v2.0 4 votes vote down vote up
DrmInitData(Parcel in) {
  schemeType = in.readString();
  schemeDatas = in.createTypedArray(SchemeData.CREATOR);
  schemeDataCount = schemeDatas.length;
}
 
Example 13
Project: android-recipes-app   File: FragmentManager.java    License: Apache License 2.0 4 votes vote down vote up
public FragmentManagerState(Parcel in) {
    mActive = in.createTypedArray(FragmentState.CREATOR);
    mAdded = in.createIntArray();
    mBackStack = in.createTypedArray(BackStackState.CREATOR);
}
 
Example 14
Project: guideshow   File: FragmentManager.java    License: MIT License 4 votes vote down vote up
public FragmentManagerState(Parcel in) {
    mActive = in.createTypedArray(FragmentState.CREATOR);
    mAdded = in.createIntArray();
    mBackStack = in.createTypedArray(BackStackState.CREATOR);
}
 
Example 15
Project: ShaderEditor   File: CubeMapView.java    License: MIT License 4 votes vote down vote up
private SavedState(Parcel in) {
	super(in);

	savedSelectedFace = in.readInt();
	savedFaces = in.createTypedArray(Face.CREATOR);
}
 
Example 16
Project: adt-leanback-support   File: FragmentManager.java    License: Apache License 2.0 4 votes vote down vote up
public FragmentManagerState(Parcel in) {
    mActive = in.createTypedArray(FragmentState.CREATOR);
    mAdded = in.createIntArray();
    mBackStack = in.createTypedArray(BackStackState.CREATOR);
}
 
Example 17
Project: arca-android   File: Insert.java    License: BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public Insert(final Parcel in) {
	super(in);
	mValues = in.createTypedArray(ContentValues.CREATOR);
}
 
Example 18
Project: android_9.0.0_r45   File: GetDefaultDownloadableSubscriptionListResult.java    License: Apache License 2.0 4 votes vote down vote up
private GetDefaultDownloadableSubscriptionListResult(Parcel in) {
    this.result = in.readInt();
    this.mSubscriptions = in.createTypedArray(DownloadableSubscription.CREATOR);
}
 
Example 19
Project: Android-nRF-Toolbox   File: UartConfiguration.java    License: BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private UartConfiguration(final Parcel in) {
	id = in.readLong();
	name = in.readString();
	commands = in.createTypedArray(Command.CREATOR);
}
 
Example 20
Project: protrip   File: Extras.java    License: MIT License 2 votes vote down vote up
private Extras(Parcel in) {

        reviews = in.createTypedArray(Review.CREATOR);
    }