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

Commit 10ba9c17 authored by Salvador Martinez's avatar Salvador Martinez
Browse files

Update Wifi Tether band selection UI

This CL updates the preference for selecting the enabled tether bands
to allow individual selection of multiple bands instead of forcing
a single selection. Note that while this makes the UI theoretically
support new bands in the future, the wifi backend only supports
selecting a single band or all bands which this CL does not address.

Test: robotests
Bug: 73102003
Change-Id: Ib2d4a2834c5cd11875515d308f7b20bfc8471959
parent 8a3bcaa3
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="8dp"
    android:paddingStart="@dimen/wifi_ap_band_checkbox_padding">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="8dp"
        android:text="@string/wifi_ap_band_select_one"
        android:textAppearance="?android:attr/textAppearanceSmall"/>

    <CheckBox
        android:id="@+id/box_2g"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/wifi_ap_band_checkbox_padding"
        android:layout_marginTop="@dimen/wifi_ap_band_checkbox_padding"
        android:paddingStart="@dimen/wifi_ap_band_checkbox_padding"
        android:textAppearance="?android:attr/textAppearanceMedium"/>

    <CheckBox
        android:id="@+id/box_5g"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="@dimen/wifi_ap_band_checkbox_padding"
        android:textAppearance="?android:attr/textAppearanceMedium"/>
</LinearLayout>
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -269,7 +269,6 @@
   <!-- Wi-Fi AP band settings.  Either Auto, 2.4GHz or 5GHz. -->
   <!-- Note that adding/removing/moving the items will need wifi settings code change. -->
    <string-array name="wifi_ap_band_config_full">
        <item>@string/wifi_ap_choose_auto</item>
        <item>@string/wifi_ap_choose_2G</item>
        <item>@string/wifi_ap_choose_5G</item>
    </string-array>
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@

    <!-- WiFi Preferences -->
    <dimen name="wifi_divider_height">1px</dimen>
    <dimen name="wifi_ap_band_checkbox_padding">16dp</dimen>

    <!-- Color picker -->
    <dimen name="color_swatch_size">16dp</dimen>
+2 −0
Original line number Diff line number Diff line
@@ -664,6 +664,8 @@
    <string name="save">Save</string>
    <!-- Button label for generic done action [CHAR LIMIT=20] -->
    <string name="done">Done</string>
    <!-- Button label for generic apply action [CHAR LIMIT=20] -->
    <string name="apply">Apply</string>
    <!-- Title of the Settings activity shown within the application itself. -->
    <string name="settings_label">Settings</string>
+5 −2
Original line number Diff line number Diff line
@@ -35,8 +35,11 @@
        android:title="@string/wifi_hotspot_auto_off_title"
        android:summary="@string/wifi_hotspot_auto_off_summary"/>

    <ListPreference
    <com.android.settings.widget.HotspotApBandSelectionPreference
        android:key="wifi_tether_network_ap_band"
        android:title="@string/wifi_hotspot_ap_band_title"
        android:summary="@string/summary_placeholder" />
        android:dialogLayout="@layout/hotspot_ap_band_selection_dialog"
        android:dialogTitle="@string/wifi_hotspot_ap_band_title"
        android:negativeButtonText="@string/cancel"
        android:positiveButtonText="@string/apply"/>
</PreferenceScreen>
 No newline at end of file
Loading