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

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

Change visibility of *WorkSourceUid APIs to public instead of @SystemApi.

Bug: 127465468
Test: atest BinderWorkSourceTest
Change-Id: Ib5743219ed44b893a64825d3d8c66e2f20b4197f
parent 34495dc2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -34275,6 +34275,7 @@ package android.os {
    ctor public Binder(@Nullable String);
    method public void attachInterface(@Nullable android.os.IInterface, @Nullable String);
    method public static final long clearCallingIdentity();
    method public static final long clearCallingWorkSource();
    method public void dump(@NonNull java.io.FileDescriptor, @Nullable String[]);
    method protected void dump(@NonNull java.io.FileDescriptor, @NonNull java.io.PrintWriter, @Nullable String[]);
    method public void dumpAsync(@NonNull java.io.FileDescriptor, @Nullable String[]);
@@ -34283,6 +34284,7 @@ package android.os {
    method public static final int getCallingUid();
    method public static final int getCallingUidOrThrow();
    method @NonNull public static final android.os.UserHandle getCallingUserHandle();
    method public static final int getCallingWorkSourceUid();
    method @Nullable public String getInterfaceDescriptor();
    method public boolean isBinderAlive();
    method public static final void joinThreadPool();
@@ -34291,6 +34293,8 @@ package android.os {
    method public boolean pingBinder();
    method @Nullable public android.os.IInterface queryLocalInterface(@NonNull String);
    method public static final void restoreCallingIdentity(long);
    method public static final void restoreCallingWorkSource(long);
    method public static final long setCallingWorkSourceUid(int);
    method public final boolean transact(int, @NonNull android.os.Parcel, @Nullable android.os.Parcel, int) throws android.os.RemoteException;
    method public boolean unlinkToDeath(@NonNull android.os.IBinder.DeathRecipient, int);
  }
+0 −4
Original line number Diff line number Diff line
@@ -5143,10 +5143,6 @@ package android.os {
  }
  public class Binder implements android.os.IBinder {
    method public static final long clearCallingWorkSource();
    method public static final int getCallingWorkSourceUid();
    method public static final void restoreCallingWorkSource(long);
    method public static final long setCallingWorkSourceUid(int);
    method public static void setProxyTransactListener(@Nullable android.os.Binder.ProxyTransactListener);
  }
+1 −10
Original line number Diff line number Diff line
@@ -444,24 +444,20 @@ public class Binder implements IBinder {
     *
     * @param workSource The original UID responsible for the binder call.
     * @return token to restore original work source.
     * @hide
     **/
    @CriticalNative
    @SystemApi
    public static final native long setCallingWorkSourceUid(int workSource);

    /**
     * Returns the work source set by the caller.
     *
     * Unlike {@link Binder#getCallingUid()}, this result of this method cannot be trusted. The
     * caller can set the value to whatever he wants. Only use this value if you trust the calling
     * caller can set the value to whatever they want. Only use this value if you trust the calling
     * uid.
     *
     * @return The original UID responsible for the binder transaction.
     * @hide
     */
    @CriticalNative
    @SystemApi
    public static final native int getCallingWorkSourceUid();

    /**
@@ -484,10 +480,8 @@ public class Binder implements IBinder {
     * </pre>
     *
     * @return token to restore original work source.
     * @hide
     **/
    @CriticalNative
    @SystemApi
    public static final native long clearCallingWorkSource();

    /**
@@ -503,11 +497,8 @@ public class Binder implements IBinder {
     *   Binder.restoreCallingWorkSource(token);
     * }
     * </pre>
     *
     * @hide
     **/
    @CriticalNative
    @SystemApi
    public static final native void restoreCallingWorkSource(long token);

    /**