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

Unverified Commit 748a15fc authored by Linux4's avatar Linux4 Committed by Michael Bestas
Browse files

SystemUI: Add powershare QS tile



Co-authored-by: default avatarLuK1337 <priv.luk@gmail.com>
Co-authored-by: default avatarMichael Bestas <mkbestas@gmail.com>
Change-Id: Ia09a674745adb433f3aaeebfeb79899906350793
parent 364489fc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -200,6 +200,7 @@ android_library {
        "lottie",
        "LowLightDreamLib",
        "motion_tool_lib",
        "vendor.lineage.powershare-V1.0-java",
    ],
    manifest: "AndroidManifest.xml",
    additional_manifests: ["LineageManifest.xml"],
@@ -384,6 +385,7 @@ android_library {
        "motion_tool_lib",
        "androidx.core_core-animation-testing-nodeps",
        "androidx.compose.ui_ui",
        "vendor.lineage.powershare-V1.0-java",
    ],
}

+26 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2020 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">

    <path
        android:fillColor="#ffffff"
        android:pathData="M19.77,7.23l0.01,-0.01 -3.72,-3.72L15,4.56l2.11,2.11c-0.94,0.36 -1.61,1.26 -1.61,2.33 0,1.38 1.12,2.5 2.5,2.5 0.36,0 0.69,-0.08 1,-0.21v7.21c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1V14c0,-1.1 -0.9,-2 -2,-2h-1V5c0,-1.1 -0.9,-2 -2,-2H6c-1.1,0 -2,0.9 -2,2v16h10v-7.5h1.5v5c0,1.38 1.12,2.5 2.5,2.5s2.5,-1.12 2.5,-2.5V9c0,-0.69 -0.28,-1.32 -0.73,-1.77zM18,10c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM8,18v-4.5H6L10,6v5h2l-4,7z" />

</vector>
+6 −0
Original line number Diff line number Diff line
@@ -41,6 +41,12 @@
    <string name="accessibility_quick_settings_heads_up_off">Heads up off.</string>
    <string name="accessibility_quick_settings_heads_up_on">Heads up on.</string>

    <!-- PowerShare QS tile -->
    <string name="quick_settings_powershare_label">Wireless PowerShare</string>
    <string name="quick_settings_powershare_off_powersave_label">Wireless PowerShare off\nBattery saver</string>
    <string name="quick_settings_powershare_off_low_battery_label">Wireless PowerShare off\nBattery too low</string>
    <string name="quick_settings_powershare_enabled_label">Wireless PowerShare is enabled</string>

    <!-- Sync QS tile -->
    <string name="quick_settings_sync_label">Sync</string>
    <string name="accessibility_quick_settings_sync_off">Sync off.</string>
+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,bt,flashlight,dnd,alarm,airplane,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,sync,usb_tether
        internet,bt,flashlight,dnd,alarm,airplane,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,sync,powershare,usb_tether
    </string>

    <!-- The tiles to display in QuickSettings -->
+7 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import com.android.systemui.qs.tiles.AmbientDisplayTile
import com.android.systemui.qs.tiles.AODTile
import com.android.systemui.qs.tiles.CaffeineTile
import com.android.systemui.qs.tiles.HeadsUpTile
import com.android.systemui.qs.tiles.PowerShareTile
import com.android.systemui.qs.tiles.SyncTile
import com.android.systemui.qs.tiles.UsbTetherTile

@@ -55,6 +56,12 @@ interface LineageModule {
    @StringKey(HeadsUpTile.TILE_SPEC)
    fun bindHeadsUpTile(headsUpTile: HeadsUpTile): QSTileImpl<*>

    /** Inject PowerShareTile into tileMap in QSModule */
    @Binds
    @IntoMap
    @StringKey(PowerShareTile.TILE_SPEC)
    fun bindPowerShareTile(powerShareTile: PowerShareTile): QSTileImpl<*>

    /** Inject SyncTile into tileMap in QSModule */
    @Binds
    @IntoMap
Loading