mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Adding binder tracking support in tests
- Whitelist specific binder calls when handling touch during swipe up gestures - Only track binding for touch handling and certain launcher lifecycle changes for now Bug: 140246642 Change-Id: I6ba30280dd17da358662870f8719ae851536ad8b
This commit is contained in:
@@ -22,6 +22,7 @@ import android.os.Looper;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.launcher3.uioverrides.DejankBinderTracker;
|
||||
import com.android.launcher3.util.ResourceBasedOverride.Overrides;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@@ -41,7 +42,8 @@ public class MainThreadInitializedObject<T> {
|
||||
public T get(Context context) {
|
||||
if (mValue == null) {
|
||||
if (Looper.myLooper() == Looper.getMainLooper()) {
|
||||
mValue = mProvider.get(context.getApplicationContext());
|
||||
mValue = DejankBinderTracker.whitelistIpcs(() ->
|
||||
mProvider.get(context.getApplicationContext()));
|
||||
} else {
|
||||
try {
|
||||
return MAIN_EXECUTOR.submit(() -> get(context)).get();
|
||||
|
||||
Reference in New Issue
Block a user