summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibXZR <xzr467706992@163.com>2021-08-04 13:37:08 +0800
committeralk3pInjection <webmaster@raspii.tech>2023-06-02 13:35:53 +0800
commita801f1fb854e032a80af8dbfef5df0aba32d5039 (patch)
treea8425ea5755e6df5efecaaa0972a72f201e8f422
parent9fce1af240d23734aa6a3c4787b810a5e0477790 (diff)
SystemUI: Expose VPN icon to Tunertachibana
This can be really useful for those with vpn always on. Change-Id: I9bfce76e4475db0246aa0bc348119ced99574e8d
-rw-r--r--packages/SystemUI/res/drawable/ic_vpn_key.xml28
-rw-r--r--packages/SystemUI/res/values/ice_strings.xml1
-rw-r--r--packages/SystemUI/res/xml/status_bar_prefs.xml5
3 files changed, 34 insertions, 0 deletions
diff --git a/packages/SystemUI/res/drawable/ic_vpn_key.xml b/packages/SystemUI/res/drawable/ic_vpn_key.xml
new file mode 100644
index 000000000000..c2a7e342397e
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_vpn_key.xml
@@ -0,0 +1,28 @@
+<!--
+ Copyright (C) 2017 The Android Open Source 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.0"
+ android:viewportHeight="24.0"
+ android:tint="?android:attr/colorControlNormal">
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M12.09,9C11.11,7.5 9.43,6.5 7.5,6.5C4.46,6.5 2,8.96 2,12c0,3.04 2.46,5.5 5.5,5.5c1.93,0 3.61,-1 4.59,-2.5H14v3h6v-3h2V9H12.09zM20,13h-2v3h-2v-3h-5.16c-0.43,1.44 -1.76,2.5 -3.34,2.5C5.57,15.5 4,13.93 4,12c0,-1.93 1.57,-3.5 3.5,-3.5c1.58,0 2.9,1.06 3.34,2.5H20V13z"/>
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M7.5,12m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
+</vector>
diff --git a/packages/SystemUI/res/values/ice_strings.xml b/packages/SystemUI/res/values/ice_strings.xml
index 4e6c6518dcbf..8d463eb58f98 100644
--- a/packages/SystemUI/res/values/ice_strings.xml
+++ b/packages/SystemUI/res/values/ice_strings.xml
@@ -17,6 +17,7 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Status bar - icons -->
<string name="status_bar_icons_title">Status bar icons</string>
+ <string name="status_bar_vpn">VPN</string>
<!-- Custom QS tiles -->
<!-- AOD QS tile -->
diff --git a/packages/SystemUI/res/xml/status_bar_prefs.xml b/packages/SystemUI/res/xml/status_bar_prefs.xml
index 49edfe7d1782..6f4c5bcf10b7 100644
--- a/packages/SystemUI/res/xml/status_bar_prefs.xml
+++ b/packages/SystemUI/res/xml/status_bar_prefs.xml
@@ -96,6 +96,11 @@
android:key="airplane"
android:title="@string/status_bar_airplane" />
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:icon="@drawable/ic_vpn_key"
+ android:key="vpn"
+ android:title="@string/status_bar_vpn" />
+
<!-- other weird signal stuff -->
<com.android.systemui.tuner.BatteryPreference