Enable the new footer actions for everyone
This CL enables the new implementation of the footer actions for everyone. Before this CL, this flag was enabled in teamfood on QPR1 builds starting from TQ1A.220827.001 [1]. Code of the old implementation will be removed in a few weeks, once the new implementation has soaked in a bit. [1] https://android-build.googleplex.com/builds/where-is-my-cl/search/I838318277693d4c7b0c0c6e53df9e16ff1572091 Test: Manual Bug: 242040009 Change-Id: If0305c70dcce3a8004c29e42f4d3188ce74dfa6a
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
</com.android.systemui.statusbar.phone.MultiUserSwitch>
|
||||
|
||||
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout
|
||||
android:id="@+id/settings_button_container"
|
||||
android:id="@id/settings_button_container"
|
||||
android:layout_width="@dimen/qs_footer_action_button_size"
|
||||
android:layout_height="@dimen/qs_footer_action_button_size"
|
||||
android:background="@drawable/qs_footer_action_circle"
|
||||
@@ -85,7 +85,7 @@
|
||||
</com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
|
||||
|
||||
<com.android.systemui.statusbar.AlphaOptimizedImageView
|
||||
android:id="@+id/pm_lite"
|
||||
android:id="@id/pm_lite"
|
||||
android:layout_width="@dimen/qs_footer_action_button_size"
|
||||
android:layout_height="@dimen/qs_footer_action_button_size"
|
||||
android:background="@drawable/qs_footer_action_circle_color"
|
||||
|
||||
@@ -185,5 +185,10 @@
|
||||
<item type="id" name="face_scanning_anim"/>
|
||||
|
||||
<item type="id" name="qqs_tile_layout"/>
|
||||
|
||||
<!-- The buttons in the Quick Settings footer actions.-->
|
||||
<item type="id" name="settings_button_container"/>
|
||||
<item type="id" name="pm_lite"/>
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ public class Flags {
|
||||
public static final ResourceBooleanFlag FULL_SCREEN_USER_SWITCHER =
|
||||
new ResourceBooleanFlag(506, R.bool.config_enableFullscreenUserSwitcher);
|
||||
|
||||
public static final UnreleasedFlag NEW_FOOTER_ACTIONS = new UnreleasedFlag(507, true);
|
||||
public static final ReleasedFlag NEW_FOOTER_ACTIONS = new ReleasedFlag(507);
|
||||
|
||||
/***************************************/
|
||||
// 600- status bar
|
||||
|
||||
@@ -222,6 +222,7 @@ object FooterActionsViewBinder {
|
||||
|
||||
private fun bindButton(button: IconButtonViewHolder, model: FooterActionsButtonViewModel?) {
|
||||
val buttonView = button.view
|
||||
buttonView.id = model?.id ?: View.NO_ID
|
||||
buttonView.isVisible = model != null
|
||||
if (model == null) {
|
||||
return
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.android.systemui.common.shared.model.Icon
|
||||
* power buttons.
|
||||
*/
|
||||
data class FooterActionsButtonViewModel(
|
||||
val id: Int?,
|
||||
val icon: Icon,
|
||||
val iconTint: Int?,
|
||||
@DrawableRes val background: Int,
|
||||
|
||||
@@ -138,6 +138,7 @@ class FooterActionsViewModel(
|
||||
/** The model for the settings button. */
|
||||
val settings: FooterActionsButtonViewModel =
|
||||
FooterActionsButtonViewModel(
|
||||
id = R.id.settings_button_container,
|
||||
Icon.Resource(
|
||||
R.drawable.ic_settings,
|
||||
ContentDescription.Resource(R.string.accessibility_quick_settings_settings)
|
||||
@@ -151,6 +152,7 @@ class FooterActionsViewModel(
|
||||
val power: FooterActionsButtonViewModel? =
|
||||
if (showPowerButton) {
|
||||
FooterActionsButtonViewModel(
|
||||
id = R.id.pm_lite,
|
||||
Icon.Resource(
|
||||
android.R.drawable.ic_lock_power_off,
|
||||
ContentDescription.Resource(R.string.accessibility_quick_settings_power_menu)
|
||||
@@ -256,6 +258,7 @@ class FooterActionsViewModel(
|
||||
}
|
||||
|
||||
return FooterActionsButtonViewModel(
|
||||
id = null,
|
||||
Icon.Loaded(
|
||||
icon,
|
||||
ContentDescription.Loaded(userSwitcherContentDescription(status.currentUserName)),
|
||||
|
||||
Reference in New Issue
Block a user