1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.launcher3.taskbar; 18 19 /** 20 * Various utilities shared amongst the Taskbar's classes. 21 */ 22 public final class Utilities { 23 Utilities()24 private Utilities() {} 25 26 /** 27 * Sets drag, long-click, and split selection behavior on 1P and 3P launchers with Taskbar 28 */ setOverviewDragState(TaskbarControllers controllers, boolean disallowGlobalDrag, boolean disallowLongClick, boolean allowInitialSplitSelection)29 static void setOverviewDragState(TaskbarControllers controllers, 30 boolean disallowGlobalDrag, boolean disallowLongClick, 31 boolean allowInitialSplitSelection) { 32 controllers.taskbarDragController.setDisallowGlobalDrag(disallowGlobalDrag); 33 controllers.taskbarDragController.setDisallowLongClick(disallowLongClick); 34 controllers.taskbarAllAppsController.setDisallowGlobalDrag(disallowGlobalDrag); 35 controllers.taskbarAllAppsController.setDisallowLongClick(disallowLongClick); 36 controllers.taskbarPopupController.setAllowInitialSplitSelection( 37 allowInitialSplitSelection); 38 } 39 } 40