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

Commit d3d065dc authored by Olivier Gaillard's avatar Olivier Gaillard
Browse files

Add a getTransactionName method to Binder.

This method transforms a binder call code to a human readable name.
AIDL generator will have the ability to override this method.

Test: n/a
Bug: 111200705

Change-Id: Ic1d82e9b403ab40c8b625ca977a819ccd521dd97
parent 0faecf7b
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -535,6 +535,20 @@ public class Binder implements IBinder {
        return false;
    }

    /**
     * Resolves a transaction code to a human readable name.
     *
     * <p>Default implementation is a stub that returns null.
     * <p>AIDL generated code will return the original method name.
     *
     * @param transactionCode The code to resolve.
     * @return A human readable name.
     * @hide
     */
    public @Nullable String getTransactionName(int transactionCode) {
        return null;
    }

    /**
     * Implemented to call the more convenient version
     * {@link #dump(FileDescriptor, PrintWriter, String[])}.