Files
Flexera-Launcher/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
T
Sunny Goyal ab3963ddcf Moving TestInformationProvider to Launcher3 so that it can be used for
testing Launcher3 without quickstep

Also keeping the provider as disabled until needed

Change-Id: Ib5f459e02ae551724b390f3b74f43d601568d749
2019-05-23 14:02:33 -07:00

37 lines
1.3 KiB
Java

package com.android.quickstep;
import android.content.Context;
import android.os.Bundle;
import com.android.launcher3.testing.TestInformationHandler;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.uioverrides.states.OverviewState;
import com.android.quickstep.util.LayoutUtils;
public class QuickstepTestInformationHandler extends TestInformationHandler {
public QuickstepTestInformationHandler(Context context) { }
@Override
public Bundle call(String method) {
final Bundle response = new Bundle();
switch (method) {
case TestProtocol.REQUEST_HOME_TO_OVERVIEW_SWIPE_HEIGHT: {
final float swipeHeight =
OverviewState.getDefaultSwipeHeight(mDeviceProfile);
response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) swipeHeight);
return response;
}
case TestProtocol.REQUEST_BACKGROUND_TO_OVERVIEW_SWIPE_HEIGHT: {
final float swipeHeight =
LayoutUtils.getShelfTrackingDistance(mContext, mDeviceProfile);
response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) swipeHeight);
return response;
}
}
return super.call(method);
}
}