summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/connectivity
Commit message (Collapse)AuthorAgeFilesLines
* Fix Sending PAC Broadcast before downloadedJason Monk2013-09-261-1/+23
| | | | | | | | The PacManager now waits until the local proxy is bound and the PAC file is downloaded before sending out the proxy broadcast. Bug: 10895515 Change-Id: Iaa7fc0989b52453aeeb720b44df0fca0fcb959ca
* Fix PacManager to not unbind when no connectionJason Monk2013-09-181-5/+10
| | | | | | | | | PacManager previously would unbind service even when there was no connection. This means that multiple set proxies of no PAC after a PAC was present would cause the framework to crash. Bug: 10801296 Change-Id: I4387b50b6510cea3ee73425c8a0a837f816b0ce1
* Merge "Guarantee that PAC Local Proxy owns Port" into klp-devJason Monk2013-09-131-1/+63
|\
| * Guarantee that PAC Local Proxy owns PortJason Monk2013-09-131-1/+63
| | | | | | | | | | | | | | | | | | This changes the PAC support to not broadcast the Proxy information until the Local Proxy has started up and successfully bound to a port so that the local proxy information can be guaranteed to be owned by the proxy. Bug: 10459877 Change-Id: I175cd3388c758c55e341115e4a8241884b90d633
* | Request all tethering interfaces, fix corruption.Jeff Sharkey2013-09-101-13/+0
|/ | | | | | | | | | | | | netd now tracks statistics for tethered interfaces across tethering sessions, so switch to asking for all tethering stats. (Currently we're double-counting all tethering data, ever since it started tracking across sessions.) Also catch OOME to handle corrupt stats files, which we then dump to DropBox and then start over. Bug: 5868832, 9796109 Change-Id: I2eb2a1bf01b993dd198597d770fe0e022466c6b9
* System binds PAC Local Proxy instead of self startJason Monk2013-08-221-7/+24
| | | | | | | | | The PAC Local Proxy priviously caught proxy broadcasts and started itself when needed. Now it is bound by the system the same way the pac processing service is started. Bug: 10425091 Change-Id: I746daa21645a11aa18ef464f00c8cb5536d8c86f
* Merge "Notify IP address changes to interface observers." into klp-devLorenzo Colitti2013-08-211-0/+4
|\
| * Notify IP address changes to interface observers.Lorenzo Colitti2013-08-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add addressUpdated and addressRemoved methods to INetworkManagementEventObserver. (The -Updated method is not called -Added because it gets called for both adds and changes.) Update all its callers in the tree. 2. Make NetworkManagementService parse IP address notifications from NetlinkHandler and call the address{Removed,Updated} on its observers. Bug: 10232006 Change-Id: Ieb185dbba052bdbff03caafc0cf5397a7f04dc6d
* | Change PacProcessor to Android ServiceJason Monk2013-08-201-98/+132
|/ | | | | | | | | | This switches the PacProcessor over to an Android Service. The service is bound and unbound by the PacManager, which also adds it to the ServiceManager, allowing for Context-Free access by the PacProxySelector in all DVMs. bug:10182711 Change-Id: Id1ff7660be56e8976cdcccd76e041feb47a17a61
* PROXY_SERVICE may be missing and its reference null.Wink Saville2013-08-101-0/+14
| | | | | | | | Protect ourselves from when PROXY_SERVICE is missing and mProxyService is null. Bug: 10267814 Change-Id: Ia329376218e246cdde3d70b578c18466d48a6383
* Add PAC File support for proxy configurationJason Monk2013-08-071-0/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | PAC (Proxy auto-config) files contain a single javascript function, FindProxyForURL(url, host). It gets called to determine what proxy should be used for a specific request. This adds PAC support to the system. The ProxyProperties has been modified to hold the PAC file when one is present. The Proxy method setHttpProxySystemProperty has been modified to insert a PacProxySelector as the default ProxySelector when it is required. This new ProxySelector makes calls to the ConnectivityService to parse the PAC file. The ConnectivityService and the WifiConfigStore have been modified to support saving the extra PAC file data. The ConnectivityService now has a class attached (PacProxyNative) that interfaces to the native calls for PAC files. The parsing of the PAC file is handled by libpac (which is being added to external/) which utilizes libv8 to parse the javascript. As a fallback to applications that don't use the java ProxySelector, the proxy is setup to point to a local proxy server that will handle the pac parsing. bug:10182711 Change-Id: I5eb8df893c632fd3e1b732385cb7720ad646f401
* Merge "Support multiple Vpn ManageDialogs"Geremy Condra2013-07-231-1/+9
|\
| * Support multiple Vpn ManageDialogsChad Brubaker2013-07-161-1/+9
| | | | | | | | | | | | | | | | | | | | Move away from storing the configs in the Intent to prevent issues with PendingIntents and multiple configs. The Dialog now queries ConnectivityService for the configuration to display in the management dialog. Change-Id: I0e0ef52db840152914d117a24f776d8106e836ff
* | resolved conflicts for merge of f9774dc7 to masterRobert Greenwalt2013-07-191-2/+5
|\ \ | |/ |/| | | Change-Id: Ia9509ab6897e27da8bf4fc61a4140f2f93acb80f
| * am ddf17b5b: am 8c87b297: Merge "Make CS.isTetheringSupported dynamic" into ↵Robert Greenwalt2013-07-191-2/+5
| |\ | | | | | | | | | | | | | | | | | | jb-mr2-dev * commit 'ddf17b5b82f25965502377588483abbc328c4e6d': Make CS.isTetheringSupported dynamic
| | * Make CS.isTetheringSupported dynamicRobert Greenwalt2013-07-181-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | It used to be set at boot, but that was too quick to pick up carrier specific resources. With this change even if you switch sims subequent checks get the new values. bug:9865616 Change-Id: I8c270c6b02fc6bdd3c3d76ceea58172df25e058d
* | | Restricted profiles use Owner's VPNChad Brubaker2013-07-151-45/+199
| | | | | | | | | | | | | | | | | | | | | Restricted profiles cannot start their own VPN and will use the Owner's VPN if one is running. Change-Id: I1fc153742047f9149acb414c4c9d35305e97d8d0
* | | Add per user VPN supportChad Brubaker2013-07-121-41/+110
| | | | | | | | | | | | | | | | | | | | | VPNs are now per user instead of global. A VPN set by user A routes only user A's traffic and no other user can access it. Change-Id: Ia66463637b6bd088b05768076a1db897fe95c46c
* | | Make legacy VPN work over stacked interfaces.Lorenzo Colitti2013-07-111-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On stacked interfaces like 464xlat, Legacy VPN can't find the default gateway because it uses getRoutes, which only returns routes for the base link and not for the stacked links. It also assumes that the interface that the default route points to is the interface for the base link (e.g., rmnet0) instead of the interface the route actually points to (e.g., clat4). Fix this by calling getAllRoutes to find the default IPv4 route, and get the interface name from the route we find instead of assuming it's the base interface. Bug: 9597516 Change-Id: Ia6ce0b6258a421cd22f60dedca7e94176b32176b
* | | Merge "464xlat: use a gatewayed route, not point-to-point"Lorenzo Colitti2013-07-011-6/+13
|\ \ \
| * | | 464xlat: use a gatewayed route, not point-to-pointLorenzo Colitti2013-06-291-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various applications such as Skype and our legacy VPN code do not understand routes pointed directly at point-to-point interfaces and require a default gateway IPv4 address in order to function. Grudgingly accept that routes without default gateways Are Hard and use gatewayed routes instead. This causes routing to go from: default dev clat4 scope link to: default via 192.0.0.4 dev clat4 scope link 192.0.0.4 dev clat4 scope link and those apps now work. Bug: 9597256 Bug: 9597516 Change-Id: I7b7890873802d3cb99affd6eb70b8ab75e7a2cf6
* | | | am b8292830: resolved conflicts for merge of a920f25f to jb-mr2-dev-plus-aospElliott Hughes2013-06-281-5/+5
|\ \ \ \ | |/ / / |/| / / | |/ / | | | * commit 'b8292830f79fc76ffb9a1be5cd316212ac494d03': Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
| * | resolved conflicts for merge of fca0f92e to stage-aosp-masterElliott Hughes2013-06-281-5/+5
| |\ \ | | |/ | |/| | | | Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
| | * Switch frameworks/base over from @hidden Charsets to public StandardCharsets.Elliott Hughes2013-06-281-5/+5
| | | | | | | | | | | | | | | Bug: 3484927 Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
* | | Move battery stats call from SystemUI to system server.John Spurlock2013-06-251-0/+154
| | | | | | | | | | | | | | | | | | The UPDATE_DEVICE_STATS permission is no longer required in sysui. Change-Id: Icc3120b7873563e3727e56bed9f3b4767da0606d
* | | Merge "Start combining threads in system process."Dianne Hackborn2013-05-031-7/+2
|\ \ \ | |/ / |/| |
| * | Start combining threads in system process.Dianne Hackborn2013-05-021-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces four generic thread that services can use in the system process: - Background: part of the framework for all processes, for work that is purely background (no timing constraint). - UI: for time-critical display of UI. - Foreground: normal foreground work. - IO: performing IO operations. I went through and moved services into these threads in the places I felt relatively comfortable about understanding what they are doing. There are still a bunch more we need to look at -- lots of networking stuff left, 3 or so different native daemon connectors which I didn't know how much would block, audio stuff, etc. Also updated Watchdog to be aware of and check these new threads, with a new API for other threads to also participate in this checking. Change-Id: Ie2f11061cebde5f018d7383b3a910fbbd11d5e11
* | | Lockdown VPN handles its own connection teardown.Jeff Sharkey2013-05-011-2/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes started watching for CONNECTIVITY_ACTION broadcasts to handle the case where a network is disconnected without the interface going down. However, when lockdown VPN is enabled, the broadcast contents are augmented, and all connections appear disconnected until the VPN comes online. This caused a reset feedback loop to occur. Since LockdownVpnTracker already handles networks being disconnected separately from interfaces going down, this change disables handling the broadcast when lockdown is enabled. Bug: 8755148 Change-Id: I70a348aa97a4b22eaaf23aa5ed344de3e9a9ab0b
* | Listen for network disconnect.Robert Greenwalt2013-04-221-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VPN used to just watch the interface, but that is insufficient. There is no promise that the interface will go down when we're done with it. Now that wifi stays on in scan-only mode despite user turning it off it seems that the interface is left up, even in AP mode. Now listening for ConnectivityService broadcast that the network we were on has disconnected and tearing down the VPN then or when the interface goes away. bug:8550083 Change-Id: Icf414497bc55bead69de04e91f39f90ac2e6578a
* | Stop clat if it's no longer in use.Lorenzo Colitti2013-03-281-0/+4
| | | | | | | | | | | | | | | | | | | | Normally, clatd is stopped when a connection disconnects. However, if the connection's LinkProperties change, or if the disconnect somehow gets lost (e.g., because of bug 8486114), then we need to stop it (and possibly restart it). Bug: 8276725 Change-Id: Ib8ad0d653ed8d0cd70b7414bcaa8fdaef8ba5fcc
* | Framework changes for 464xlat.Lorenzo Colitti2013-03-152-1/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add a Nat464Xlat service that ConnectivityService can use to start and stop clat. When clat is started, the service waits for the clat interface to come up and then calls ConnectivityService to add the appropriate routes. 2. Make ConnectivityService start clat when an IPv6-only mobile interface is connected. We only support clat on mobile for now. 3. Make tethering use the interface that has the IPv4 default route insted of using the base interface of the LinkProperties. This allows us to tether to a stacked interface, which is needed for tethering with 464xlat. Bug: 8276725 Change-Id: I24480af69ee280f504399062638af0836a56268e
* | Improve ConnectivityManager docsRobert Greenwalt2013-02-221-0/+1
|/ | | | | | | Also fix some permission problems. bug:5738328 Change-Id: Ib32c223f425b1fc03b8cce528456bcb50b540fdf
* KeyStore: stop using state()Kenny Root2013-02-141-1/+1
| | | | Change-Id: I721974fd95f8d1ab06a3fd1bbb4c9b4d9d1d7752
* Monitor the right interface re VPNRobert Greenwalt2012-10-121-1/+7
| | | | | | | | Must remember the outer interface - undoes a change from a couple months ago that broke things. bug:7336302 Change-Id: Ia4f60862c60f3078853e151980e09cbf22a57222
* Properly cancel Tether notification.Robert Greenwalt2012-10-041-1/+2
| | | | | | | | | | When we add a second type of tethering we unify the notifications into a single generic type. This is done by canceling the first and replacing it, but this flow was improperly canceling, so you could end up with orphaned tethering icons. bug:7283605 Change-Id: I1d136f51592b4326d48578cf67b69122e45d4984
* Update references to migrated global settings.Jeff Brown2012-09-251-2/+2
| | | | | | | | | | Fixed one setting that was migrated but not marked deprecated. Removed a hidden setting that is no longer used by the new power manager service. Bug: 7231172 Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
* Fix issue #7214090: Need to be able to post notifications to all usersDianne Hackborn2012-09-242-5/+9
| | | | | | | | | | | | | | | Also fix a bunch of system services that should be doing this. And while doing that, found I needed to fix PendingIntent to evaluate USER_CURRENT at the point of sending, not creation. Note that this may end up with us having some notification shown to non-primary users that lead to settings UI that should only be for the primary user (such as the vpn notification). I'm not sure what to do about this, maybe we need a different UI to come up there or something, but showing the actual notification for those users at least seems less broken than not telling them at all. Change-Id: Iffc51e2d7c847e3d05064d292ab93937646a1ab7
* Improve multi-user broadcasts.Dianne Hackborn2012-08-301-1/+2
| | | | | | | | | | | | | | | | | | | You can now use ALL and CURRENT when sending broadcasts, to specify where the broadcast goes. Sticky broadcasts are now correctly separated per user, and registered receivers are filtered based on the requested target user. New Context APIs for more kinds of sending broadcasts as users. Updating a bunch of system code that sends broadcasts to explicitly specify which user the broadcast goes to. Made a single version of the code for interpreting the requested target user ID that all entries to activity manager (start activity, send broadcast, start service) use. Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
* Always-on VPN.Jeff Sharkey2012-08-271-0/+15
| | | | | | | | | | | | | | | | | | | Adds support for always-on VPN profiles, also called "lockdown." When enabled, LockdownVpnTracker manages the netd firewall to prevent unencrypted traffic from leaving the device. It creates narrow rules to only allow traffic to the selected VPN server. When an egress network becomes available, LockdownVpnTracker will try bringing up the VPN connection, and will reconnect if disconnected. ConnectivityService augments any NetworkInfo based on the lockdown VPN status to help apps wait until the VPN is connected. This feature requires that VPN profiles use an IP address for both VPN server and DNS. It also blocks non-default APN access when enabled. Waits for USER_PRESENT after boot to check KeyStore status. Bug: 5756357 Change-Id: If615f206b1634000d78a8350a17e88bfcac8e0d0
* Migrate legacy VPN arguments to system_server.Jeff Sharkey2012-08-241-10/+125
| | | | | | | | Generate the racoon and mtpd daemon arguments in system_server, instead of accepting them from Settings. Bug: 5756357 Change-Id: I42c1a644f6add477fe4222342640d7db15982cb8
* Begin moving VPN to NetworkStateTracker pattern.Jeff Sharkey2012-08-231-89/+191
| | | | | | | | | | | | Created base tracker that handles common bookkeeping, and move VPN to become a tracker. VPN status is now reflected in NetworkInfo, and is mapped to LegacyVpnInfo. Legacy VPN now "babysits" any init services it starts, watching for when they stop unexpectedly. Bug: 5756357 Change-Id: Iba7ec79da69469f6bd9a970cc39cf6b885b4c9c4
* Cleaner controls between Vpn and init services.Jeff Sharkey2012-08-061-10/+6
| | | | Change-Id: I35edf054f4a1190f7fb7b4c48ee832e899c9528b
* Make LocalSocket Closeable.Jeff Sharkey2012-08-051-10/+4
| | | | | | Enables usage of IoUtils.closeQuietly(). Change-Id: I91126297c1f235ae9da09f82d8f4f22db46558eb
* Network data activity change intent for network interfaces.Haoyu Bai2012-07-172-0/+5
| | | | | | | | The activity notification is received from netd, an intent DATA_ACTIVITY_CHANGE is then raised for other part of the system to consume. Change-Id: Idfcc4763c51c5b314c57f546c12557082f06bebf
* Merge commit '1b003ef0' into mitWink Saville2012-07-111-4/+5
|\ | | | | | | | | | | | | * commit '1b003ef0': Create telephony-common and mms-common Change-Id: Ie8876541dbe7f4c933cf7d69910dd204538bc975
| * Create telephony-common and mms-commonWink Saville2012-07-111-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These have been created to reduce the size and complexity of frameworks/base. mms-common was created by moving all of frameworks/base/core/java/com/google/android/mms to: frameworks/opt/mms telephony-common was created by moving some of frameworks/base/telephony to: frameworks/opt/telephony Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
* | Make tethering ignore bad inputsRobert Greenwalt2012-06-141-2/+7
| | | | | | | | | | | | | | | | | | | | Tethering was re-evaluating everything on any connectivity change. This was causing problems when mobile data was not available as each re-eval was again requesting a connection which would fail and loop. Ignore FAILED states to break this cycle in a minimal change. bug:6668233 Change-Id: Ia1dfc6abff1fe464e9501b50185cdb8d0fbb7ff6
* | am a2becffc: am d667aebf: Merge "VPN: move VpnDialogs away from system uid." ↵Chia-chi Yeh2012-06-121-8/+26
|\ \ | |/ | | | | | | | | | | into jb-dev * commit 'a2becffcf2a19889b90256a8479e276081ce6108': VPN: move VpnDialogs away from system uid.
| * VPN: move VpnDialogs away from system uid.Chia-chi Yeh2012-06-081-8/+26
| | | | | | | | | | Bug: 6632536 Change-Id: Iece647c077caf5298ccfe7d7aba5f0911a4ed0d1
* | Add logging for Tethering.Robert Greenwalt2012-05-111-7/+17
|/ | | | | | | Hard to repro bug doesn't have enough info in the logs to understand. bug:6469121 Change-Id: I31734f4e891e9b23197f2d5adb931e3891393cdd