Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3926e020 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "Parcel: document enforceInterface" into sc-dev am: f07675c4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14631434

Change-Id: I9d5adfe99e10127d823e2c7b5f214793fc016fbd
parents 7e82f476 f07675c4
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -681,12 +681,19 @@ public final class Parcel {
    /**
     * Store or read an IBinder interface token in the parcel at the current
     * {@link #dataPosition}. This is used to validate that the marshalled
     * transaction is intended for the target interface.
     * transaction is intended for the target interface. This is typically written
     * at the beginning of transactions as a header.
     */
    public final void writeInterfaceToken(@NonNull String interfaceName) {
        nativeWriteInterfaceToken(mNativePtr, interfaceName);
    }

    /**
     * Read the header written by writeInterfaceToken and verify it matches
     * the interface name in question. If the wrong interface type is present,
     * {@link SecurityException} is thrown. When used over binder, this exception
     * should propagate to the caller.
     */
    public final void enforceInterface(@NonNull String interfaceName) {
        nativeEnforceInterface(mNativePtr, interfaceName);
    }