Java Code Examples for android.os.Parcel#readStrongBinder()
The following examples show how to use
android.os.Parcel#readStrongBinder() .
These examples are extracted from open source projects.
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 Project: android_9.0.0_r45 File: WindowInfo.java License: Apache License 2.0 | 6 votes |
private void initFromParcel(Parcel parcel) { type = parcel.readInt(); layer = parcel.readInt(); token = parcel.readStrongBinder(); parentToken = parcel.readStrongBinder(); activityToken = parcel.readStrongBinder(); focused = (parcel.readInt() == 1); boundsInScreen.readFromParcel(parcel); title = parcel.readCharSequence(); accessibilityIdOfAnchor = parcel.readLong(); inPictureInPicture = (parcel.readInt() == 1); final boolean hasChildren = (parcel.readInt() == 1); if (hasChildren) { if (childTokens == null) { childTokens = new ArrayList<IBinder>(); } parcel.readBinderList(childTokens); } }
Example 2
Source Project: android_9.0.0_r45 File: JobParameters.java License: Apache License 2.0 | 6 votes |
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 3
Source Project: android_9.0.0_r45 File: ContentProviderHolder.java License: Apache License 2.0 | 5 votes |
private ContentProviderHolder(Parcel source) { info = ProviderInfo.CREATOR.createFromParcel(source); provider = ContentProviderNative.asInterface( source.readStrongBinder()); connection = source.readStrongBinder(); noReleaseNeeded = source.readInt() != 0; }
Example 4
Source Project: letv File: MediaSessionCompat.java License: Apache License 2.0 | 5 votes |
public Token createFromParcel(Parcel in) { Object readParcelable; if (VERSION.SDK_INT >= 21) { readParcelable = in.readParcelable(null); } else { readParcelable = in.readStrongBinder(); } return new Token(readParcelable); }
Example 5
Source Project: container File: PendingResultData.java License: GNU General Public License v3.0 | 5 votes |
protected PendingResultData(Parcel in) { this.mType = in.readInt(); this.mOrderedHint = in.readByte() != 0; this.mInitialStickyHint = in.readByte() != 0; this.mToken = in.readStrongBinder(); this.mSendingUser = in.readInt(); this.mFlags = in.readInt(); this.mResultCode = in.readInt(); this.mResultData = in.readString(); this.mResultExtras = in.readBundle(); this.mAbortBroadcast = in.readByte() != 0; this.mFinished = in.readByte() != 0; }
Example 6
Source Project: springreplugin File: ParcelBinder.java License: Apache License 2.0 | 4 votes |
private ParcelBinder(Parcel source) { mBinder = source.readStrongBinder(); }
Example 7
Source Project: android_9.0.0_r45 File: InputBinding.java License: Apache License 2.0 | 4 votes |
InputBinding(Parcel source) { mConnection = null; mConnectionToken = source.readStrongBinder(); mUid = source.readInt(); mPid = source.readInt(); }
Example 8
Source Project: android_9.0.0_r45 File: WindowManager.java License: Apache License 2.0 | 4 votes |
public LayoutParams(Parcel in) { width = in.readInt(); height = in.readInt(); x = in.readInt(); y = in.readInt(); type = in.readInt(); flags = in.readInt(); privateFlags = in.readInt(); softInputMode = in.readInt(); layoutInDisplayCutoutMode = in.readInt(); gravity = in.readInt(); horizontalMargin = in.readFloat(); verticalMargin = in.readFloat(); format = in.readInt(); windowAnimations = in.readInt(); alpha = in.readFloat(); dimAmount = in.readFloat(); screenBrightness = in.readFloat(); buttonBrightness = in.readFloat(); rotationAnimation = in.readInt(); token = in.readStrongBinder(); packageName = in.readString(); mTitle = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in); screenOrientation = in.readInt(); preferredRefreshRate = in.readFloat(); preferredDisplayModeId = in.readInt(); systemUiVisibility = in.readInt(); subtreeSystemUiVisibility = in.readInt(); hasSystemUiListeners = in.readInt() != 0; inputFeatures = in.readInt(); userActivityTimeout = in.readLong(); surfaceInsets.left = in.readInt(); surfaceInsets.top = in.readInt(); surfaceInsets.right = in.readInt(); surfaceInsets.bottom = in.readInt(); hasManualSurfaceInsets = in.readInt() != 0; preservePreviousSurfaceInsets = in.readInt() != 0; needsMenuKey = in.readInt(); accessibilityIdOfAnchor = in.readLong(); accessibilityTitle = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in); mColorMode = in.readInt(); hideTimeoutMilliseconds = in.readLong(); }
Example 9
Source Project: paperparcel File: StaticAdapters.java License: Apache License 2.0 | 4 votes |
@Nullable @Override public IBinder readFromParcel(@NonNull Parcel source) { return source.readStrongBinder(); }
Example 10
Source Project: android-test File: ParcelableIBinder.java License: Apache License 2.0 | 4 votes |
protected ParcelableIBinder(Parcel in) { iBinder = in.readStrongBinder(); }
Example 11
Source Project: firebase-jobdispatcher-android File: PendingCallback.java License: Apache License 2.0 | 4 votes |
public PendingCallback(Parcel in) { binder = in.readStrongBinder(); }
Example 12
Source Project: android_9.0.0_r45 File: PendingIntent.java License: Apache License 2.0 | 4 votes |
public PendingIntent createFromParcel(Parcel in) { IBinder target = in.readStrongBinder(); return target != null ? new PendingIntent(target, in.getClassCookie(PendingIntent.class)) : null; }
Example 13
Source Project: parceler File: NonParcelRepository.java License: Apache License 2.0 | 4 votes |
@Override public IBinder nullSafeFromParcel(Parcel parcel) { return parcel.readStrongBinder(); }
Example 14
Source Project: android_9.0.0_r45 File: AssistStructure.java License: Apache License 2.0 | 4 votes |
/** @hide */ public AssistStructure(Parcel in) { mIsHomeActivity = in.readInt() == 1; mReceiveChannel = in.readStrongBinder(); }
Example 15
Source Project: android_9.0.0_r45 File: KeySet.java License: Apache License 2.0 | 4 votes |
/** * @hide */ private static KeySet readFromParcel(Parcel in) { IBinder token = in.readStrongBinder(); return new KeySet(token); }
Example 16
Source Project: springreplugin File: BinderCursor.java License: Apache License 2.0 | 4 votes |
BinderParcelable(Parcel source) { mBinder = source.readStrongBinder(); }
Example 17
Source Project: JobSchedulerCompat File: GcmIntentParser.java License: MIT License | 4 votes |
/** * Iterates over the map looking for the {@link #BUNDLE_KEY_CALLBACK} key to try and read the {@link IBinder} * straight from the parcelled data. This is entirely dependent on the implementation of Parcel, but these specific * parts of {@link Parcel} / {@link Bundle} haven't changed since 2008 and newer versions of Android will ship * with newer versions of Google Play services which embed the IBinder directly into the {@link Bundle} * (no need to deal with the {@link android.os.Parcelable} issues). */ GcmIntentParser(Bundle data) throws RuntimeException { if (data == null) { throw new IllegalArgumentException(); } jobId = Integer.valueOf(data.getString(BUNDLE_KEY_TAG)); extras = data.getBundle(BUNDLE_KEY_EXTRAS); triggeredContentUris = data.getParcelableArrayList(BUNDLE_KEY_TRIGGERED_URIS); if (triggeredContentUris != null) { triggeredContentAuthorities = new ArrayList<>(); for (Uri triggeredContentUri : triggeredContentUris) { triggeredContentAuthorities.add(triggeredContentUri.getAuthority()); } } Parcel parcel = toParcel(data); try { int numEntries = checkNonEmptyBundleHeader(parcel); for (int i = 0; i < numEntries; i++) { String key = null; if (shouldReadKeysAsStrings()) { key = parcel.readString(); } else { Object entryKeyObj = parcel.readValue(getClass().getClassLoader()); if (entryKeyObj instanceof String) { key = (String) entryKeyObj; } } if (key == null) { continue; } if (BUNDLE_KEY_CALLBACK.equals(key) && parcel.readInt() == VAL_PARCELABLE && PENDING_CALLBACK_CLASS.equals(parcel.readString())) { callback = parcel.readStrongBinder(); break; } } } finally { parcel.recycle(); } if (extras == null || callback == null) { throw new IllegalArgumentException(); } }
Example 18
Source Project: external-nfc-api File: Acr1251UReader.java License: Apache License 2.0 | 3 votes |
@Override public Acr1251UReader createFromParcel(Parcel in) { String name = in.readString(); IBinder binder = in.readStrongBinder(); IAcr1251UReaderControl iin = IAcr1251UReaderControl.Stub.asInterface(binder); return new Acr1251UReader(name, iin); }
Example 19
Source Project: external-nfc-api File: Acr1222LReader.java License: Apache License 2.0 | 3 votes |
@Override public Acr1222LReader createFromParcel(Parcel in) { String name = in.readString(); IBinder binder = in.readStrongBinder(); IAcr1222LReaderControl iin = IAcr1222LReaderControl.Stub.asInterface(binder); return new Acr1222LReader(name, iin); }
Example 20
Source Project: external-nfc-api File: Acr1283LReader.java License: Apache License 2.0 | 3 votes |
@Override public Acr1283LReader createFromParcel(Parcel in) { String name = in.readString(); IBinder binder = in.readStrongBinder(); IAcr1283LReaderControl iin = IAcr1283LReaderControl.Stub.asInterface(binder); return new Acr1283LReader(name, iin); }