* commit '09aea29902029b147372817a83a6a25229330523': Fix binder force gc will block binder thread
This commit is contained in:
@@ -20,6 +20,8 @@ import android.os.IBinder;
|
|||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.util.EventLog;
|
import android.util.EventLog;
|
||||||
|
|
||||||
|
import dalvik.system.VMRuntime;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -96,7 +98,7 @@ public class BinderInternal {
|
|||||||
|
|
||||||
public static void forceGc(String reason) {
|
public static void forceGc(String reason) {
|
||||||
EventLog.writeEvent(2741, reason);
|
EventLog.writeEvent(2741, reason);
|
||||||
Runtime.getRuntime().gc();
|
VMRuntime.getRuntime().requestConcurrentGC();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void forceBinderGc() {
|
static void forceBinderGc() {
|
||||||
|
|||||||
Reference in New Issue
Block a user