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

Commit beb831d1 authored by Joey's avatar Joey Committed by Michael Bestas
Browse files

SystemUI: Add reading mode tile



Author: Joey <joey@lineageos.org>
Date:   Wed May 16 17:16:06 2018 +0200

    base: add reading mode tile

    Change-Id: I1c515cbeff0dd5a1fa0c00bc9390a66eb104c7f0
    Signed-off-by: default avatarJoey <joey@lineageos.org>

Author: Michael Bestas <mkbestas@lineageos.org>
Date:   Sat May 26 00:58:57 2018 +0300

    SystemUI: Fix reading mode tile accessibility strings

    Change-Id: I4f0af56e4947b037e1e2dda79132523d13458818

Author: Paul Keith <javelinanddart@gmail.com>
Date:   Wed Aug 8 18:59:25 2018 +0200

    SystemUI: Update reading mode tile for new API

    Change-Id: I9fbf1b4de30079c987b75e37e52e234fa2f86c5d

Change-Id: I365ee54b2b2adc52d804a5fc1d35690ef5636071
parent bc402dc9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,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>
+7 −0
Original line number Diff line number Diff line
@@ -52,6 +52,13 @@
    <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>
    <string name="accessibility_quick_settings_reading_mode_changed_on">Reading mode turned on.</string>
    <string name="accessibility_quick_settings_reading_mode_changed_off">Reading mode turned 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
@@ -107,7 +107,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,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,ambient_display,aod,caffeine,heads_up,sync,powershare,usb_tether
        internet,wifi,cell,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,ambient_display,aod,caffeine,heads_up,reading_mode,sync,powershare,usb_tether
    </string>

    <!-- The tiles to display in QuickSettings -->
+7 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 * Copyright (C) 2017 The LineageOS Project
 * Copyright (C) 2017-2018 The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use mHost file
 * except in compliance with the License. You may obtain a copy of the License at
@@ -50,6 +50,7 @@ import com.android.systemui.qs.tiles.NfcTile;
import com.android.systemui.qs.tiles.NightDisplayTile;
import com.android.systemui.qs.tiles.PowerShareTile;
import com.android.systemui.qs.tiles.QuickAccessWalletTile;
import com.android.systemui.qs.tiles.ReadingModeTile;
import com.android.systemui.qs.tiles.ReduceBrightColorsTile;
import com.android.systemui.qs.tiles.RotationLockTile;
import com.android.systemui.qs.tiles.ScreenRecordTile;
@@ -102,6 +103,7 @@ public class QSFactoryImpl implements QSFactory {
    private final Provider<AODTile> mAODTileProvider;
    private final Provider<CaffeineTile> mCaffeineTileProvider;
    private final Provider<HeadsUpTile> mHeadsUpTileProvider;
    private final Provider<ReadingModeTile> mReadingModeTileProvider;
    private final Provider<SyncTile> mSyncTileProvider;
    private final Provider<PowerShareTile> mPowerShareTileProvider;
    private final Provider<UsbTetherTile> mUsbTetherTileProvider;
@@ -145,6 +147,7 @@ public class QSFactoryImpl implements QSFactory {
            Provider<CaffeineTile> caffeineTileProvider,
            Provider<HeadsUpTile> headsUpTileProvider,
            Provider<PowerShareTile> powerShareTileProvider,
            Provider<ReadingModeTile> readingModeTileProvider,
            Provider<SyncTile> syncTileProvider,
            Provider<UsbTetherTile> usbTetherTileProvider) {
        mQsHostLazy = qsHostLazy;
@@ -181,6 +184,7 @@ public class QSFactoryImpl implements QSFactory {
        mAODTileProvider = aodTileProvider;
        mCaffeineTileProvider = caffeineTileProvider;
        mHeadsUpTileProvider = headsUpTileProvider;
        mReadingModeTileProvider = readingModeTileProvider;
        mSyncTileProvider = syncTileProvider;
        mPowerShareTileProvider = powerShareTileProvider;
        mUsbTetherTileProvider = usbTetherTileProvider;
@@ -259,6 +263,8 @@ public class QSFactoryImpl implements QSFactory {
                return mCaffeineTileProvider.get();
            case "heads_up":
                return mHeadsUpTileProvider.get();
            case "reading_mode":
                return mReadingModeTileProvider.get();
            case "sync":
                return mSyncTileProvider.get();
            case "powershare":
Loading