The user can turn on / off always-on for individual VPN apps in
Settings > Network > VPN. Now that we're providing an opt-out of the
always-on feature for VPN apps, we should disabled the toggles if the
VPN app has an explicit opt-out.
Related unit tests are also removed as the check is now performed in the
frameworks, not in Settings.
Bug: 36650087
Test: CTS Verifier
Change-Id: I486fec14a1f8b86e7120dbdbfed3885801ab4dd7
To conform with UX guidelines and conventions, the following changes are
made to the UI of app VPN's PreferenceFragment:
(1. Always-on toggle title stays the same)
2. Always-on toggle subtext changes from "active"/"inactive" to an
explanation of the feature
3. Lockdown toggle title is shortened
4. Lockdown toggle subtext is removed completely
And the following changes are made to the legacy VPN's ConfigDialog:
5. Error message that is displayed below the "Always-on VPN" checkbox
6. Replacing \u2019 with \'
Bug: 36382729
Test: manually navigate through VPN settings
Test: make SettingsRoboTests
Change-Id: If1b4faec8743dfbf6e3f8062b53190ad63700d25
- Add a method in VisibilityLoggerMixin to log visible event using
LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
to next page.
- In next page's onResume(), extract the previous page's metricsCategory
and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters
Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
Allows Settings to control whether always-on VPN is required for the
connection to complete, or if it is offered on a best-efforts basis.
Change-Id: I5eb273a99e7559adc66b05e647c9130a819f99d4
Test: runtest -x tests/app/src/com/android/settings/vpn2/VpnTests.java
Fix: 32420810
Lockdown is now the default option, not best-effort mode. It's easier
to shoot oneself in the foot now so we'll show a warning to explain that
before switching it on.
Bug: 29052115
Bug: 29076208
Test: com.android.settings.vpn2.AppSettingsTest
Change-Id: Ia6845e6a7d57baa5476b8a021fb1255fd74aabea
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
Otherwise it's pretty easy to circumvent any future restrictions by
keeping VPN settings for a particular app open and continuing to use
it even after DISALLOW_CONFIG_VPN is applied.
Two checks:
1) in onResume (catches almost every case)
2) in setAlwaysOn (catches every remaining case)
Bug: 28733079
Change-Id: I1c67bb14891ef620df5ed65fbd32678e417b4a65
Allows callers to opt-out of blockading network traffic during boot and
on VPN app failure.
Bug: 26694104
Change-Id: Ic2c25b79d8a17917025eb37be7de929fe156e2a3
It's pointless, verging on antipattern, to pop up a notification that
points to the screen we're already on, especially when that notification
is telling us something really high-priority ("your connection failed").
Change-Id: Idf0c219adcefd64b235960f3239a70b059213f7d
Fix: 27374485
- Notification icon is Settings icon
- VpnName is obtained as the same way as AppPreference
- Post notification as the current user with PendingIntent to VpnSettings to parent user
- Auto-cancel when user taps on the notification
- This implementation posts notification only when the failure happens sychronously
(Assume ConnectivityService only unset always-on package immediately after calling setAlwaysOnVpnPackageForUser)
Bug:27374485
Change-Id: I0aee38498c8cc300dd8eb9687adcae5f9dc4f8af
This CL adds a setting for each VPN
- When no_config_vpn user restriction is applied, user can't change anything in the page
- Launch the subsetting activity in the corresponding user to unlock keystore and force work challenge
- Show dialog when user replace always-on-VPN package
- When forget VPN, unset always-on-vpn
TODO: show per-VPN status in VPN list
Change-Id: Ica360ea44117db6a4ecfaed1eec6c188189c246c