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

Unverified Commit d443c766 authored by Altaf-Mahdi's avatar Altaf-Mahdi Committed by Michael Bestas
Browse files

SystemUI: Add Sync tile

Change-Id: I0c0bb51e736a01661566f1118f955e32eba96063
parent 91911b85
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@
    <!-- Network traffic monitor -->
    <uses-permission android:name="android.permission.MAINLINE_NETWORK_STACK" />

    <!-- QS Tiles -->
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />

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

        <path
            android:pathData="M0.01,0h24v24h-24V0z" />
        <path
            android:fillColor="#FFFFFF"
            android:pathData="M12,4V2.21c0-0.45-0.54-0.67-0.85-0.35L8.35,4.65c-0.2,0.2-0.2,0.51,0,0.71l2.79,2.79C11.46,8.46,12,8.24,12,7.79V6 c3.31,0,6,2.69,6,6c0,0.79-0.15,1.56-0.44,2.25c-0.15,0.36-0.04,0.77,0.23,1.04v0c0.51,0.51,1.37,0.33,1.64-0.34 C19.8,14.04,20,13.04,20,12C20,7.58,16.42,4,12,4z M12,18c-3.31,0-6-2.69-6-6c0-0.79,0.15-1.56,0.44-2.25 c0.15-0.36,0.04-0.77-0.23-1.04l0,0C5.7,8.2,4.84,8.38,4.57,9.05C4.2,9.96,4,10.96,4,12c0,4.42,3.58,8,8,8v1.79 c0,0.45,0.54,0.67,0.85,0.35l2.79-2.79c0.2-0.2,0.2-0.51,0-0.71l-2.79-2.79C12.54,15.54,12,15.76,12,16.21V18z" />
</vector>
+7 −0
Original line number Diff line number Diff line
@@ -37,4 +37,11 @@
    <string name="accessibility_quick_settings_heads_up_on">Heads up on.</string>
    <string name="accessibility_quick_settings_heads_up_changed_off">Heads up turned off.</string>
    <string name="accessibility_quick_settings_heads_up_changed_on">Heads up turned on.</string>

    <!-- Sync QS tile -->
    <string name="quick_settings_sync_label">Sync</string>
    <string name="accessibility_quick_settings_sync_off">Sync off.</string>
    <string name="accessibility_quick_settings_sync_on">Sync on.</string>
    <string name="accessibility_quick_settings_sync_changed_off">Sync turned off.</string>
    <string name="accessibility_quick_settings_sync_changed_on">Sync turned on.</string>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,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,caffeine,heads_up
        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,caffeine,heads_up,sync
    </string>

    <!-- The tiles to display in QuickSettings -->
+7 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import com.android.systemui.qs.tiles.QuickAccessWalletTile;
import com.android.systemui.qs.tiles.ReduceBrightColorsTile;
import com.android.systemui.qs.tiles.RotationLockTile;
import com.android.systemui.qs.tiles.ScreenRecordTile;
import com.android.systemui.qs.tiles.SyncTile;
import com.android.systemui.qs.tiles.UiModeNightTile;
import com.android.systemui.qs.tiles.UserTile;
import com.android.systemui.qs.tiles.WifiTile;
@@ -95,6 +96,7 @@ public class QSFactoryImpl implements QSFactory {
    private final Provider<QuickAccessWalletTile> mQuickAccessWalletTileProvider;
    private final Provider<CaffeineTile> mCaffeineTileProvider;
    private final Provider<HeadsUpTile> mHeadsUpTileProvider;
    private final Provider<SyncTile> mSyncTileProvider;

    private final Lazy<QSHost> mQsHostLazy;
    private final Provider<CustomTile.Builder> mCustomTileBuilderProvider;
@@ -131,7 +133,8 @@ public class QSFactoryImpl implements QSFactory {
            Provider<AlarmTile> alarmTileProvider,
            Provider<QuickAccessWalletTile> quickAccessWalletTileProvider,
            Provider<CaffeineTile> caffeineTileProvider,
            Provider<HeadsUpTile> headsUpTileProvider) {
            Provider<HeadsUpTile> headsUpTileProvider,
            Provider<SyncTile> syncTileProvider) {
        mQsHostLazy = qsHostLazy;
        mCustomTileBuilderProvider = customTileBuilderProvider;

@@ -164,6 +167,7 @@ public class QSFactoryImpl implements QSFactory {
        mQuickAccessWalletTileProvider = quickAccessWalletTileProvider;
        mCaffeineTileProvider = caffeineTileProvider;
        mHeadsUpTileProvider = headsUpTileProvider;
        mSyncTileProvider = syncTileProvider;
    }

    public QSTile createTile(String tileSpec) {
@@ -235,6 +239,8 @@ public class QSFactoryImpl implements QSFactory {
                return mCaffeineTileProvider.get();
            case "heads_up":
                return mHeadsUpTileProvider.get();
            case "sync":
                return mSyncTileProvider.get();
        }

        // Custom tiles
Loading