Loading api/system-current.txt +13 −0 Original line number Diff line number Diff line Loading @@ -3971,6 +3971,19 @@ package android.os { field public static final java.lang.String EXTRA_EVENT_TIMESTAMP = "android.os.extra.EVENT_TIMESTAMP"; } 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(android.os.Binder.ProxyTransactListener); } public static abstract interface Binder.ProxyTransactListener { method public abstract void onTransactEnded(java.lang.Object); method public abstract java.lang.Object onTransactStarted(android.os.IBinder, int); } public final class ConfigUpdate { field public static final java.lang.String ACTION_UPDATE_CARRIER_ID_DB = "android.os.action.UPDATE_CARRIER_ID_DB"; field public static final java.lang.String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS"; Loading core/java/android/os/Binder.java +23 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.os; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.util.ExceptionUtils; import android.util.Log; import android.util.Slog; Loading Loading @@ -399,6 +400,9 @@ public class Binder implements IBinder { * reasons, we only support one UID. This UID represents the original user responsible for the * binder calls. * * <p>{@link Binder#restoreCallingWorkSource(long)} must always be called after setting the * worksource. * * <p>A typical use case would be * <pre> * long token = Binder.setCallingWorkSourceUid(uid); Loading @@ -417,6 +421,7 @@ public class Binder implements IBinder { * @hide **/ @CriticalNative @SystemApi public static final native long setCallingWorkSourceUid(int workSource); /** Loading @@ -430,6 +435,7 @@ public class Binder implements IBinder { * @hide */ @CriticalNative @SystemApi public static final native int getCallingWorkSourceUid(); /** Loading @@ -438,10 +444,24 @@ public class Binder implements IBinder { * <p>The work source will be propagated for future outgoing binder transactions * executed on this thread. * * <p>{@link Binder#restoreCallingWorkSource(long)} must always be called after clearing the * worksource. * * <p>A typical use case would be * <pre> * long token = Binder.clearCallingWorkSource(); * try { * // Call an API. * } finally { * Binder.restoreCallingWorkSource(token); * } * </pre> * * @return token to restore original work source. * @hide **/ @CriticalNative @SystemApi public static final native long clearCallingWorkSource(); /** Loading @@ -461,6 +481,7 @@ public class Binder implements IBinder { * @hide **/ @CriticalNative @SystemApi public static final native void restoreCallingWorkSource(long token); /** Loading Loading @@ -601,6 +622,7 @@ public class Binder implements IBinder { * See {@link setProxyTransactListener}. * @hide */ @SystemApi public interface ProxyTransactListener { /** * Called before onTransact. Loading Loading @@ -663,6 +685,7 @@ public class Binder implements IBinder { * <li>Never execute another binder transaction inside the listener. * @hide */ @SystemApi public static void setProxyTransactListener(@Nullable ProxyTransactListener listener) { BinderProxy.setTransactListener(listener); } Loading Loading
api/system-current.txt +13 −0 Original line number Diff line number Diff line Loading @@ -3971,6 +3971,19 @@ package android.os { field public static final java.lang.String EXTRA_EVENT_TIMESTAMP = "android.os.extra.EVENT_TIMESTAMP"; } 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(android.os.Binder.ProxyTransactListener); } public static abstract interface Binder.ProxyTransactListener { method public abstract void onTransactEnded(java.lang.Object); method public abstract java.lang.Object onTransactStarted(android.os.IBinder, int); } public final class ConfigUpdate { field public static final java.lang.String ACTION_UPDATE_CARRIER_ID_DB = "android.os.action.UPDATE_CARRIER_ID_DB"; field public static final java.lang.String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS"; Loading
core/java/android/os/Binder.java +23 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.os; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.util.ExceptionUtils; import android.util.Log; import android.util.Slog; Loading Loading @@ -399,6 +400,9 @@ public class Binder implements IBinder { * reasons, we only support one UID. This UID represents the original user responsible for the * binder calls. * * <p>{@link Binder#restoreCallingWorkSource(long)} must always be called after setting the * worksource. * * <p>A typical use case would be * <pre> * long token = Binder.setCallingWorkSourceUid(uid); Loading @@ -417,6 +421,7 @@ public class Binder implements IBinder { * @hide **/ @CriticalNative @SystemApi public static final native long setCallingWorkSourceUid(int workSource); /** Loading @@ -430,6 +435,7 @@ public class Binder implements IBinder { * @hide */ @CriticalNative @SystemApi public static final native int getCallingWorkSourceUid(); /** Loading @@ -438,10 +444,24 @@ public class Binder implements IBinder { * <p>The work source will be propagated for future outgoing binder transactions * executed on this thread. * * <p>{@link Binder#restoreCallingWorkSource(long)} must always be called after clearing the * worksource. * * <p>A typical use case would be * <pre> * long token = Binder.clearCallingWorkSource(); * try { * // Call an API. * } finally { * Binder.restoreCallingWorkSource(token); * } * </pre> * * @return token to restore original work source. * @hide **/ @CriticalNative @SystemApi public static final native long clearCallingWorkSource(); /** Loading @@ -461,6 +481,7 @@ public class Binder implements IBinder { * @hide **/ @CriticalNative @SystemApi public static final native void restoreCallingWorkSource(long token); /** Loading Loading @@ -601,6 +622,7 @@ public class Binder implements IBinder { * See {@link setProxyTransactListener}. * @hide */ @SystemApi public interface ProxyTransactListener { /** * Called before onTransact. Loading Loading @@ -663,6 +685,7 @@ public class Binder implements IBinder { * <li>Never execute another binder transaction inside the listener. * @hide */ @SystemApi public static void setProxyTransactListener(@Nullable ProxyTransactListener listener) { BinderProxy.setTransactListener(listener); } Loading