Commit Graph

56 Commits

Author SHA1 Message Date
Victor Chang
14c2ac4dcb Per vpn setting change in VPN list
- 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
2016-03-21 12:36:44 +00:00
Victor Chang
16da2aa450 Vpn settings per vpn
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
2016-03-21 12:36:23 +00:00
Robin Lee
37b179fa8c vpn: check fragment is visible before adding prefs
As VPN settings listens to network events it may get woken up again
while it's in the background.

Bug: 23596799
Change-Id: If6e07493da447d7ded324ff86b6e7d57c5c615e3
2016-03-17 10:26:51 +00:00
Robin Lee
eb034eb65e Show "no vpns added" for empty vpn screen
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
2016-03-16 20:28:52 +00:00
Sudheer Shanka
7dbbe13168 Add disabled by policy empty views to more screens.
Bug: 27214401
Change-Id: I6cd4292a63610671070bf2134105e9e348c3ab32
2016-02-19 20:18:43 +00:00
Robin Lee
cac0dddd2a Disable VPN prefs for restriction or lockdown case
Change-Id: I2fcf84876bf23b92cdcd00ce93514106914d0c29
2016-02-02 14:50:57 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Robin Lee
003a4b563a Show app VPNs in always-on list
Bug: 22547950
Change-Id: I1b37f3b8d2a061f9f6fba3c8b9a95f3b7edcee64
2016-01-14 17:17:52 +00:00
Robin Lee
4c85639733 [VPN] save public legacy VPN details publicly
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
2016-01-05 18:48:46 +00:00
Robin Lee
7bf8654a5c Refactor VPN settings refresh to reuse preferences
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
2015-12-08 15:31:32 +00:00
Robin Lee
8edd4c1f8d Merge "VPN settings: grey out policy-restricted menus" am: ee4808d37b am: 905829393d
am: 3ed65b90d0

* commit '3ed65b90d0348b60fc57c08e96986e03fef2fd4e':
  VPN settings: grey out policy-restricted menus
2015-11-13 14:14:09 +00:00
Robin Lee
4198607ee2 VPN settings: grey out policy-restricted menus
setHasOptionsMenu seems unreliable at stopping onCreateOptoinsMenu from
being called.

Change-Id: Ie86da8e35dddb6e3a0e4678defc55bf5776f6c2f
2015-11-13 14:01:43 +00:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Robin Lee
290784afde Match getLegacyVpn calls to changed interface
The userId argument is now explicit. Pre-requisite for bug 21499103

Change-Id: Ib83e9615326ea484ef6d63fb1a1d9c1659999dab
2015-07-07 12:35:14 -07:00
Robin Lee
614fc178bf Fix build
Change-Id: Ibb2db14b2fd38b2c8c066c97f8cd6e396c104ce8
2015-06-25 16:01:44 -07:00
Robin Lee
dd142295da Enable VPN settings for secondary users
This is now supported.

Change-Id: I4a8eabe3042c04061f293066e84238029f18ecd8
2015-06-25 15:26:02 -07:00
Robin Lee
5f6f4cc572 Only unregister the network callback at onPause
Bug: 21592804
Change-Id: I425a8ebd350125ae48b9cf44cfef0b4c572ec25e
2015-06-17 18:44:58 -07:00
Alex Klyubin
3848407d0c Switch from KeyStore.saw to KeyStore.list.
KeyStore.saw was renamed to KeyStore.list for clarity. The
implementation of both methods is exactly the same.

Bug: 18088752
Change-Id: I2f171a4b7479683d5af898ebdf1b6f8a741536d1
2015-06-08 09:30:08 -07:00
Nicolas Prevot
a5df4779a0 Don't allow secondary users apps to start restricted Settings fragment.
On a secondary user, the fragments ApnSettings, TetherSettings and VpnSettings
should not be started.

But an app can still send an intent to start these fragments.
Prevent this by checkin the userId in these fragments.

BUG:15313261
BUG:15312781
BUG:15312494

Change-Id: I2a36bb89a8e37e4440aa28372d7a1800b33dae37
2015-06-02 16:49:20 -07:00
Robin Lee
c409605356 Clear connected legacy VPN during rescan
Change-Id: I0fec37b3f73ce5b538721d79e78e1128d7667380
2015-06-01 18:45:40 -07:00
Robin Lee
01b35bcae3 VPN: UI for forgetting disconnected VPNs
Made possible by expanded internal VPN APIs.

