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

Unverified Commit 7f8bc190 authored by Roman Birg's avatar Roman Birg Committed by Michael Bestas
Browse files

SystemUI: Add Profiles tile



Co-authored-by: default avatarBruno Martins <bgcngm@gmail.com>
Co-authored-by: default avatarJoey Rizzoli <joey@lineageos.org>
Co-authored-by: default avatarLuK1337 <priv.luk@gmail.com>
Co-authored-by: default avatarMichael Bestas <mkbestas@lineageos.org>
Co-authored-by: default avatarMichael W <baddaemon87@gmail.com>
Change-Id: I2dd93cd93b5a99d3d5fda9c3d937009f792bdc2e
parent f6098bea
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="lineageos.permission.HARDWARE_ABSTRACTION_ACCESS" />
    <uses-permission android:name="lineageos.permission.WRITE_SETTINGS"/>

    <!-- SystemUI Tuner -->
    <application>
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (c) 2015 The CyanogenMod Project
    Copyright (C) 2017-2018 The LineageOS 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"
    android:width="48dp"
    android:height="48dp"
    android:viewportWidth="24"
    android:viewportHeight="24">

    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M19,5v14H5V5H19
M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z
M17,8 c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1s0.4,1,1,1C16.6,9,17,8.6,17,8z
M13,8c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1s0.4,1,1,1 C12.6,9,13,8.6,13,8z
M9,8c0-0.6-0.4-1-1-1S7,7.4,7,8s0.4,1,1,1S9,8.6,9,8z
M17,13h-6v-2H9v2H7v2h2v2h2v-2h6V13z" />
</vector>
+146 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2022 The LineageOS 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"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:layout_width="@dimen/large_dialog_width"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <androidx.core.widget.NestedScrollView
        android:id="@+id/scroll_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <LinearLayout
                    style="@style/InternetDialog.Network"
                    android:layout_height="@dimen/internet_dialog_wifi_network_height"
                    android:clickable="false"
                    android:focusable="false"
                    android:gravity="center">

                    <FrameLayout
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:clickable="false"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/toggle_title"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:gravity="start|center_vertical"
                            android:text="@string/quick_settings_profiles_label"
                            android:textAppearance="@style/TextAppearance.InternetDialog" />
                    </FrameLayout>

                    <FrameLayout
                        android:layout_width="@dimen/settingslib_switch_track_width"
                        android:layout_height="48dp"
                        android:layout_marginBottom="10dp"
                        android:layout_marginTop="10dp">

                        <Switch
                            android:id="@+id/toggle"
                            android:layout_width="@dimen/settingslib_switch_track_width"
                            android:layout_height="match_parent"
                            android:layout_gravity="center"
                            android:switchMinWidth="@dimen/settingslib_switch_track_width"
                            android:theme="@style/MainSwitch.Settingslib"
                            android:thumb="@drawable/settingslib_thumb_selector"
                            android:track="@drawable/settingslib_track_selector" />
                    </FrameLayout>

                </LinearLayout>

                <LinearLayout
                    android:layout_width="@dimen/internet_dialog_progress_bar_width"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:layout_marginBottom="@dimen/internet_dialog_network_layout_margin"
                    android:orientation="vertical">

                    <View
                        android:id="@+id/divider"
                        android:layout_width="match_parent"
                        android:layout_height="4dp"
                        android:layout_gravity="center_vertical|center_horizontal"
                        android:background="?androidprv:attr/colorSurfaceVariant" />
                </LinearLayout>

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/list_layout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="@dimen/dialog_side_padding"
                    android:layout_marginStart="@dimen/dialog_side_padding"
                    android:nestedScrollingEnabled="false"
                    android:overScrollMode="never"
                    android:scrollbars="vertical" />

                <LinearLayout
                    android:id="@+id/button_layout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="@dimen/dialog_bottom_padding"
                    android:layout_marginEnd="@dimen/dialog_side_padding"
                    android:layout_marginStart="@dimen/dialog_side_padding"
                    android:layout_marginTop="8dp"
                    android:clickable="false"
                    android:focusable="false"
                    android:orientation="horizontal">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="start|center_vertical"
                        android:layout_weight="1"
                        android:orientation="vertical" />

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="end|center_vertical"
                        android:layout_marginStart="16dp">

                        <Button
                            android:id="@+id/done_button"
                            style="@style/Widget.Dialog.Button"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:clickable="true"
                            android:ellipsize="end"
                            android:focusable="true"
                            android:maxLines="1"
                            android:text="@string/inline_done_button" />
                    </LinearLayout>
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </androidx.core.widget.NestedScrollView>
</LinearLayout>
+5 −0
Original line number Diff line number Diff line
@@ -57,6 +57,11 @@
    <string name="accessibility_quick_settings_sync_off">Sync off.</string>
    <string name="accessibility_quick_settings_sync_on">Sync on.</string>

    <!-- System Profiles QS tile -->
    <string name="quick_settings_profiles_label">System profiles</string>
    <string name="accessibility_quick_settings_profiles_off">Profiles off.</string>
    <string name="accessibility_quick_settings_profiles">Profile: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>

    <!-- USB tethering QS tile -->
    <string name="quick_settings_usb_tether_label">USB tethering</string>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@

    <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
    <string name="quick_settings_tiles_stock" translatable="false">
        internet,wifi,cell,bt,flashlight,dnd,alarm,airplane,nfc,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream,font_scaling,ambient_display,aod,caffeine,heads_up,reading_mode,sync,powershare,usb_tether
        internet,wifi,cell,bt,flashlight,dnd,alarm,airplane,nfc,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream,font_scaling,ambient_display,aod,caffeine,heads_up,reading_mode,sync,powershare,profiles,usb_tether
    </string>

    <!-- The tiles to display in QuickSettings -->
Loading