diff options
author | Robin Lee <rgl@google.com> | 2015-04-29 17:15:49 +0100 |
---|---|---|
committer | Robin Lee <rgl@google.com> | 2015-04-30 17:38:29 +0000 |
commit | ef25597acfb15b1f4f501fbdcbafd1b6fa8cc9c6 (patch) | |
tree | 72814c1fcce4248cbaf9cc43fdc835ab0f1e1ace | |
parent | f764d219f0faf82219600761c8d0562623b8f054 (diff) | |
download | frameworks_base-ef25597acfb15b1f4f501fbdcbafd1b6fa8cc9c6.zip frameworks_base-ef25597acfb15b1f4f501fbdcbafd1b6fa8cc9c6.tar.gz frameworks_base-ef25597acfb15b1f4f501fbdcbafd1b6fa8cc9c6.tar.bz2 |
SystemUI strings: prospective VPN strings for apps
Bug: 20516964
Change-Id: Ifaeb388896145fd71ff9aa9fab6e2b04af807631
(cherry picked from commit 63539bd5fac53d90adff35df340562a1926d610e)
-rw-r--r-- | packages/SystemUI/res/values/strings.xml | 29 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSFooter.java | 56 |
2 files changed, 34 insertions, 51 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 8b50774..f383a52 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -890,23 +890,32 @@ <!-- Monitoring dialog device owner body text [CHAR LIMIT=400] --> <string name="monitoring_description_device_owned">Your device is managed by <xliff:g id="organization">%1$s</xliff:g>.\n\nYour administrator can monitor and manage settings, corporate access, apps, data associated with your device, and your device\'s location information. For more information, contact your administrator.</string> - <!-- Monitoring dialog profile owner body text [CHAR LIMIT=400] --> - <string name="monitoring_description_profile_owned">Your work profile is managed by <xliff:g id="organization">%1$s</xliff:g>.\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites.\n\nFor more information, contact your administrator.</string> - - <!-- Monitoring dialog device and profile owner body text [CHAR LIMIT=400] --> - <string name="monitoring_description_device_and_profile_owned">Your device is managed by:\n<xliff:g id="organization">%1$s</xliff:g>.\nYour work profile is managed by:\n<xliff:g id="organization">%2$s</xliff:g>.\n\nYour administrator can monitor your device and network activity, including emails, apps and secure websites.\n\nFor more information, contact your administrator.</string> - <!-- Monitoring dialog VPN text [CHAR LIMIT=400] --> - <string name="monitoring_description_vpn">You gave an app permission to set up a VPN connection.\n\nThis app can monitor your device and network activity, including emails, apps and secure websites.</string> + <string name="monitoring_description_vpn">You gave an app permission to set up a VPN connection.\n\nThis app can monitor your device and network activity, including emails, apps and websites.</string> <!-- Monitoring dialog VPN with device owner text [CHAR LIMIT=400] --> <string name="monitoring_description_vpn_device_owned">Your device is managed by <xliff:g id="organization">%1$s</xliff:g>.\n\nYour administrator can monitor and manage settings, corporate access, apps, data associated with your device, and your device\'s location information.\n\nYou\'re connected to a VPN, which can monitor your network activity, including emails, apps, and websites.\n\nFor more information, contact your administrator.</string> <!-- Monitoring dialog VPN with profile owner text [CHAR LIMIT=400] --> - <string name="monitoring_description_vpn_profile_owned">Your work profile is managed by <xliff:g id="organization">%1$s</xliff:g>.\n\nYour administrator is capable of monitoring your network activity including emails, apps, and secure websites.\n\nFor more information, contact your administrator.\n\nYou\'re also connected to a VPN, which can monitor your network activity.</string> + <string name="monitoring_description_vpn_profile_owned">Your work profile is managed by <xliff:g id="organization">%1$s</xliff:g>.\n\nYour administrator is capable of monitoring your network activity including emails, apps, and websites.\n\nFor more information, contact your administrator.\n\nYou\'re also connected to a VPN, which can monitor your network activity.</string> + + <!-- Name for a generic legacy VPN connection [CHAR LIMIT=20] --> + <string name="legacy_vpn_name">VPN</string> + + <!-- Monitoring dialog text for single app (no profile or device owner) [CHAR LIMIT=400] --> + <string name="monitoring_description_app">You\'re connected to <xliff:g id="application">%1$s</xliff:g>, which can monitor your network activity including emails, apps and websites.</string> + + <!-- Monitoring dialog text for single app (inside personal profile) [CHAR LIMIT=400] --> + <string name="monitoring_description_app_personal">You\'re connected to <xliff:g id="application">%1$s</xliff:g>, which can monitor your personal network activity, including emails, apps and websites.</string> + + <!-- Monitoring dialog text for single app (inside work profile) [CHAR LIMIT=400] --> + <string name="monitoring_description_app_work">Your work profile is managed by <xliff:g id="organization">%1$s</xliff:g>. It is connected to <xliff:g id="application">%2$s</xliff:g>, which can monitor your work network activity, including emails, apps and websites.\n\nFor more information, contact your administrator.</string> + + <!-- Monitoring dialog text for multiple apps (in personal and work profiles) [CHAR LIMIT=400] --> + <string name="monitoring_description_app_personal_work">Your work profile is managed by <xliff:g id="organization">%1$s</xliff:g>. It is connected to <xliff:g id="application_work">%2$s</xliff:g>, which can monitor your work network activity, including emails, apps and websites.\n\nYou\'re also connected to <xliff:g id="application_personal">%3$s</xliff:g>, which can monitor your personal network activity.</string> - <!-- Monitoring dialog VPN with device and profile owner text [CHAR LIMIT=400] --> - <string name="monitoring_description_vpn_device_and_profile_owned">Your device is managed by <xliff:g id="organization">%1$s</xliff:g>.\nYour work profile is managed by:\n<xliff:g id="organization">%2$s</xliff:g>.\n\nYour administrator is capable of monitoring your network activity including emails, apps, and secure websites.\n\nFor more information, contact your administrator.\n\nYou\'re also connected to a VPN, which can monitor your personal network activity</string> + <!-- Monitoring dialog text for single app (with device owner) [CHAR LIMIT=400] --> + <string name="monitoring_description_vpn_app_device_owned">Your device is managed by <xliff:g id="organization">%1$s</xliff:g>.\n\nYour administrator can monitor and manage settings, corporate access, apps, data associated with your device, and your device\'s location information.\n\nYou\'re connected to <xliff:g id="application">%2$s</xliff:g>, which can monitor your network activity, including emails, apps, and websites.\n\nFor more information, contact your administrator.</string> <!-- Indication on the keyguard that appears when the user disables trust agents until the next time they unlock manually. [CHAR LIMIT=NONE] --> <string name="keyguard_indication_trust_disabled">Device will stay locked until you manually unlock</string> diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java index d8e3984..f59e864 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java @@ -110,21 +110,15 @@ public class QSFooter implements OnClickListener, DialogInterface.OnClickListene } private void handleRefreshState() { - if (mSecurityController.hasDeviceOwner()) { + boolean hasDeviceOwner = mSecurityController.hasDeviceOwner(); + boolean hasVpn = mSecurityController.isVpnEnabled(); + + mIsVisible = (hasVpn || hasDeviceOwner); + mIsIconVisible = hasVpn; + if (hasDeviceOwner) { mFooterTextId = R.string.device_owned_footer; - mIsVisible = true; - mIsIconVisible = false; - } else if (mSecurityController.hasProfileOwner()) { - mFooterTextId = R.string.profile_owned_footer; - mIsVisible = true; - mIsIconVisible = false; - } else if (mSecurityController.isVpnEnabled()) { - mFooterTextId = R.string.vpn_footer; - mIsVisible = true; - mIsIconVisible = true; } else { - mIsVisible = false; - mIsIconVisible = false; + mFooterTextId = R.string.vpn_footer; } mMainHandler.post(mUpdateDisplayState); } @@ -162,37 +156,17 @@ public class QSFooter implements OnClickListener, DialogInterface.OnClickListene private String getMessage(boolean hasDeviceOwner, boolean hasProfile, boolean hasVpn) { if (hasDeviceOwner) { - if (hasProfile) { - if (hasVpn) { - return mContext.getString( - R.string.monitoring_description_vpn_device_and_profile_owned, - mSecurityController.getDeviceOwnerName(), - mSecurityController.getProfileOwnerName()); - } else { - return mContext.getString( - R.string.monitoring_description_device_and_profile_owned, - mSecurityController.getDeviceOwnerName(), - mSecurityController.getProfileOwnerName()); - } - } else { - if (hasVpn) { - return mContext.getString(R.string.monitoring_description_vpn_device_owned, - mSecurityController.getDeviceOwnerName()); - } else { - return mContext.getString(R.string.monitoring_description_device_owned, - mSecurityController.getDeviceOwnerName()); - } - } - } else if (hasProfile) { if (hasVpn) { - return mContext.getString( - R.string.monitoring_description_vpn_profile_owned, - mSecurityController.getProfileOwnerName()); + return mContext.getString(R.string.monitoring_description_vpn_device_owned, + mSecurityController.getDeviceOwnerName()); } else { - return mContext.getString( - R.string.monitoring_description_profile_owned, - mSecurityController.getProfileOwnerName()); + return mContext.getString(R.string.monitoring_description_device_owned, + mSecurityController.getDeviceOwnerName()); } + } else if (hasProfile) { + return mContext.getString( + R.string.monitoring_description_vpn_profile_owned, + mSecurityController.getProfileOwnerName()); } else { return mContext.getString(R.string.monitoring_description_vpn); } |