Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e15a184 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Correctly restarting Launcher from OOP tests" into ub-launcher3-qt-r1-dev

parents c127dff1 85385235
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -185,4 +185,8 @@ public class TouchInteractionService extends Service {
        }
        return mMyBinder;
    }

    public static boolean isInputMonitorInitialized() {
        return true;
    }
}
+7 −0
Original line number Diff line number Diff line
@@ -226,12 +226,17 @@ public class TouchInteractionService extends Service implements
    };

    private static boolean sConnected = false;
    private static boolean sInputMonitorInitialized = false;
    private static final SwipeSharedState sSwipeSharedState = new SwipeSharedState();

    public static boolean isConnected() {
        return sConnected;
    }

    public static boolean isInputMonitorInitialized() {
        return sInputMonitorInitialized;
    }

    public static SwipeSharedState getSwipeSharedState() {
        return sSwipeSharedState;
    }
@@ -330,6 +335,7 @@ public class TouchInteractionService extends Service implements
            mInputMonitorCompat.dispose();
            mInputMonitorCompat = null;
        }
        sInputMonitorInitialized = false;
    }

    private void initInputMonitor() {
@@ -347,6 +353,7 @@ public class TouchInteractionService extends Service implements
            Log.e(TAG, "Unable to create input monitor", e);
        }
        initTouchBounds();
        sInputMonitorInitialized = true;
    }

    private int getNavbarSize(String resName) {
+8 −1
Original line number Diff line number Diff line
@@ -10,7 +10,8 @@ import com.android.quickstep.util.LayoutUtils;

public class QuickstepTestInformationHandler extends TestInformationHandler {

    public QuickstepTestInformationHandler(Context context) { }
    public QuickstepTestInformationHandler(Context context) {
    }

    @Override
    public Bundle call(String method) {
@@ -29,6 +30,12 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
                response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) swipeHeight);
                return response;
            }

            case TestProtocol.REQUEST_IS_LAUNCHER_INITIALIZED: {
                response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD,
                        TouchInteractionService.isInputMonitorInitialized());
                break;
            }
        }

        return super.call(method);
+5 −0
Original line number Diff line number Diff line
@@ -74,6 +74,11 @@ public class TestInformationHandler implements ResourceBasedOverride {
                break;
            }

            case TestProtocol.REQUEST_IS_LAUNCHER_INITIALIZED: {
                response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, true);
                break;
            }

            case TestProtocol.REQUEST_ENABLE_DEBUG_TRACING:
                TestProtocol.sDebugTracing = true;
                break;
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ public final class TestProtocol {
            "all-apps-to-overview-swipe-height";
    public static final String REQUEST_HOME_TO_ALL_APPS_SWIPE_HEIGHT =
            "home-to-all-apps-swipe-height";
    public static final String REQUEST_IS_LAUNCHER_INITIALIZED = "is-launcher-initialized";
    public static final String REQUEST_FREEZE_APP_LIST = "freeze-app-list";
    public static final String REQUEST_UNFREEZE_APP_LIST = "unfreeze-app-list";
    public static final String REQUEST_APP_LIST_FREEZE_FLAGS = "app-list-freeze-flags";
Loading