diff options
20 files changed, 359 insertions, 24 deletions
diff --git a/core/res/res/drawable/ic_wifi_7_signal_0.xml b/core/res/res/drawable/ic_wifi_7_signal_0.xml new file mode 100644 index 000000000000..d9dad63a6348 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_0.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M 12,2.001359 C 7.2499999,2.001359 2.9699999,4.079946 -1.25e-7,7.389946 L 12,21.998641 15.048913,18.289401 A 6.2033902,6.4067802 0 0 1 14.192935,16.186142 L 12,18.851901 2.6983696,7.528533 C 5.2683695,5.268533 8.5799999,3.998641 12,3.998641 c 3.42,0 6.73163,1.269892 9.30163,3.529892 l -0.709239,0.86413 a 6.2033902,6.4067802 0 0 1 2.148097,0.529891 L 24,7.389946 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_wifi_7_signal_1.xml b/core/res/res/drawable/ic_wifi_7_signal_1.xml new file mode 100644 index 000000000000..9b2ce6f326b2 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_1.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 13.100543,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 13.10054,18.860054 3.79891,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 13.100543,13.300272 c -3.2,0 -5.2986406,1.799456 -5.4986408,1.899456 l 5.4986408,6.798914 4.043479,-4.997283 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.933424 7.7288137,8.3389834 0 0 1 0.171196,-1.732337 c -0.961558,-0.505425 -2.35688,-1.035326 -4.153535,-1.035326 z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_wifi_7_signal_2.xml b/core/res/res/drawable/ic_wifi_7_signal_2.xml new file mode 100644 index 000000000000..f9a961171e81 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 12.998641,9.998641 c -4.3999993,0 -7.297826,2.402446 -7.597826,2.702446 l 7.597826,9.297555 4.133152,-5.111414 a 7.7288137,8.3389834 0 0 1 -0.04891,-0.847826 7.7288137,8.3389834 0 0 1 1.377718,-4.744565 C 17.138647,10.644289 15.284639,9.998641 12.998644,9.998641 Z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_wifi_7_signal_3.xml b/core/res/res/drawable/ic_wifi_7_signal_3.xml new file mode 100644 index 000000000000..f2b1e49775fc --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_3.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 12.998641,7.398098 c -5.3000001,0 -8.8997284,3.003804 -9.1997284,3.203804 l 9.1997284,11.39674 4.03125,-4.997283 A 7.7288137,8.3389834 0 0 1 16.968751,16.039402 7.7288137,8.3389834 0 0 1 20.164403,9.30163 C 18.559413,8.406307 16.154773,7.398098 12.998641,7.398098 Z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_wifi_7_signal_4.xml b/core/res/res/drawable/ic_wifi_7_signal_4.xml new file mode 100644 index 000000000000..1d6c748df4a2 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_4.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:pathData="m 12.998641,2.099185 c -7.3000003,0 -12.0991851,4.002174 -12.59918509,4.402174 L 12.998641,21.998642 16.944293,17.148098 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.978261 7.7288137,8.3389834 0 0 1 7.634511,-8.335597 l 1.084238,-1.332881 c -0.499999,-0.4 -5.303261,-4.402174 -12.603261,-4.402174 z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index a243a262122a..c1bf882e7927 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1407,6 +1407,11 @@ <java-symbol type="drawable" name="ic_wifi_6_signal_2" /> <java-symbol type="drawable" name="ic_wifi_6_signal_3" /> <java-symbol type="drawable" name="ic_wifi_6_signal_4" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_0" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_1" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_2" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_3" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_4" /> <java-symbol type="drawable" name="ic_signal_wifi_transient_animation" /> <java-symbol type="drawable" name="ic_hotspot_transient_animation" /> <java-symbol type="drawable" name="ic_bluetooth_transient_animation" /> diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java index d889d0416919..9540aec7ced8 100644 --- a/packages/SettingsLib/src/com/android/settingslib/Utils.java +++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java @@ -40,6 +40,7 @@ import android.telephony.AccessNetworkConstants; import android.telephony.NetworkRegistrationInfo; import android.telephony.ServiceState; import android.telephony.TelephonyManager; +import android.net.wifi.ScanResult; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; @@ -107,6 +108,14 @@ public class Utils { com.android.internal.R.drawable.ic_wifi_6_signal_4 }; + static final int[] WIFI_7_PIE = { + com.android.internal.R.drawable.ic_wifi_7_signal_0, + com.android.internal.R.drawable.ic_wifi_7_signal_1, + com.android.internal.R.drawable.ic_wifi_7_signal_2, + com.android.internal.R.drawable.ic_wifi_7_signal_3, + com.android.internal.R.drawable.ic_wifi_7_signal_4 + }; + public static void updateLocationEnabled(Context context, boolean enabled, int userId, int source) { Settings.Secure.putIntForUser( @@ -497,12 +506,14 @@ public class Utils { if (showX) return SHOW_X_WIFI_PIE[level]; switch (standard) { - case 4: + case ScanResult.WIFI_STANDARD_11N: return WIFI_4_PIE[level]; - case 5: + case ScanResult.WIFI_STANDARD_11AC: return WIFI_5_PIE[level]; - case 6: + case ScanResult.WIFI_STANDARD_11AX: return WIFI_6_PIE[level]; + case ScanResult.WIFI_STANDARD_11BE: + return WIFI_7_PIE[level]; default: return WIFI_PIE[level]; } diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java index 5097ccc64c62..b599dd82f7f3 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java @@ -127,6 +127,14 @@ public class WifiUtils { com.android.internal.R.drawable.ic_wifi_6_signal_4 }; + static final int[] WIFI_7_PIE = { + com.android.internal.R.drawable.ic_wifi_7_signal_0, + com.android.internal.R.drawable.ic_wifi_7_signal_1, + com.android.internal.R.drawable.ic_wifi_7_signal_2, + com.android.internal.R.drawable.ic_wifi_7_signal_3, + com.android.internal.R.drawable.ic_wifi_7_signal_4 + }; + public static String buildLoggingSummary(AccessPoint accessPoint, WifiConfiguration config) { final StringBuilder summary = new StringBuilder(); final WifiInfo info = accessPoint.getInfo(); @@ -387,12 +395,14 @@ public class WifiUtils { } if (noInternet) return NO_INTERNET_WIFI_PIE[wifiLevel]; switch (standard) { - case 4: + case ScanResult.WIFI_STANDARD_11N: return WIFI_4_PIE[wifiLevel]; - case 5: + case ScanResult.WIFI_STANDARD_11AC: return WIFI_5_PIE[wifiLevel]; - case 6: + case ScanResult.WIFI_STANDARD_11AX: return WIFI_6_PIE[wifiLevel]; + case ScanResult.WIFI_STANDARD_11BE: + return WIFI_7_PIE[wifiLevel]; default: return WIFI_PIE[wifiLevel]; } diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_0.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_0.xml new file mode 100644 index 000000000000..5d55f2b7c764 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_0.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="29.5dp"
+ android:viewportWidth="30"
+ android:viewportHeight="24">
+ <group
+ android:translateX="0.8"
+ android:translateY="-0.9">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 2.3281583,14.028369 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.822012,1.822009 -1.830163,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.001793,0.38 1.381793,0 l 1.830155,-1.830164 1.830163,1.830163 c 0.38,0.39 1.001796,0.379999 1.381793,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 l -1.830163,-1.830164 1.830163,-1.830163 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.997718,-0.38 -1.377717,0 l -1.821926,1.822011 -1.82201,-1.822011 c -0.19,-0.19 -0.438859,-0.285326 -0.688859,-0.285326 z"
+ android:fillColor="#FFFFFFFF"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27.5,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="#FFFFFFFF"/>
+ <!-- light signal level 4-->
+ <path
+ android:pathData="M 12,3 C 6.44,3 2.3284239,5.360652 0.55842392,6.570652 c -0.51,0.35 -0.6082608,1.060761 -0.2282609,1.540761 L 3.4524458,12 h 6.6644022 v 8.298912 l 1.043478,1.300271 c 0.42,0.530001 1.228968,0.530001 1.658968,0 l 6.505435,-8.091032 a 4.0677967,4.4745761 0 0 1 -0.0041,-0.0856 4.0677967,4.4745761 0 0 1 3.64402,-4.44701 l 0.697013,-0.86413 c 0.39,-0.48 0.28989,-1.190761 -0.22011,-1.540761 C 21.671576,5.360652 17.55,3 12,3 Z"
+ android:fillColor="#4DFFFFFF"/>
+ </group>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_1.xml new file mode 100644 index 000000000000..a09b069e986b --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_1.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="28"
+ android:viewportHeight="24">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z"
+ android:fillColor="@android:color/white"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="@android:color/white"/>
+ <!-- signal level 1-->
+ <path
+ android:pathData="M 11.999999,2.002712 C 7.25,2.002712 2.969999,4.081299 -9.9999999e-7,7.391299 L 4.133152,12.425266 H 6.721467 L 2.698369,7.529886 c 2.569999,-2.26 5.881631,-3.529891 9.30163,-3.529891 3.42,0 6.731632,1.269891 9.30163,3.529891 l -5.836956,7.104619 c -0.820053,-0.997437 -2.066757,-1.634511 -3.464674,-1.634511 -0.175,0 -0.339745,0.03762 -0.509511,0.05707 v 5.17663 3.14674 l 0.509511,0.619563 4.418479,-5.368205 c -6.04e-4,-0.003 -0.0035,-0.0052 -0.0041,-0.0082 l 2.771739,-3.370924 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.010869,-1.230978 c -2.970002,-3.31005 -7.25,-5.388637 -12,-5.388637 z"
+ android:fillColor="@android:color/white"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_2.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_2.xml new file mode 100644 index 000000000000..54f42b5ed32f --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_2.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="28"
+ android:viewportHeight="24">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z"
+ android:fillColor="@android:color/white"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="@android:color/white"/>
+ <!-- signal level 2-->
+ <path
+ android:pathData="m 11.999999,2.002716 c -4.7500004,0 -9.03,2.078587 -12.00000007,5.388587 L 4.133151,12.42527 H 6.7214663 L 6.6114119,12.290759 h 4.8790761 v 5.942935 3.14674 L 11.94701,21.93478 12,22 19.186141,13.252719 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z m 0,1.997282 c 3.42,0 6.731631,1.269891 9.30163,3.529892 l -3.908967,4.760869 c -0.01997,-0.02087 -0.03686,-0.04459 -0.05706,-0.06522 -1.359999,-1.42 -3.268587,-2.298914 -5.388587,-2.298914 -2.120001,0 -4.0285872,0.878914 -5.3885872,2.298914 L 2.6983684,7.52989 C 5.2683675,5.269889 8.5799987,3.999998 11.999999,3.999998 Z"
+ android:fillColor="@android:color/white"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_3.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_3.xml new file mode 100644 index 000000000000..f67ba5cbfc92 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_3.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="28"
+ android:viewportHeight="24">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z"
+ android:fillColor="@android:color/white"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="@android:color/white"/>
+ <!-- signal level 3-->
+ <path
+ android:pathData="m 11.999999,1.868205 c -4.75,0 -9.030001,2.078587 -12.0000010434783,5.388587 L 3.301629,11.275813 4.13315,12.290759 h 2.588316 4.769022 v 5.808424 3.14674 l 0.509511,0.619563 7.129076,-8.677988 0.05706,-0.06929 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774456 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.970003,-3.31 -7.250001,-5.388587 -12,-5.388587 z m 0,1.997283 c 3.42,0 6.731631,1.269891 9.30163,3.529891 L 19.349183,9.771737 C 17.427804,7.959487 14.85815,6.857335 11.999999,6.857335 c -2.8581,0 -5.427817,1.111503 -7.349186,2.914402 L 2.698368,7.395379 c 2.569999,-2.26 5.881631,-3.529891 9.301631,-3.529891 z"
+ android:fillColor="@android:color/white"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_4.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_4.xml new file mode 100644 index 000000000000..ca1079e98d8a --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_4.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="28"
+ android:viewportHeight="24">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z"
+ android:fillColor="@android:color/white"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="@android:color/white"/>
+ <!-- signal level 4-->
+ <path
+ android:pathData="M 12,2.001359 C 7.2500003,2.001359 2.9700004,4.0799457 3.45e-7,7.3899455 L 4.0230983,12.289402 h 7.4673907 v 9.089674 L 12,21.998641 19.263587,13.157609 A 3.4516399,3.5235489 0 0 1 19.129076,12.1875 3.4516399,3.5235489 0 0 1 22.577445,8.6657608 3.4516399,3.5235489 0 0 1 22.936141,8.6820598 L 24,7.3899455 C 21.03,4.0799457 16.75,2.001359 12,2.001359 Z"
+ android:fillColor="@android:color/white"/>
+</vector>
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt index c4e3d4e4c1b5..d905cb7280a7 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt @@ -27,6 +27,7 @@ import androidx.core.view.isVisible import androidx.core.view.updateLayoutParams import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle +import com.android.keyguard.EmergencyCarrierArea import com.android.settingslib.Utils import com.android.systemui.R import com.android.systemui.animation.ActivityLaunchAnimator @@ -86,6 +87,8 @@ object KeyguardBottomAreaViewBinder { val indicationText: TextView = view.requireViewById(R.id.keyguard_indication_text) val indicationTextBottom: TextView = view.requireViewById(R.id.keyguard_indication_text_bottom) + val emergencyCarrierArea: EmergencyCarrierArea = + view.requireViewById(R.id.keyguard_selector_fade_container) view.clipChildren = false view.clipToPadding = false @@ -122,6 +125,16 @@ object KeyguardBottomAreaViewBinder { } else { View.INVISIBLE } + val showEmergencyButton: Boolean = + view.context.resources.getBoolean(R.bool.config_showEmergencyButton) + emergencyCarrierArea.visibility = + if (!showEmergencyButton) { + View.GONE + } else if (isVisible) { + View.VISIBLE + } else { + View.INVISIBLE + } } } @@ -138,6 +151,7 @@ object KeyguardBottomAreaViewBinder { indicationArea.alpha = alpha startButton.alpha = alpha endButton.alpha = alpha + emergencyCarrierArea.alpha = alpha } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java index ac3645b8921b..5ee5960cb01e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java @@ -630,11 +630,13 @@ public class InternetDialog extends SystemUIDialog implements mIsCallIdle = mTelephonyManager.getCallState() == TelephonyManager.CALL_STATE_IDLE; IImsRegistration imsRegistrationImpl = mTelephonyManager.getImsRegistration( mSubscriptionManager.getSlotIndex(mDefaultDataSubId), FEATURE_MMTEL); - try { - mIsImsRegisteredOverCiwlan = imsRegistrationImpl.getRegistrationTechnology() == - REGISTRATION_TECH_CROSS_SIM; - } catch (RemoteException ex) { - Log.e(TAG, "getRegistrationTechnology failed", ex); + if (imsRegistrationImpl != null) { + try { + mIsImsRegisteredOverCiwlan = imsRegistrationImpl.getRegistrationTechnology() == + REGISTRATION_TECH_CROSS_SIM; + } catch (RemoteException ex) { + Log.e(TAG, "getRegistrationTechnology failed", ex); + } } if (mInternetDialogController.isMobileDataEnabled() && !mIsCallIdle && mIsImsRegisteredOverCiwlan) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiIcons.java index 41cbae67eb02..78708ff5e7f1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiIcons.java @@ -87,6 +87,22 @@ public class WifiIcons { R.drawable.ic_qs_wifi_6_4 }; + static final int[] WIFI_7_FULL_ICONS = { + com.android.internal.R.drawable.ic_wifi_7_signal_0, + com.android.internal.R.drawable.ic_wifi_7_signal_1, + com.android.internal.R.drawable.ic_wifi_7_signal_2, + com.android.internal.R.drawable.ic_wifi_7_signal_3, + com.android.internal.R.drawable.ic_wifi_7_signal_4 + }; + + private static final int[] WIFI_7_NO_INTERNET_ICONS = { + R.drawable.ic_qs_wifi_7_0, + R.drawable.ic_qs_wifi_7_1, + R.drawable.ic_qs_wifi_7_2, + R.drawable.ic_qs_wifi_7_3, + R.drawable.ic_qs_wifi_7_4 + }; + public static final int[][] QS_WIFI_SIGNAL_STRENGTH = { WIFI_NO_INTERNET_ICONS, WIFI_FULL_ICONS @@ -115,6 +131,13 @@ public class WifiIcons { static final int[][] WIFI_6_SIGNAL_STRENGTH = QS_WIFI_6_SIGNAL_STRENGTH; + public static final int[][] QS_WIFI_7_SIGNAL_STRENGTH = { + WIFI_7_NO_INTERNET_ICONS, + WIFI_7_FULL_ICONS + }; + + static final int[][] WIFI_7_SIGNAL_STRENGTH = QS_WIFI_7_SIGNAL_STRENGTH; + public static final int QS_WIFI_DISABLED = com.android.internal.R.drawable.ic_wifi_signal_0; public static final int QS_WIFI_NO_NETWORK = com.android.internal.R.drawable.ic_wifi_signal_0; public static final int WIFI_NO_NETWORK = QS_WIFI_NO_NETWORK; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java index f51ae1b4be82..9cba877983b6 100755 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java @@ -25,6 +25,7 @@ import android.net.NetworkCapabilities; import android.net.wifi.WifiManager; import android.os.Handler; import android.text.Html; +import android.net.wifi.ScanResult; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.Preconditions; @@ -53,6 +54,7 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> private final IconGroup mWifi4IconGroup; private final IconGroup mWifi5IconGroup; private final IconGroup mWifi6IconGroup; + private final IconGroup mWifi7IconGroup; public WifiSignalController( Context context, @@ -122,6 +124,18 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> AccessibilityContentDescriptions.WIFI_NO_CONNECTION ); + mWifi7IconGroup = new IconGroup( + "Wi-Fi 7 Icons", + WifiIcons.WIFI_7_SIGNAL_STRENGTH, + WifiIcons.QS_WIFI_7_SIGNAL_STRENGTH, + AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + AccessibilityContentDescriptions.WIFI_NO_CONNECTION + ); + mCurrentState.iconGroup = mLastState.iconGroup = mDefaultWifiIconGroup; } @@ -233,12 +247,14 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> private void updateIconGroup() { - if (mCurrentState.wifiStandard == 4) { + if (mCurrentState.wifiStandard == ScanResult.WIFI_STANDARD_11N) { mCurrentState.iconGroup = mWifi4IconGroup; - } else if (mCurrentState.wifiStandard == 5) { + } else if (mCurrentState.wifiStandard == ScanResult.WIFI_STANDARD_11AC) { mCurrentState.iconGroup = mWifi5IconGroup; - } else if (mCurrentState.wifiStandard == 6) { + } else if (mCurrentState.wifiStandard == ScanResult.WIFI_STANDARD_11AX) { mCurrentState.iconGroup = mWifi6IconGroup; + } else if (mCurrentState.wifiStandard == ScanResult.WIFI_STANDARD_11BE) { + mCurrentState.iconGroup = mWifi7IconGroup; } else { mCurrentState.iconGroup = mDefaultWifiIconGroup; } diff --git a/services/art-profile b/services/art-profile index 948661d12c5b..8c49766bd991 100644 --- a/services/art-profile +++ b/services/art-profile @@ -12663,6 +12663,7 @@ HSPLcom/android/server/audio/AudioDeviceBroker;->topCommunicationRouteClient()Lc PLcom/android/server/audio/AudioDeviceBroker;->unregisterCommunicationDeviceDispatcher(Landroid/media/ICommunicationDeviceDispatcher;)V HSPLcom/android/server/audio/AudioDeviceBroker;->updateActiveCommunicationDevice()V HSPLcom/android/server/audio/AudioDeviceBroker;->waitForBrokerHandlerCreation()V +PLcom/android/server/audio/AudioDeviceBroker;->setLeAudioTimeout(Ljava/lang/String;II)V PLcom/android/server/audio/AudioDeviceInventory$$ExternalSyntheticLambda0;-><init>(Lcom/android/server/audio/AudioDeviceInventory;)V PLcom/android/server/audio/AudioDeviceInventory$$ExternalSyntheticLambda0;->test(Ljava/lang/Object;)Z PLcom/android/server/audio/AudioDeviceInventory$$ExternalSyntheticLambda10;-><init>(Landroid/util/ArraySet;)V @@ -12760,6 +12761,8 @@ PLcom/android/server/audio/AudioDeviceInventory;->setPreferredDevicesForStrategy HSPLcom/android/server/audio/AudioDeviceInventory;->setWiredDeviceConnectionState(Landroid/media/AudioDeviceAttributes;ILjava/lang/String;)I HSPLcom/android/server/audio/AudioDeviceInventory;->startWatchingRoutes(Landroid/media/IAudioRoutesObserver;)Landroid/media/AudioRoutesInfo; HSPLcom/android/server/audio/AudioDeviceInventory;->updateAudioRoutes(II)V +PLcom/android/server/audio/AudioDeviceInventory;->makeLeAudioUnavailableLater(Ljava/lang/String;II)V +PLcom/android/server/audio/AudioDeviceInventory;->onMakeLeAudioUnavailableNow(Ljava/lang/String;I)V HSPLcom/android/server/audio/AudioEventLogger$Event;-><clinit>()V HSPLcom/android/server/audio/AudioEventLogger$Event;-><init>()V HSPLcom/android/server/audio/AudioEventLogger$Event;->printLog(ILjava/lang/String;)Lcom/android/server/audio/AudioEventLogger$Event; diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java index c7f0336941a9..506754ae4e08 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java +++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java @@ -12,6 +12,11 @@ * 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. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + * */ package com.android.server.audio; @@ -1160,6 +1165,10 @@ import java.util.concurrent.atomic.AtomicBoolean; sendILMsg(MSG_IL_BTA2DP_TIMEOUT, SENDMSG_QUEUE, a2dpCodec, address, delayMs); } + /*package*/ void setLeAudioTimeout(String address, int device, int delayMs) { + sendILMsg(MSG_IL_BTLEA_TIMEOUT, SENDMSG_QUEUE, device, address, delayMs); + } + /*package*/ void setAvrcpAbsoluteVolumeSupported(boolean supported) { synchronized (mDeviceStateLock) { mBtHelper.setAvrcpAbsoluteVolumeSupported(supported); @@ -1543,6 +1552,11 @@ import java.util.concurrent.atomic.AtomicBoolean; final int capturePreset = msg.arg1; mDeviceInventory.onSaveClearPreferredDevicesForCapturePreset(capturePreset); } break; + case MSG_IL_BTLEA_TIMEOUT: + synchronized (mDeviceStateLock) { + mDeviceInventory.onMakeLeAudioUnavailableNow((String) msg.obj, msg.arg1); + } + break; default: Log.wtf(TAG, "Invalid message " + msg.what); } @@ -1618,6 +1632,7 @@ import java.util.concurrent.atomic.AtomicBoolean; // process set volume for Le Audio, obj is BleVolumeInfo private static final int MSG_II_SET_LE_AUDIO_OUT_VOLUME = 46; private static final int MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO = 47; + private static final int MSG_IL_BTLEA_TIMEOUT = 48; private static boolean isMessageHandledUnderWakelock(int msgId) { switch(msgId) { @@ -1631,6 +1646,7 @@ import java.util.concurrent.atomic.AtomicBoolean; case MSG_L_HEARING_AID_DEVICE_CONNECTION_CHANGE_EXT: case MSG_CHECK_MUTE_MUSIC: case MSG_L_A2DP_ACTIVE_DEVICE_CHANGE_EXT: + case MSG_IL_BTLEA_TIMEOUT: return true; default: return false; @@ -1716,6 +1732,7 @@ import java.util.concurrent.atomic.AtomicBoolean; case MSG_L_SET_BT_ACTIVE_DEVICE: case MSG_L_SET_WIRED_DEVICE_CONNECTION_STATE: case MSG_IL_BTA2DP_TIMEOUT: + case MSG_IL_BTLEA_TIMEOUT: case MSG_L_A2DP_DEVICE_CONFIG_CHANGE: case MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO: if (sLastDeviceConnectMsgTime >= time) { diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java index 55366437aa8f..4dcd5e5254e7 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java +++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java @@ -12,6 +12,11 @@ * 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. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + * */ package com.android.server.audio; @@ -513,6 +518,12 @@ public class AudioDeviceInventory { } } + /*package*/ void onMakeLeAudioUnavailableNow(String address, int device) { + synchronized (mDevicesLock) { + makeLeAudioDeviceUnavailable(address, device); + } + } + /*package*/ void onReportNewRoutes() { int n = mRoutesObservers.beginBroadcast(); if (n > 0) { @@ -893,15 +904,11 @@ public class AudioDeviceInventory { } /*package*/ void disconnectLeAudio(int device) { - if (device != AudioSystem.DEVICE_OUT_BLE_HEADSET - && device != AudioSystem.DEVICE_OUT_BLE_BROADCAST) { - Log.e(TAG, "disconnectLeAudio: Can't disconnect not LE Audio device " + device); - return; - } - synchronized (mDevicesLock) { final ArraySet<String> toRemove = new ArraySet<>(); - // Disconnect ALL DEVICE_OUT_BLE_HEADSET or DEVICE_OUT_BLE_BROADCAST devices + /* Disconnect ALL DEVICE_OUT_BLE_HEADSET, + * DEVICE_IN_BLE_HEADSET or DEVICE_OUT_BLE_BROADCAST devices + */ mConnectedDevices.values().forEach(deviceInfo -> { if (deviceInfo.mDeviceType == device) { toRemove.add(deviceInfo.mDeviceAddress); @@ -910,17 +917,22 @@ public class AudioDeviceInventory { new MediaMetrics.Item(mMetricsId + "disconnectLeAudio") .record(); if (toRemove.size() > 0) { - final int delay = checkSendBecomingNoisyIntentInt(device, 0, + final int delay; + if (device != AudioSystem.DEVICE_IN_BLE_HEADSET) { + delay = checkSendBecomingNoisyIntentInt(device, 0, AudioSystem.DEVICE_NONE); + } else { + delay = 0; + } toRemove.stream().forEach(deviceAddress -> - makeLeAudioDeviceUnavailable(deviceAddress, device) - ); + makeLeAudioUnavailableLater(deviceAddress, delay, device)); } } } /*package*/ void disconnectLeAudioUnicast() { disconnectLeAudio(AudioSystem.DEVICE_OUT_BLE_HEADSET); + disconnectLeAudio(AudioSystem.DEVICE_IN_BLE_HEADSET); } /*package*/ void disconnectLeAudioBroadcast() { @@ -1179,6 +1191,15 @@ public class AudioDeviceInventory { mDeviceBroker.setA2dpTimeout(address, a2dpCodec, delayMs); } + @GuardedBy("mDevicesLock") + private void makeLeAudioUnavailableLater(String address, int delayMs, int device) { + final String deviceKey = + DeviceInfo.makeDeviceListKey(device, address); + // the device will be made unavailable later, so consider it disconnected right away + mConnectedDevices.remove(deviceKey); + // send the delayed message to make the device unavailable later + mDeviceBroker.setLeAudioTimeout(address, device, delayMs); + } @GuardedBy("mDevicesLock") private void makeA2dpSrcAvailable(String address, int a2dpCodec) { |