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

Unverified Commit 11ea0cfb authored by Gegham Zakaryan's avatar Gegham Zakaryan Committed by Michael Bestas
Browse files

frameworks: Add more power menu customizations



* Forward-port the rest of power menu customizations (airplane mode, screenshot, lockdown, bugreport, user switcher).
* Screenshot option will always show by default and can be turned off in Settings.
* Use the new LineageGlobalActionsService to get user's configuration

Squashed with the following changes:

Author: Michael Bestas <mikeioannina@gmail.com>
Date:   Sat Jan 31 06:06:38 2015 +0200

    GlobalActions: Use circular user avatars

    * Use circular & smaller avatars, logic copied from SystemUI
    * Improve current user indication (thanks to maxwen)

    Change-Id: I81e6c4afd604f5cb8b22e2c4db9b174bbe7fb3f0
    Ticket-Id: OPO-456, CYNGNOS-1901

Author: Gegham Zakaryan <zakaryan.2004@outlook.com>
Date:   Mon Mar 29 20:17:47 2021 +0400

    frameworks: Add tunable for GlobalActions configuration

    Before, the power menu may have not updated when switching users.
    With tunables, we can be sure each user will only see their own settings.

    Remove the ACTION_UPDATE_POWER_MENU broadcast as well.

    Signed-off-by: default avatarGegham Zakaryan <zakaryan.2004@outlook.com>
    Change-Id: I1d7dbe1eac41a83910c9c6db28162212971b42fb

Author: Gegham Zakaryan <zakaryan.2004@outlook.com>
Date:   Mon Mar 29 23:33:17 2021 +0400

    frameworks: New Users dialog for GlobalActions

    Take advantage of the new R-style dialog used in PowerOptions
    for showing the user switcher. All of the previous functionalities
    have been retained.

    Signed-off-by: default avatarGegham Zakaryan <zakaryan.2004@outlook.com>
    Change-Id: Ib8ba9276d85b0ddcb3a188e72235eb77a4c70a82

Author: Gegham Zakaryan <zakaryan.2004@outlook.com>
Date:   Thu Apr 1 13:23:57 2021 +0200

    GlobalActionsDialog: Remove broken PhoneStateListener for airplane mode toggle

    The Airplane Mode toggle in GlobalActions is completely broken,
    being stuck in TurningOn transition state when pressing it when
    Airplane Mode is off. This happens because the PhoneStateListener
    doesn't trigger onServiceStateChanged when Airplane Mode turns on.
    This commit removes the redundant PhoneStateListener and makes the
    logic work for Telephony and non-Telephony devices pretty much the
    same way by allowing onAirplaneModeChanged() to handle both cases.

    Change-Id: Ifd1e06ff144addf8dd2c8494769b2d646599ae0a
    Signed-off-by: default avatarGegham Zakaryan <zakaryan.2004@outlook.com>

Author: Bruno Martins <bgcngm@gmail.com>
Date:   Fri Feb 25 23:49:46 2022 +0000

    GlobalActionsDialog: Never show emergency without telephony support

    Change-Id: I7a4cd340d69fa6e3e2e6a2ba0529276f3b04155b

Signed-off-by: default avatarGegham Zakaryan <zakaryan.2004@outlook.com>
Change-Id: I225037422937602940aafb5d20acea8c0bcff6ba
parent 1417525f
Loading
Loading
Loading
Loading
+29 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 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="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24"
    android:tint="?android:attr/colorControlNormal">

    <path
        android:fillColor="#FF000000"
        android:pathData="M13 9V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v3.68l7.83 7.83L21 16v-2l-8-5zM3
5.27l4.99 4.99L2 14v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-3.73L18.73 21
20 19.73 4.27 4 3 5.27z" />
</vector>
+31 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 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="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24"
    android:tint="?android:attr/colorControlNormal">

    <path
        android:fillColor="#FF000000"
        android:pathData="M10.18 9" />
    <path
        android:fillColor="#FF000000"
        android:pathData="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2
1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z" />
</vector>
+27 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 The CyanogenMod 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="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24"
    android:tint="?android:attr/colorControlNormal">

    <path
        android:fillColor="#FF000000"
        android:pathData="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
</vector>
+4 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,10 @@
    <!-- Restart to fastboot mode progress dialog. This is shown if the user chooses to restart the device. -->
    <!-- Restart to fastboot mode progress dialog. This is shown if the user chooses to restart the device. -->
    <string name="global_action_restart_fastboot_progress">Restarting to fastbootd mode\u2026</string>
    <string name="global_action_restart_fastboot_progress">Restarting to fastbootd mode\u2026</string>


    <!-- Label for current user in power menu options dialog -->
    <string name="global_action_current_user">Current</string>
    <string name="global_action_users">Users</string>

    <!-- Status bar - icons -->
    <!-- Status bar - icons -->
    <string name="status_bar_icons_title">Status bar icons</string>
    <string name="status_bar_icons_title">Status bar icons</string>


+21 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 The CyanogenMod Project
     Copyright (C) 2018-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.
-->
<resources>
    <!-- Largest size an avatar might need to be drawn in the power menu user picker -->
    <dimen name="global_actions_avatar_size">24dp</dimen>
</resources>
Loading