Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1833a3a authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Android (Google) Code Review
Browse files

Merge changes from topic "258442632" into tm-qpr-dev

* changes:
  Add panel using TaskView
  Distinguish between selected panel or structure
parents 376c3406 64fdc5c5
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2020 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.
  -->

<com.android.systemui.globalactions.MinHeightScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:scrollbars="none">
  <LinearLayout
      android:id="@+id/global_actions_controls_list"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:layout_marginLeft="@dimen/global_actions_side_margin"
      android:layout_marginRight="@dimen/global_actions_side_margin" />
</com.android.systemui.globalactions.MinHeightScrollView>
 No newline at end of file
+3 −12
Original line number Diff line number Diff line
@@ -15,28 +15,19 @@
     limitations under the License.
-->

<LinearLayout
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/control_detail_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

  <com.android.systemui.globalactions.MinHeightScrollView
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1"
      android:orientation="vertical"
      android:scrollbars="none">

    <LinearLayout
        android:id="@+id/global_actions_controls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipChildren="false"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:clipToPadding="false"
        android:paddingHorizontal="@dimen/controls_padding_horizontal" />

  </com.android.systemui.globalactions.MinHeightScrollView>
</LinearLayout>
</FrameLayout>
+24 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@

  <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
      android:layout_marginTop="@dimen/controls_top_margin"
      android:layout_marginBottom="@dimen/controls_header_bottom_margin">
@@ -71,5 +71,27 @@
        android:background="?android:attr/selectableItemBackgroundBorderless" />
  </LinearLayout>

  <ScrollView
        android:id="@+id/controls_scroll_view"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical"
        android:clipChildren="true"
        android:scrollbars="none">
    <include layout="@layout/global_actions_controls_list_view" />

  </ScrollView>

  <FrameLayout
      android:id="@+id/controls_panel"
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1"
      android:layout_marginLeft="@dimen/global_actions_side_margin"
      android:layout_marginRight="@dimen/global_actions_side_margin"
      android:background="#ff0000"
      android:padding="@dimen/global_actions_side_margin"
      android:visibility="gone"
      />
</merge>
+3 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import com.android.systemui.controls.ControlStatus
import com.android.systemui.util.UserAwareController
import com.android.systemui.controls.management.ControlsFavoritingActivity
import com.android.systemui.controls.ui.ControlsUiController
import com.android.systemui.controls.ui.SelectedItem
import java.util.function.Consumer

/**
@@ -184,8 +185,8 @@ interface ControlsController : UserAwareController {
     */
    fun countFavoritesForComponent(componentName: ComponentName): Int

    /** See [ControlsUiController.getPreferredStructure]. */
    fun getPreferredStructure(): StructureInfo
    /** See [ControlsUiController.getPreferredSelectedItem]. */
    fun getPreferredSelection(): SelectedItem

    /**
     * Interface for structure to pass data to [ControlsFavoritingActivity].
+3 −2
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import com.android.systemui.controls.ControlStatus
import com.android.systemui.controls.ControlsServiceInfo
import com.android.systemui.controls.management.ControlsListingController
import com.android.systemui.controls.ui.ControlsUiController
import com.android.systemui.controls.ui.SelectedItem
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dump.DumpManager
@@ -556,8 +557,8 @@ class ControlsControllerImpl @Inject constructor (
        )
    }

    override fun getPreferredStructure(): StructureInfo {
        return uiController.getPreferredStructure(getFavorites())
    override fun getPreferredSelection(): SelectedItem {
        return uiController.getPreferredSelectedItem(getFavorites())
    }

    override fun dump(pw: PrintWriter, args: Array<out String>) {
Loading