2022-01-24 22:54:21 -05:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2022 The Android Open Source Project
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
*/
|
2022-02-07 22:22:09 -05:00
|
|
|
package com.android.launcher3.taskbar.allapps;
|
2022-01-24 22:54:21 -05:00
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.util.AttributeSet;
|
|
|
|
|
import android.view.WindowInsets;
|
|
|
|
|
|
2022-11-22 17:14:44 -08:00
|
|
|
import com.android.launcher3.DeviceProfile;
|
|
|
|
|
import com.android.launcher3.R;
|
2022-03-16 10:53:39 -07:00
|
|
|
import com.android.launcher3.allapps.ActivityAllAppsContainerView;
|
2022-10-10 23:34:05 +00:00
|
|
|
import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext;
|
2022-01-24 22:54:21 -05:00
|
|
|
|
|
|
|
|
/** All apps container accessible from taskbar. */
|
2022-03-16 10:53:39 -07:00
|
|
|
public class TaskbarAllAppsContainerView extends
|
2022-10-10 23:34:05 +00:00
|
|
|
ActivityAllAppsContainerView<TaskbarOverlayContext> {
|
2022-01-24 22:54:21 -05:00
|
|
|
|
|
|
|
|
public TaskbarAllAppsContainerView(Context context, AttributeSet attrs) {
|
|
|
|
|
this(context, attrs, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public TaskbarAllAppsContainerView(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
|
|
|
super(context, attrs, defStyleAttr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
|
2022-02-07 22:22:09 -05:00
|
|
|
setInsets(insets.getInsets(WindowInsets.Type.systemBars()).toRect());
|
2022-01-24 22:54:21 -05:00
|
|
|
return super.onApplyWindowInsets(insets);
|
|
|
|
|
}
|
2022-11-28 20:53:25 +00:00
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean isSearchSupported() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-11-22 17:14:44 -08:00
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void updateBackground(DeviceProfile deviceProfile) {
|
|
|
|
|
super.updateBackground(deviceProfile);
|
|
|
|
|
// TODO(b/240670050): Remove this and add header protection for the taskbar entrypoint.
|
|
|
|
|
mBottomSheetBackground.setBackgroundResource(R.drawable.bg_rounded_corner_bottom_sheet);
|
|
|
|
|
}
|
2022-01-24 22:54:21 -05:00
|
|
|
}
|