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

Commit fdcf5bb5 authored by Altaf-Mahdi's avatar Altaf-Mahdi Committed by Bruno Martins
Browse files

SystemUI: Add Sync tile

Change-Id: I0c0bb51e736a01661566f1118f955e32eba96063
parent 038a4729
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
        package="com.android.systemui">

    <!-- 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.WRITE_SETTINGS" />
    <uses-permission android:name="lineageos.permission.WRITE_SECURE_SETTINGS" />

+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
@@ -30,4 +30,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
@@ -123,7 +123,7 @@

    <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
    <string name="quick_settings_tiles_stock" translatable="false">
        wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,nfc,location,hotspot,inversion,saver,work,cast,night,caffeine,heads_up
        wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,nfc,location,hotspot,inversion,saver,work,cast,night,caffeine,heads_up,sync
    </string>

    <!-- The tiles to display in QuickSettings -->
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import com.android.systemui.qs.tiles.LocationTile;
import com.android.systemui.qs.tiles.NfcTile;
import com.android.systemui.qs.tiles.NightDisplayTile;
import com.android.systemui.qs.tiles.RotationLockTile;
import com.android.systemui.qs.tiles.SyncTile;
import com.android.systemui.qs.tiles.UserTile;
import com.android.systemui.qs.tiles.WifiTile;
import com.android.systemui.qs.tiles.WorkModeTile;
@@ -106,6 +107,8 @@ public class QSFactoryImpl implements QSFactory {
                return new CaffeineTile(mHost);
            case "heads_up":
                return new HeadsUpTile(mHost);
            case "sync":
                return new SyncTile(mHost);
        }

        // Intent tiles.
Loading