OSDN Git Service

Change Quick Settings to account for branded VPNs.
authorAnarghya Mitra <anarghyamitra@google.com>
Thu, 7 Jun 2018 20:26:14 +0000 (13:26 -0700)
committerAnarghya Mitra <anarghyamitra@google.com>
Thu, 7 Jun 2018 23:53:27 +0000 (23:53 +0000)
Screenshots: https://photos.app.goo.gl/FrnK69TXR86npFmY2
Test: runtest --path frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs
Bug: 109837832
Change-Id: Ie447e6598ff593ff5d14ec8787db82ba39c9ea54

packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooter.java

index a48bcbd..6418c80 100644 (file)
@@ -153,9 +153,14 @@ public class QSSecurityFooter implements OnClickListener, DialogInterface.OnClic
                 hasCACerts, hasCACertsInWorkProfile, isNetworkLoggingEnabled, vpnName,
                 vpnNameWorkProfile, organizationName, workProfileName);
         // Update the icon
-        int footerIconId = vpnName != null || vpnNameWorkProfile != null
-                ? R.drawable.ic_qs_vpn
-                : R.drawable.ic_info_outline;
+        int footerIconId = R.drawable.ic_info_outline;
+        if (vpnName != null || vpnNameWorkProfile != null) {
+            if (mSecurityController.isVpnBranded()) {
+                footerIconId = R.drawable.ic_qs_branded_vpn;
+            } else {
+                footerIconId = R.drawable.ic_qs_vpn;
+            }
+        }
         if (mFooterIconId != footerIconId) {
             mFooterIconId = footerIconId;
             mMainHandler.post(mUpdateIcon);