Merge "Introduce "qsb_container_hotseat" layout to override the existing search_container_hotseat." into main

This commit is contained in:
Anushree Ganjam
2025-04-16 22:44:12 -07:00
committed by Android (Google) Code Review
3 changed files with 29 additions and 2 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ flag {
}
flag {
name: "enable_qsb_on_hotseat"
namespace: "launcher"
namespace: "launcher_search"
description: "Enable Search App's widget on hotseat"
bug: "405226308"
}
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2025 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.
-->
<View
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="0dp" />
+8 -1
View File
@@ -100,7 +100,14 @@ public class Hotseat extends CellLayout implements Insettable {
public Hotseat(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mQsb = LayoutInflater.from(context).inflate(R.layout.search_container_hotseat, this, false);
if (Flags.enableQsbOnHotseat()) {
mQsb = LayoutInflater.from(context).inflate(R.layout.qsb_container_hotseat, this,
false);
} else {
mQsb = LayoutInflater.from(context).inflate(R.layout.search_container_hotseat, this,
false);
}
addView(mQsb);
mIconsAlphaChannels = new MultiValueAlpha(getShortcutsAndWidgets(),
ALPHA_CHANNEL_CHANNELS_COUNT);