FileDocCategorySizeDatePackage
BinderInternal.javaAPI DocAndroid 5.1 API3389Thu Mar 12 22:22:10 GMT 2015com.android.internal.os

BinderInternal

public class BinderInternal extends Object
Private and debugging Binder APIs.
see
IBinder

Fields Summary
static WeakReference
sGcWatcher
static ArrayList
sGcWatchers
static Runnable[]
sTmpWatchers
static long
sLastGcTime
Constructors Summary
Methods Summary
public static voidaddGcWatcher(java.lang.Runnable watcher)

        synchronized (sGcWatchers) {
            sGcWatchers.add(watcher);
        }
    
public static final native voiddisableBackgroundScheduling(boolean disable)
Special for system process to not allow incoming calls to run at background scheduling priority.

hide

static voidforceBinderGc()

        forceGc("Binder");
    
public static voidforceGc(java.lang.String reason)

        EventLog.writeEvent(2741, reason);
        Runtime.getRuntime().gc();
    
public static final native android.os.IBindergetContextObject()
Return the global "context object" of the system. This is usually an implementation of IServiceManager, which you can use to find other services.

public static longgetLastGcTime()
Return the system time (as reported by {@link SystemClock#uptimeMillis SystemClock.uptimeMillis()}) that the last garbage collection occurred in this process. This is not for general application use, and the meaning of "when a garbage collection occurred" will change as the garbage collector evolves.

return
Returns the time as per {@link SystemClock#uptimeMillis SystemClock.uptimeMillis()} of the last garbage collection.

        return sLastGcTime;
    
static final native voidhandleGc()

public static final native voidjoinThreadPool()
Add the calling thread to the IPC thread pool. This function does not return until the current process is exiting.