summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/vpn2
Commit message (Collapse)AuthorAgeFilesLines
...
* | resolve merge conflicts of 6446d2f to masterRobin Lee2016-12-231-0/+2
|\| | | | | | | Change-Id: Ibf37d7fed8f8fbb32a601944f504494101c21a3e
| * Update VPN preference state after disallow configuring VPN policy has changed.insight.lee2016-12-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When Settings > More and change disallow configuring VPN policy and resume Settings, update VPN preference state. 2. When Settings > More > VPN and change disallow configuring VPN policy and resume VPN Settings, update its state. Test: manual Signed-off-by : Sungmin Lee <insight.lee@lge.com> Change-Id: I4f3c85733ca6ba05cba46e2f4854f54a42b10c21
* | Implement always-on VPN separate lockdown settingRobin Lee2016-12-204-32/+56
| | | | | | | | | | | | | | | | | | 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
* | VpnSettings PreferenceList testsRobin Lee2016-11-281-61/+111
| | | | | | | | | | | | | | | | | | | | | | For validating that when VPNs are added / removed, the right set of changes are made to the PreferenceGroup in which they are supposed to be shown. Bug: 30998549 Bug: 29093779 Test: runtest -x packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java Change-Id: I9394db0e78cc984ab62e3670aa0a7942ae767a66
* | VpnSettings: slightly more robust callback contextRobin Lee2016-11-281-10/+17
| | | | | | | | | | Test: runtest -x com/android/settings/vpn2/VpnTests.java Change-Id: I45fa0509c56211602f6abd55a2f44cdf76f28829
* | VpnSettings: show connected VPN even if deletedRobin Lee2016-11-281-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | So there's a way to disconnect from it, if someone deletes all the keystore entries and the VPN doesn't actually exist any more (but is still sitting around in memory somewhere keeping the connection alive). Bug: 29093779 Fix: 32880676 Test: runtest -x tests/app/src/com/android/settings/vpn2/VpnTests.java Change-Id: I97671a74af746e5baaa5be0b5cff24e2b1766f53
* | Update package names to work with the proto3 compilerTamas Berghammer2016-11-085-5/+5
| | | | | | | | | | Bug: b/28974522 Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
* | Show a disclaimer about enabling vpn lockdownRobin Lee2016-10-075-90/+251
| | | | | | | | | | | | | | | | | | | | | | 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
* | Add visibility metrics to dialogs.Fan Zhang2016-09-193-9/+33
| | | | | | | | | | | | Bug: 30681529 Test: adb logcat -b events | egrep "(sysui_|notification_)" Change-Id: I199d2e1b2cb8588a562b46bb8128d8ece24952f0
* | Log visibility change for all fragments.Fan Zhang2016-08-182-2/+2
| | | | | | | | | | | | | | | | | | | | Bug: 30681771 Test: SettingsUnitTests Refactor visibility logging from InstrumentedFragment into a mixin. And apply mixin in remaining fragments. Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
* | Be more defensive on failure to disconnect legacy VPNsRobin Lee2016-08-121-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Failing to disconnect but deleting the keystore entry anyway makes it difficult to do anything about a still-running connection. Also switching over from prepareVpn(x,x) to prepareVpn(null,x) which helps avoid race conditions where in between the getLegacyVpnInfo and prepareVpn calls a 3rd-party app started a connection, which would break the disconnect but still register as success. Bug: 23529835 Bug: 29032008 Change-Id: Iedce784cb0eafbf75fe015dd2b3d355fcd887abf
* | Merge "VpnSettings stub unit tests"Robin Lee2016-07-281-23/+27
|\ \
| * | VpnSettings stub unit testsRobin Lee2016-07-281-23/+27
| |/ | | | | | | | | | | | | | | | | For: - enforcing minimum target SDK - enforcing that only actual vpn apps are shown Bug: 30355704 Change-Id: I4fcbea8ce0d0417c089a637d999ea83299cea5d0
* / Run VPN refresh on a HandlerThreadRobin Lee2016-07-271-2/+9
|/ | | | | Bug: 28315317 Change-Id: I1aa4748b9454db5abf866b3ea71a9c46cceca82d
* Merge "Fix always-on is not turned off when user forgets vpn" into nyc-mr1-devVictor Chang2016-07-111-3/+7
|\
| * Fix always-on is not turned off when user forgets vpnVictor Chang2016-07-061-3/+7
| | | | | | | | | | Change-Id: Iad285ff06abde71ef040cbb29f740bcf20c3bbb7 Fix: 29991174
* | Don't show always-on option connecting PPTP vpnRobin Lee2016-06-301-3/+3
|/ | | | | | | | | Support for this kind has been taken out so it shouldn't be an option when connecting (it's already not an option when editing). Bug: 28807474 Change-Id: Id3e7be390c6813d091e7f897ac82aaf29042beb8 (cherry picked from commit ca75deb7af290745680e8859a0f8da0770802f6e)
* Add explanatory text displayed when 'Always-on' switch is greyed-out for VPN ↵Victor Chang2016-06-271-1/+7
| | | | | | | apps w/targetSdk<24 Bug: 28413917 Change-Id: I3e7c079b4f91c02e5d0c0e8fda4ac6775dd0247b
* Respect DISALLOW_CONFIG_VPN for disconnect dialogRobin Lee2016-06-131-3/+26
| | | | | Change-Id: Idfe3899e81eec5efdbd5700bdc65921de6853898 Fix: 29265163
* Restrict Settings always-on to NYC+Robin Lee2016-06-061-4/+24
| | | | | Bug: 28413917 Change-Id: I1c40bdc94bb05d21daf589840adbbf04abe6c10f
* Disable restricted VPN actions onResumeRobin Lee2016-06-011-22/+45
| | | | | | | | | | | | | 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
* Don't crash trying to disable lockdown VPNRobin Lee2016-05-171-0/+1
| | | | | Bug: 28624328 Change-Id: I2b726453da43feaf5f46d45679a702a52e6f4df0
* Add lockdownEnabled parameter to always-on VPN APIRobin Lee2016-05-033-3/+5
| | | | | | | | Allows callers to opt-out of blockading network traffic during boot and on VPN app failure. Bug: 26694104 Change-Id: Ic2c25b79d8a17917025eb37be7de929fe156e2a3
* Change VPN failure notification to dialogRobin Lee2016-04-221-38/+30
| | | | | | | | | 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
* Update "you're already connected to VPN" stringsRobin Lee2016-04-221-1/+1
| | | | | | Change-Id: I0e64a612b47655a0d74880bc45987c8cd2272ea8 Fix: 28303500 (cherry picked from commit 3e293cb63fdd13dc63f783f6d52e7fdd8266b344)
* Be more aggressive caching Vpn preference attrsRobin Lee2016-04-214-80/+64
| | | | | | | | As any change to the preference title will cause it to lose focus, best not to do this too often. Change-Id: Ibac27ee1de42fd7ca05f3e3685b84f37dac39517 Fix: 28191965
* One updateSummary method called by all VPN prefsRobin Lee2016-04-213-33/+20
| | | | | | | | | | Having multiple methods means inevitably when new features are added to the preferences, the right calls aren't made so information on the screen lags between updates. Bug: 28257641 Change-Id: I336aeefd5941ccf808dc9070427209a7d2530032 (cherry picked from commit 903843e6f9ead6f17d3685a551dc85083b147038)
* Allow disconnecting always-on VPNsRobin Lee2016-04-142-10/+8
| | | | | Bug: 28072644 Change-Id: If7595f7e17747867158368d95db5addf97d3a14c
* Include login/alwayson in legacy VPN editor dialogRobin Lee2016-04-132-10/+12
| | | | | | | | | | A little more consistent with the new app VPNs' dialogs. To make this work it was also necessary to restart the lockdown VPN every time it is edited, which makes sense because the expected action after editing a VPN is that it reconnects with the new settings. Bug: 28072644 Change-Id: I4b6a6f0a6ed96d2ec6f62889fdae4abb60d0646c
* Show notification when failing to turn on always-on vpnVictor Chang2016-03-311-4/+51
| | | | | | | | | | | | - 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
* Remove VPN Overflow menuVictor Chang2016-03-295-199/+80
| | | | | | | | | | | | | | - Move always-on option for legacy vpn into the legacy vpn config page - This implementation doesn't show dialogue when replacing existing always-on vpn - Continue to disable lockdown option for legacy vpn when "persist.radio.imsregrequired" is true. Not applying to vpn app - Force to save account info when legacy vpn is always-on - When legacy vpn is always-on, don't try to connect. (Otherwise, an exception is thrown) TODO: Remove EXTRA_PICK_LOCKDOWN in LockdownVpnTracker in framework Bug: 26950700 Change-Id: Ia80669359c0b7cdb955c84937156c020ac6e9af5
* Per vpn setting change in VPN listVictor Chang2016-03-214-86/+114
| | | | | | | | | | | | | | - Show admin support details when user taps on a cell and user restriction is on - Show always-on-vpn active status in preference summary - User can still open non-configurable per-VPN info page even when user restriction is applied - Rename ConfigPreference to LegacyVpnPreference - Move summary String handling into ManageablePreference - ManageablePreference inherits GearPreference to reuse the code - Don't show disconnect dialog when always-on is enabled BUG=26950700 Change-Id: I37b087879cf3b674df528e7787d7bb1eead3310f
* Vpn settings per vpnVictor Chang2016-03-215-10/+330
| | | | | | | | | | | | 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
* vpn: check fragment is visible before adding prefsRobin Lee2016-03-171-1/+7
| | | | | | | | As VPN settings listens to network events it may get woken up again while it's in the background. Bug: 23596799 Change-Id: If6e07493da447d7ded324ff86b6e7d57c5c615e3
* Show "no vpns added" for empty vpn screenRobin Lee2016-03-161-10/+7
| | | | | | | | | Removed the left-alignment on restricted empty views which was inherited from Bluetooth settings but inconsistent with normal settings fragments. Bug: 22685111 Change-Id: I3a36c47d523392b8925031d4cac2ab3ef681e360
* Add disabled by policy empty views to more screens.Sudheer Shanka2016-02-191-9/+17
| | | | | Bug: 27214401 Change-Id: I6cd4292a63610671070bf2134105e9e348c3ab32
* Disable VPN prefs for restriction or lockdown caseRobin Lee2016-02-021-0/+17
| | | | Change-Id: I2fcf84876bf23b92cdcd00ce93514106914d0c29
* port settings over to new metrics enumChris Wren2016-01-271-2/+2
| | | | Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
* Show app VPNs in always-on listRobin Lee2016-01-143-40/+107
| | | | | Bug: 22547950 Change-Id: I1b37f3b8d2a061f9f6fba3c8b9a95f3b7edcee64
* [VPN] save public legacy VPN details publiclyRobin Lee2016-01-053-12/+2
| | | | | | | | | | This does not include certificates, private keys etc. which are still saved in the KeyStore with the encryption the user requested for them. Makes connecting to lockdown vpn before user unlock possible. Bug: 26108660 Change-Id: I56c1672c7a41e761c2791584b99900aff51b59e4
* Refactor VPN settings refresh to reuse preferencesRobin Lee2015-12-083-84/+186
| | | | | | | | | The old way was garbage-heavy. To add to that some changes to the way PreferenceScreens are redrawn was leading to some artifacts with items fading in/out every tick. Bug: 25588385 Change-Id: Idabf7546ab519bf196ad3b8582caa2ec6bf9e084
* Merge "VPN settings: grey out policy-restricted menus" am: ee4808d37b am: ↵Robin Lee2015-11-131-0/+5
|\ | | | | | | | | | | | | | | | | 905829393d am: 3ed65b90d0 * commit '3ed65b90d0348b60fc57c08e96986e03fef2fd4e': VPN settings: grey out policy-restricted menus
| * Merge "VPN settings: grey out policy-restricted menus"Robin Lee2015-11-131-0/+5
| |\ | | | | | | | | | | | | | | | | | | am: ee4808d37b * commit 'ee4808d37b955299501e9b753cc7bb19877d4f83': VPN settings: grey out policy-restricted menus
| | * VPN settings: grey out policy-restricted menusRobin Lee2015-11-131-0/+5
| | | | | | | | | | | | | | | | | | | | | setHasOptionsMenu seems unreliable at stopping onCreateOptoinsMenu from being called. Change-Id: Ie86da8e35dddb6e3a0e4678defc55bf5776f6c2f
* | | am 38fc400a: am 453d52b6: am 51d71aa2: am 583deb52: Merge "Unconfigure the ↵Erik Kline2015-10-141-1/+14
|\| | | | | | | | | | | | | | | | | | | | lockdown VPN if the user forgets its profile." into mnc-dr-dev * commit '38fc400ac901c8cfec0aeaf07c9d11a2f29d3ce2': Unconfigure the lockdown VPN if the user forgets its profile.
| * | Unconfigure the lockdown VPN if the user forgets its profile.Lorenzo Colitti2015-10-131-1/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if the user clicks "forget" on the configuration dialog for the profile that is currently being used by the always-on VPN, we don't disable the lockdown VPN, and we crash on next boot because ConnectivityService tries to start LockdownVpnTracker with an invalid configuration. Fix this by removing the LOCKDOWN_VPN variable in the keystore (which disables the always-on VPN), and notifying ConnectivityService. Bug: 23625458 Change-Id: I3545286c9fc23517306aa94607a4b2cb55cc56c4
* / Depend on support lib preferencesJason Monk2015-10-137-25/+17
|/ | | | | Bug: 24576551 Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
* Merge "Match getLegacyVpn calls to changed interface" into mnc-devRobin Lee2015-07-102-2/+2
|\
| * Match getLegacyVpn calls to changed interfaceRobin Lee2015-07-072-2/+2
| | | | | | | | | | | | The userId argument is now explicit. Pre-requisite for bug 21499103 Change-Id: Ib83e9615326ea484ef6d63fb1a1d9c1659999dab
* | Restore Vpn advanced options on re-init or rotateRobin Lee2015-07-061-11/+28
|/ | | | | | | Visibility isn't restored as part of instance state by default. Bug: 22183281 Change-Id: I86a7165e918251bc32f6884b9ad5f9c5987ca075