summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Philipp Weiß <phweiss@google.com> 2017-01-10 13:54:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-01-10 13:54:28 +0000
commita7c632434069a549f917c64720204f192f693ff0 (patch)
tree1026ff77ea4d57b37a74c1212cec29c7d3d16f55
parent971236480c2a95db94b073877c8595c274d28893 (diff)
parentd361b181e5e49ea93753d32dab047efba531a4b8 (diff)
Merge "Re-Add VPN-"Settings" button to QSFooter dialog" into nyc-mr2-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSFooter.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
index 9431d8d38034..03c7588bca9c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
@@ -184,6 +184,9 @@ public class QSFooter implements OnClickListener, DialogInterface.OnClickListene
profileVpn, hasProfileOwner, isBranded);
if (deviceOwnerPackage == null) {
mDialog.setMessage(msg);
+ if (mSecurityController.isVpnEnabled() && !mSecurityController.isVpnRestricted()) {
+ mDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getSettingsButton(), this);
+ }
} else {
View dialogView = LayoutInflater.from(mContext)
.inflate(R.layout.quick_settings_footer_dialog, null, false);
@@ -201,10 +204,12 @@ public class QSFooter implements OnClickListener, DialogInterface.OnClickListene
final SpannableStringBuilder message = new SpannableStringBuilder();
message.append(mContext.getString(R.string.monitoring_description_do_body_vpn,
primaryVpn));
- message.append(mContext.getString(
- R.string.monitoring_description_vpn_settings_separator));
- message.append(mContext.getString(R.string.monitoring_description_vpn_settings),
- new VpnSpan(), 0);
+ if (!mSecurityController.isVpnRestricted()) {
+ message.append(mContext.getString(
+ R.string.monitoring_description_vpn_settings_separator));
+ message.append(mContext.getString(R.string.monitoring_description_vpn_settings),
+ new VpnSpan(), 0);
+ }
TextView vpnWarning = (TextView) dialogView.findViewById(R.id.vpn_warning);
vpnWarning.setText(message);