Bug: 20872408
Bug: 20692490
Bug: 20747154
Change-Id: Idc87084a130afa18b27c85cc9d4b5033dcedaabe
2015-05-18 22:55:15 +01:00
Robin Lee
ab6a65c03b VPN: Convert current-context IPCs to user context
These fetch info for the wrong user, which may be either wrong or worse
wholly nonexistent.

Bug: 20747154
Change-Id: Ibd5f2e5d3c5dfd252a032ebdfe204de7166fa3a5
2015-05-05 10:54:24 +00:00
Robin Lee
2bd92d5d06 vpn2: show third-party VPN services
VPN apps are shown alongside configured VPNs now. The requirement that
a password is set is now only enforced when setting up a configured
VPN as this is not necessary for apps.

Some UI redesign.

Bug: 19573824
Bug: 17474682
Bug: 19575658
Change-Id: I02bd977136929647d65b9784fb4cc5df24b45428
2015-04-21 19:42:53 +01:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Jeff Davidson
b2bb1973fe Restore legacy VPN stats dialog.
Was originally removed in ag/522961, but restoring to keep legacy VPN
behavior the same from within VpnSettings. This dialog is only
accesible from VpnSettings and so should only ever be shown for legacy
VPNs.

Bug: 17164793
Change-Id: I06c4e136e1023b8f84edfd15a15264d2e41d325b
2014-08-22 13:12:01 -07:00
Jeff Davidson
90b3b211ef Less intrusive VPN dialog.
Add new AppOps to Settings and remove references to obsolete
ManageDialog. VPN UX now lives in Quick Settings.

Bug: 12878887
Bug: 16578022
Change-Id: I102a14c05db26ee3aef030cda971e5165f078a91
2014-08-15 15:00:50 -07:00
Adam Powell
c17bdbf849 Use material alert dialog item view layout
Bug 16552638

Change-Id: I6d0d5c2c3d8cc7064828d223134b020a3a0ca828
2014-08-14 13:11:31 -07:00
Zoltan Szatmary-Ban
1e6653a1b5 Remove spinner in Settings > VPN
This CL reverses an earlier change https://googleplex-android-review.git.corp.google.com/#/c/515209

Bug:16030111
Change-Id: I981bd8a5ab03c56b78f38c6016277aa15548adba
2014-08-13 11:11:42 +01:00
Zoltan Szatmary-Ban
ca90af1064 Toggle between profiles in VPN Settings
This adds a spinner to the VPN settings screen which can be used to toggle
between the Settings app in the primary and managed profile so that the user
can edit settings belonging to both profiles.

Bug:16030111
Change-Id: I3b800264c634900412e8eebdbcf43a2b6913c2be
2014-08-01 14:41:57 +00:00
Julia Reynolds
ee27b9de8f Settings user restriction changes: wireless & networks changes.
Bug: 14081992
Change-Id: I32b0f06da7e7ff9bd8303ce26be2584e6cddbedc
2014-05-29 13:21:29 -04:00
Kenny Root
14415168b1 Remove old KeyStore API call sites
Remove the call sites that don't have the flags specified. This is to
ensure that callers know what flags they're setting.

Bug: 8122243
Change-Id: I59e38efbab6ad60a905ce8678a340da2088b19c9
2013-04-12 17:35:55 -07:00
Jeff Sharkey
1a55f95d45 Explicit GridLayout alignment to fix warnings.
Also show lockdown VPN dialog whenever relaunched.

Change-Id: Ib8aecbd4a7f9d61906f65fee39f1e819c79aabb4
2013-02-21 15:31:09 -08:00
Jeff Sharkey
8b78299d94 Improve notification UI for lockdown VPN.
Bug: 7064111
Change-Id: I951c1c116d2e0e22d1b32194d38f1431e806cbca
2013-02-21 09:47:48 -08:00
Kenny Root
ca714d8d0c KeyStore: stop using state()
Change-Id: Ia8fc945666c59c0b9a9bd6f890cc2a6b8859e1d4
2013-02-14 12:06:38 -08:00
Robert Greenwalt
88b0140241 Precreate a data structure so it's never null.
Fixes NPE that the fast-fingered monkey sometimes triggers.
bug:7084178

