Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +5 −0 Original line number Diff line number Diff line Loading @@ -928,4 +928,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mControllers.dumpLogs(prefix + "\t", pw); mDeviceProfile.dump(this, prefix, pw); } @VisibleForTesting public int getTaskbarAllAppsTopPadding() { return mControllers.taskbarAllAppsController.getTaskbarAllAppsTopPadding(); } } quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +8 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.taskbar.allapps; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import com.android.launcher3.R; import com.android.launcher3.appprediction.PredictionRowView; Loading Loading @@ -123,4 +124,11 @@ public final class TaskbarAllAppsController { .findFixedRowByType(PredictionRowView.class) .setPredictedApps(mPredictedApps); } @VisibleForTesting public int getTaskbarAllAppsTopPadding() { // Allow null-pointer since this should only be null if the apps view is not showing. return mAppsView.getActiveRecyclerView().getClipBounds().top; } } quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +20 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import com.android.quickstep.util.TISBindHelper; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.function.Consumer; import java.util.function.Function; public class QuickstepTestInformationHandler extends TestInformationHandler { Loading Loading @@ -112,6 +113,13 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { resources.getDimensionPixelSize(R.dimen.taskbar_stashed_size)); return response; } case TestProtocol.REQUEST_TASKBAR_ALL_APPS_TOP_PADDING: { return getTISBinderUIProperty(Bundle::putInt, tisBinder -> tisBinder.getTaskbarManager() .getCurrentActivityContext() .getTaskbarAllAppsTopPadding()); } } return super.call(method, arg, extras); Loading Loading @@ -159,4 +167,16 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { throw new RuntimeException(e); } } private <T> Bundle getTISBinderUIProperty( BundleSetter<T> bundleSetter, Function<TouchInteractionService.TISBinder, T> provider) { Bundle response = new Bundle(); runOnTISBinder(tisBinder -> bundleSetter.set( response, TestProtocol.TEST_INFO_RESPONSE_FIELD, provider.apply(tisBinder))); return response; } } src/com/android/launcher3/testing/TestInformationHandler.java +5 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,11 @@ public class TestInformationHandler implements ResourceBasedOverride { return response; } case TestProtocol.REQUEST_ALL_APPS_TOP_PADDING: { return getLauncherUIProperty(Bundle::putInt, l -> l.getAppsView().getActiveRecyclerView().getClipBounds().top); } default: return null; } Loading src/com/android/launcher3/testing/shared/TestProtocol.java +3 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,9 @@ public final class TestProtocol { "get-activities-created-count"; public static final String REQUEST_GET_ACTIVITIES = "get-activities"; public static final String REQUEST_HAS_TIS = "has-touch-interaction-service"; public static final String REQUEST_TASKBAR_ALL_APPS_TOP_PADDING = "taskbar-all-apps-top-padding"; public static final String REQUEST_ALL_APPS_TOP_PADDING = "all-apps-top-padding"; public static final String REQUEST_WORKSPACE_CELL_LAYOUT_SIZE = "workspace-cell-layout-size"; public static final String REQUEST_WORKSPACE_CELL_CENTER = "workspace-cell-center"; Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +5 −0 Original line number Diff line number Diff line Loading @@ -928,4 +928,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mControllers.dumpLogs(prefix + "\t", pw); mDeviceProfile.dump(this, prefix, pw); } @VisibleForTesting public int getTaskbarAllAppsTopPadding() { return mControllers.taskbarAllAppsController.getTaskbarAllAppsTopPadding(); } }
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +8 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.taskbar.allapps; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import com.android.launcher3.R; import com.android.launcher3.appprediction.PredictionRowView; Loading Loading @@ -123,4 +124,11 @@ public final class TaskbarAllAppsController { .findFixedRowByType(PredictionRowView.class) .setPredictedApps(mPredictedApps); } @VisibleForTesting public int getTaskbarAllAppsTopPadding() { // Allow null-pointer since this should only be null if the apps view is not showing. return mAppsView.getActiveRecyclerView().getClipBounds().top; } }
quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +20 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import com.android.quickstep.util.TISBindHelper; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.function.Consumer; import java.util.function.Function; public class QuickstepTestInformationHandler extends TestInformationHandler { Loading Loading @@ -112,6 +113,13 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { resources.getDimensionPixelSize(R.dimen.taskbar_stashed_size)); return response; } case TestProtocol.REQUEST_TASKBAR_ALL_APPS_TOP_PADDING: { return getTISBinderUIProperty(Bundle::putInt, tisBinder -> tisBinder.getTaskbarManager() .getCurrentActivityContext() .getTaskbarAllAppsTopPadding()); } } return super.call(method, arg, extras); Loading Loading @@ -159,4 +167,16 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { throw new RuntimeException(e); } } private <T> Bundle getTISBinderUIProperty( BundleSetter<T> bundleSetter, Function<TouchInteractionService.TISBinder, T> provider) { Bundle response = new Bundle(); runOnTISBinder(tisBinder -> bundleSetter.set( response, TestProtocol.TEST_INFO_RESPONSE_FIELD, provider.apply(tisBinder))); return response; } }
src/com/android/launcher3/testing/TestInformationHandler.java +5 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,11 @@ public class TestInformationHandler implements ResourceBasedOverride { return response; } case TestProtocol.REQUEST_ALL_APPS_TOP_PADDING: { return getLauncherUIProperty(Bundle::putInt, l -> l.getAppsView().getActiveRecyclerView().getClipBounds().top); } default: return null; } Loading
src/com/android/launcher3/testing/shared/TestProtocol.java +3 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,9 @@ public final class TestProtocol { "get-activities-created-count"; public static final String REQUEST_GET_ACTIVITIES = "get-activities"; public static final String REQUEST_HAS_TIS = "has-touch-interaction-service"; public static final String REQUEST_TASKBAR_ALL_APPS_TOP_PADDING = "taskbar-all-apps-top-padding"; public static final String REQUEST_ALL_APPS_TOP_PADDING = "all-apps-top-padding"; public static final String REQUEST_WORKSPACE_CELL_LAYOUT_SIZE = "workspace-cell-layout-size"; public static final String REQUEST_WORKSPACE_CELL_CENTER = "workspace-cell-center"; Loading