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

Unverified Commit 7b6efcd4 authored by Joey's avatar Joey Committed by Michael Bestas
Browse files

SystemUI: Add reading mode tile



Co-authored-by: default avatarArian <arian.kulmer@web.de>
Co-authored-by: default avatarMichael Bestas <mkbestas@gmail.com>
Co-authored-by: default avatarPaul Keith <javelinanddart@gmail.com>
Change-Id: I365ee54b2b2adc52d804a5fc1d35690ef5636071
parent 748a15fc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
    <!-- QS Tiles -->
    <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" />

    <!-- SystemUI Tuner -->
    <application>
+35 −0
Original line number 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="64dp"
    android:height="64dp"
    android:viewportWidth="24"
    android:viewportHeight="24">

    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M21,4H3C1.9,4 1,4.9 1,6v13c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2V6C23,4.9 22.1,4 21,4zM3,19V6h8v13H3zM21,19h-8V6h8V19z"/>
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M14,9.5h6v1.5h-6z"/>
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M14,12h6v1.5h-6z"/>
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M14,14.5h6v1.5h-6z"/>
</vector>
+5 −0
Original line number Diff line number Diff line
@@ -47,6 +47,11 @@
    <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>

    <!-- Reader mode QS tile -->
    <string name="quick_settings_reading_mode">Reading mode</string>
    <string name="accessibility_quick_settings_reading_mode_on">Reading mode on.</string>
    <string name="accessibility_quick_settings_reading_mode_off">Reading mode off.</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,powershare,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,reading_mode,sync,powershare,usb_tether
    </string>

    <!-- The tiles to display in QuickSettings -->
+7 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ 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.ReadingModeTile
import com.android.systemui.qs.tiles.SyncTile
import com.android.systemui.qs.tiles.UsbTetherTile

@@ -62,6 +63,12 @@ interface LineageModule {
    @StringKey(PowerShareTile.TILE_SPEC)
    fun bindPowerShareTile(powerShareTile: PowerShareTile): QSTileImpl<*>

    /** Inject ReadingModeTile into tileMap in QSModule */
    @Binds
    @IntoMap
    @StringKey(ReadingModeTile.TILE_SPEC)
    fun bindReadingModeTile(readingModeTile: ReadingModeTile): QSTileImpl<*>

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