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 package com.android.launcher3.taskbar.allapps;
17 
18 import android.content.Context;
19 import android.util.AttributeSet;
20 import android.view.View;
21 
22 import androidx.annotation.Nullable;
23 
24 import com.android.launcher3.ExtendedEditText;
25 import com.android.launcher3.allapps.ActivityAllAppsContainerView;
26 import com.android.launcher3.allapps.SearchUiManager;
27 
28 /** Empty search container for Taskbar All Apps used as a fallback if search is not supported. */
29 public class TaskbarAllAppsFallbackSearchContainer extends View implements SearchUiManager {
TaskbarAllAppsFallbackSearchContainer(Context context, AttributeSet attrs)30     public TaskbarAllAppsFallbackSearchContainer(Context context, AttributeSet attrs) {
31         this(context, attrs, 0);
32     }
33 
TaskbarAllAppsFallbackSearchContainer( Context context, AttributeSet attrs, int defStyleAttr)34     public TaskbarAllAppsFallbackSearchContainer(
35             Context context, AttributeSet attrs, int defStyleAttr) {
36         super(context, attrs, defStyleAttr);
37     }
38 
39     @Override
initializeSearch(ActivityAllAppsContainerView<?> containerView)40     public void initializeSearch(ActivityAllAppsContainerView<?> containerView) {
41         // Do nothing.
42     }
43 
44     @Override
resetSearch()45     public void resetSearch() {
46         // Do nothing.
47     }
48 
49     @Nullable
50     @Override
getEditText()51     public ExtendedEditText getEditText() {
52         return null;
53     }
54 }
55