Change-Id: Ibeb5e1ce678f59207de5dd321e06ae88ccc52216
2012-09-27 11:21:12 -07:00
Jeff Sharkey
07d465ddb8 Hide lockdown VPN when IMS auth is required.
Bug: 7069782
Change-Id: I978d89894da17164a1e0122adb5acbfda3586fa1
2012-09-24 12:56:29 -07:00
Jeff Sharkey
f5de1db28a Omit PPTP VPNs from lockdown list.
Bug: 7064069
Change-Id: Ie4261828ef2dc5af32db3b327ca7ec00451e65d9
2012-09-19 11:16:24 -07:00
Jeff Sharkey
9fd7ac1ec7 Always-on VPN.
Adds support for always-on VPN profiles. Users pick an always-on VPN
from list of existing VPN profiles, which must use an IP address for
both VPN server and DNS.  Moved "add" operation into action bar.

Bug: 5756357
Change-Id: I4c7ed7f2a3b027be1baf65c08213336a61f3acfe
2012-08-26 17:01:46 -07:00
Jeff Sharkey
745e6212e7 Migrate legacy VPN arguments to system_server.
Generate the racoon and mtpd daemon arguments in system_server,
instead of accepting them from Settings.

Bug: 5756357
Change-Id: Ied048ca465aab03b2ae1c004388f49b82848b3f7
2012-08-24 11:17:57 -07:00
Jeff Sharkey
c6e84c0959 Migrate VpnProfile definition to framework.
Bug: 5756357
Change-Id: Icf4b2cb10e911216a2165f2afd1eb89152c5f1c0
2012-07-19 17:09:52 -07:00
Amith Yamasani
b0b37ae21c Help menus for several screens.
Bug: 5144896
Change-Id: Ib2f5146f6f62f2a33261bb165c3bf1bf13b22f38
2012-04-23 15:35:36 -07:00
Kenny Root
455a911df3 Switch VPN to use keystore ENGINE
The VPN client will no longer receive the private key material directly
from the caller. Instead it will use the keystore OpenSSL ENGINE to
request that keystore does private key operations on its behalf.

We only pass the keystore key alias to the private key instead of the
private key itself now.

Change-Id: I4ea2abda5ab7dec7d7ef5f451b96fef5bc92d811
2012-03-21 15:00:47 -07:00
Chia-chi Yeh
94cc1bbf32 VpnSettings: show more error messages when VPN fails.
Bug: 6032883
Change-Id: Idc49e1b611fd0c01f199bfde984084a8e4c62e17
2012-02-29 16:12:35 -08:00
Chia-chi Yeh
f5317a151b VpnSettings: add support for server certificates.
Bug: 5714397
Change-Id: I5ce13e244fba554bec31c4935571b09127b9270a
2011-12-06 17:51:01 -08:00
Chia-chi Yeh
6d4334be69 VpnSettings: fix bugs.
1. Support identifier in L2TP/IPSec PSK.
2. Fix profile validation for IPSec Hybrid RSA.
3. Fix crash when the user does not want to initialize keystore.

Change-Id: Id46dbbc84915dfb69f8bab6b540426e7614ab7c6
2011-08-08 14:35:25 -07:00
Chia-chi Yeh
d5a5de4de6 VpnSettings: the field has been renamed.
Change-Id: I1e234e96d0fa4af6f03a5b902073460acffd8e28
2011-08-03 15:44:08 -07:00
Chia-chi Yeh
d68dbe29bb VpnSettings: make more fields available as advanced options.
Now users can manually override DNS search domains, DNS servers,
and forwarding routes for each VPN network.

Change-Id: I10b8e383ac19fd19d23938dff78201a71724d58f
2011-07-27 17:58:26 -07:00
Chia-chi Yeh
d501b5c963 VpnSettings: bind OnPreferenceClickListener later.
Bug: 4999108

Change-Id: Idab3029a30943d1118584e6a1b01db96340858ed
2011-07-15 11:35:54 -07:00
Chia-chi Yeh
f35130dd79 VpnSettings: generate arguments for IPSec XAUTH VPNs.
Change-Id: I70d5e93f0d431d9d6cc64324ce2c37129d1a2a88
2011-07-14 15:16:51 -07:00