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

Commit 486b78e4 authored by John Spurlock's avatar John Spurlock
Browse files

QS: Introduce bluetooth control panel.

- Factor out common detail item panel view, share with Wifi.
- Add an empty state (large icon + text)
- Implement connect / disconnect for supported BT profiles.
- Wire up "scanning" state, but still waiting on asset.
- Add BT controller info to dump.

Bug:16235253
Change-Id: Icf854cafba962fe4b63767d7206e309d80b7b87b
parent 030f0b23
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
<!--
Copyright (C) 2014 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
    <size
        android:width="56dp"
        android:height="56dp"/>

    <viewport
        android:viewportWidth="48.0"
        android:viewportHeight="48.0"/>

    <path
        android:fill="@color/qs_detail_empty"
        android:pathData="M35.4,15.4L24.0,4.0l-2.0,0.0l0.0,15.2L12.8,10.0L10.0,12.8L21.2,24.0L10.0,35.2l2.8,2.8l9.2,-9.2L22.0,44.0l2.0,0.0l11.4,-11.4L26.8,24.0L35.4,15.4zM26.0,11.7l3.8,3.8L26.0,19.2L26.0,11.7zM29.8,32.6L26.0,36.3l0.0,-7.5L29.8,32.6z"/>
</vector>
+28 −0
Original line number Diff line number Diff line
<!--
Copyright (C) 2014 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
    <size
        android:width="24dp"
        android:height="24dp"/>

    <viewport
        android:viewportWidth="48.0"
        android:viewportHeight="48.0"/>

    <path
        android:fill="#FFFFFFFF"
        android:pathData="M24.0,4.0C12.9,4.0 4.0,12.9 4.0,24.0s8.9,20.0 20.0,20.0c11.1,0.0 20.0,-8.9 20.0,-20.0S35.1,4.0 24.0,4.0zM34.0,31.2L31.2,34.0L24.0,26.8L16.8,34.0L14.0,31.2l7.2,-7.2L14.0,16.8l2.8,-2.8l7.2,7.2l7.2,-7.2l2.8,2.8L26.8,24.0L34.0,31.2z"/>
</vector>
+28 −0
Original line number Diff line number Diff line
<!--
Copyright (C) 2014 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
    <size
        android:width="56dp"
        android:height="56dp"/>

    <viewport
        android:viewportWidth="48.0"
        android:viewportHeight="48.0"/>

    <path
        android:pathData="M24.0,4.0C15.0,4.0 6.7,7.0 0.0,12.0l24.0,32.0l24.0,-32.0C41.3,7.0 33.0,4.0 24.0,4.0z"
        android:fill="@color/qs_detail_empty" />
</vector>
+12 −2
Original line number Diff line number Diff line
@@ -17,9 +17,9 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/qs_detail_item_height"
    android:gravity="center_vertical"
    android:background="@drawable/btn_borderless_rect"
    android:clickable="true"
    android:gravity="center_vertical"
    android:orientation="horizontal" >

    <ImageView
@@ -29,9 +29,10 @@
        android:layout_marginEnd="12dp" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="20dp"
        android:layout_weight="1"
        android:orientation="vertical" >

        <TextView
@@ -48,4 +49,13 @@
            android:textAppearance="@style/TextAppearance.QS.DetailItemSecondary" />
    </LinearLayout>

    <ImageView
        android:id="@android:id/icon2"
        style="@style/QSBorderlessButton"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:clickable="true"
        android:scaleType="center"
        android:src="@drawable/ic_qs_cancel" />

</LinearLayout>
 No newline at end of file
+49 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2014 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.
-->
<!-- extends FrameLayout -->
<com.android.systemui.qs.QSDetailItems xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" />

    <LinearLayout
        android:id="@android:id/empty"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center_horizontal"
        android:orientation="vertical" >

        <ImageView
            android:id="@android:id/icon"
            android:layout_width="56dp"
            android:layout_height="56dp" />

        <TextView
            android:id="@android:id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:textAppearance="@style/TextAppearance.QS.DetailEmpty" />
    </LinearLayout>

</com.android.systemui.qs.QSDetailItems>
 No newline at end of file
Loading