Initial Taskbar drag-n-drop support for search results.
- Includes initial support for obtaining PendingIntent for ITEM_TYPE_SEARCH_ACTION. - Custom pre-drag conditions for search results can be provided through TaskbarSearchSessionController. - Added detection for telling when DragView shift animation ends for pre-drag condition usage. Test: Manual Bug: 289261756 Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR Change-Id: I52510a6f3ee49968134ecb591ef7c4df711b9d3d
This commit is contained in:
@@ -15,11 +15,14 @@
|
||||
*/
|
||||
package com.android.launcher3.taskbar.allapps;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.appprediction.PredictionRowView;
|
||||
import com.android.launcher3.dragndrop.DragOptions.PreDragCondition;
|
||||
import com.android.launcher3.model.data.AppInfo;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.taskbar.TaskbarControllers;
|
||||
@@ -208,4 +211,12 @@ public final class TaskbarAllAppsController {
|
||||
// Allow null-pointer since this should only be null if the apps view is not showing.
|
||||
return mAppsView.getActiveRecyclerView().computeVerticalScrollOffset();
|
||||
}
|
||||
|
||||
/** @see TaskbarSearchSessionController#createPreDragConditionForSearch(View) */
|
||||
@Nullable
|
||||
public PreDragCondition createPreDragConditionForSearch(View view) {
|
||||
return mSearchSessionController != null
|
||||
? mSearchSessionController.createPreDragConditionForSearch(view)
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user