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

Commit d6fa02f4 authored by Jason Monk's avatar Jason Monk
Browse files

Tuner: Allow lockscreen launch targets to be customized

Visuals need SIGNIFICANT WORK. Otherwise seems good.

Test: Manual
Change-Id: I911217aca6dba41bf1b49fc3dd19cbfef443e6bd
parent 1597e054
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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="48dp"
    android:paddingStart="4dp"
    android:paddingEnd="4dp"
    android:clickable="true"
    android:gravity="center"
    android:background="?android:attr/selectableItemBackground">

    <ImageView
        android:id="@android:id/icon"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:padding="12dp" />

    <TextView android:id="@android:id/title"
        android:layout_height="wrap_content"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_gravity="center_vertical"
        android:textAppearance="?android:attr/textAppearanceListItem"
        android:textColor="?android:attr/textColorPrimary" />

    <com.android.systemui.statusbar.phone.ExpandableIndicator
        android:id="@+id/expand"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:padding="12dp"
        android:visibility="gone" />

</LinearLayout>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->

<android.support.v7.widget.RecyclerView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="200dp"
    android:gravity="center" />
+14 −0
Original line number Diff line number Diff line
@@ -1752,5 +1752,19 @@
    <!-- Text body for dialog alerting user that their phone has reached a certain temperature and may start to slow down in order to cool down. [CHAR LIMIT=300] -->
    <string name="high_temp_dialog_message">Your phone will automatically try to cool down. You can still use your phone, but it may run slower.\n\nOnce your phone has cooled down, it will run normally.</string>

    <!-- SysUI Tuner: Group of settings for left lock screen affordance [CHAR LIMIT=60] -->
    <string name="lockscreen_left">Left</string>

    <!-- SysUI Tuner: Group of settings for right lock screen affordance [CHAR LIMIT=60] -->
    <string name="lockscreen_right">Right</string>

    <!-- SysUI Tuner: Switch controlling whether to customize lock screen button [CHAR LIMIT=60] -->
    <string name="lockscreen_customize">Customize shortcut</string>

    <!-- SysUI Tuner: Button to select lock screen shortcut [CHAR LIMIT=60] -->
    <string name="lockscreen_shortcut">Shortcut</string>

    <!-- SysUI Tuner: Switch to control if device gets unlocked [CHAR LIMIT=60] -->
    <string name="lockscreen_unlock">Prompt for password</string>

</resources>
+59 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:sysui="http://schemas.android.com/apk/res-auto"
    android:title="@string/other">

    <PreferenceCategory
        android:key="left"
        android:title="@string/lockscreen_left">

        <SwitchPreference
            android:key="customize"
            android:title="@string/lockscreen_customize" />

        <Preference
            android:key="shortcut"
            android:title="@string/lockscreen_shortcut" />

        <com.android.systemui.tuner.TunerSwitch
            android:key="sysui_keyguard_left_unlock"
            android:title="@string/lockscreen_unlock"
            sysui:defValue="true" />

    </PreferenceCategory>

    <PreferenceCategory
        android:key="right"
        android:title="@string/lockscreen_right">

        <SwitchPreference
            android:key="customize"
            android:title="@string/lockscreen_customize" />

        <Preference
            android:key="shortcut"
            android:title="@string/lockscreen_shortcut" />

        <com.android.systemui.tuner.TunerSwitch
            android:key="sysui_keyguard_right_unlock"
            android:title="@string/lockscreen_unlock"
            sysui:defValue="true" />

    </PreferenceCategory>

</PreferenceScreen>
+5 −0
Original line number Diff line number Diff line
@@ -157,6 +157,11 @@
        android:fragment="com.android.systemui.tuner.NavBarTuner" />
    -->

    <Preference
            android:key="lockscreen"
            android:title="@string/accessibility_desc_lock_screen"
            android:fragment="com.android.systemui.tuner.LockscreenFragment" />

    <Preference
            android:key="other"
            android:title="@string/other"
Loading