diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSFooter.java | 13 |
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 03cd9595d354..b91800a6b7a2 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java @@ -196,6 +196,9 @@ public class QSFooter implements OnClickListener, DialogInterface.OnClickListene profileVpn, deviceOwnerOrganization, 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); @@ -213,10 +216,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); |