Binder.RestoreCallingWorkSource(Int64) Method

Definition

Restores the work source on this thread using a token returned by #setCallingWorkSourceUid(int) or #clearCallingWorkSource().

[Android.Runtime.Register("restoreCallingWorkSource", "(J)V", "", ApiSince=29)]
public static void RestoreCallingWorkSource (long token);
[<Android.Runtime.Register("restoreCallingWorkSource", "(J)V", "", ApiSince=29)>]
static member RestoreCallingWorkSource : int64 -> unit

Parameters

token
Int64
Attributes

Remarks

Restores the work source on this thread using a token returned by #setCallingWorkSourceUid(int) or #clearCallingWorkSource().

A typical use case would be

long token = Binder.setCallingWorkSourceUid(uid);
            try {
              // Call an API.
            } finally {
              Binder.restoreCallingWorkSource(token);
            }

Java documentation for android.os.Binder.restoreCallingWorkSource(long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to