Commit Graph

1738 Commits

Author SHA1 Message Date
Robin Lee
5bdaeeafe6 Merge "Fix funky javadoc" 2015-07-29 16:32:07 +00:00
Robin Lee
1472c92128 Fix funky javadoc
Using @link for the first word of a @throws line is redundant and
generates strange HTML where the row appears twice.

See for example:
    http://developer.android.com/reference/android/net/VpnService.Builder.html#addAllowedApplication%28java.lang.String%29

Change-Id: I9c0bbe9156d292eb6f0e2e2ccb6dbcfef95bc312
2015-07-29 17:25:06 +01:00
Robert Greenwalt
691b81042f am f99b6f28: am 872d264c: am d6162cf2: am b3c93c5f: Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
* commit 'f99b6f2886cde0406798f0b8b4b1666c29b387bf':
  Un-remove legacy ConnectivityManager API.
2015-07-28 21:03:04 +00:00
Robert Greenwalt
d6162cf244 am b3c93c5f: Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
* commit 'b3c93c5f4256a1da1a8020abe5812a841b67667a':
  Un-remove legacy ConnectivityManager API.
2015-07-28 19:57:31 +00:00
Robert Greenwalt
b3c93c5f42 Merge "Un-remove legacy ConnectivityManager API." into mnc-dev 2015-07-28 19:39:48 +00:00
Robert Greenwalt
a36c074052 Un-remove legacy ConnectivityManager API.
These were @removed too soon.  We need to keep them @deprecated until
the bulk of devices support the new API and then we can remove them.

bug:22728205
Change-Id: If1b46ff1878f1778517624112b195c461645ddd1
2015-07-28 11:41:31 -07:00
Lorenzo Colitti
2ae3a05b42 am b0014e9f: am 08ef66bb: am 62ca62b3: am e288b3af: Merge changes I5c994de5,I6cb0dd84 into mnc-dev
* commit 'b0014e9f38bb7e01ba488e50c61f3fc9a7aaf9fc':
  Add a test for public bugs 2111 and 2136.
  Always check off-link connectivity in NetworkDiagnostics.
2015-07-28 02:02:59 +00:00
Lorenzo Colitti
62ca62b32a am e288b3af: Merge changes I5c994de5,I6cb0dd84 into mnc-dev
* commit 'e288b3af14421731d8f477b97e8d77588f20498b':
  Add a test for public bugs 2111 and 2136.
  Always check off-link connectivity in NetworkDiagnostics.
2015-07-28 01:20:16 +00:00
Lorenzo Colitti
87cfc70b73 Always check off-link connectivity in NetworkDiagnostics.
Currently, NetworkDiagnostics only checks off-link connectivity if
one of the DNS servers is off-link. Make it check off-link
connectivity in all cases by sending probes to Google Public DNS
if off-link DNS servers are not specified.

Bug: 22569331
Bug: 22641669
Bug: 22748900
Change-Id: I6cb0dd8491bc0c1a488631deca56722b9c1d2b3f
2015-07-27 16:41:44 +09:00
Erik Kline
56066f6036 am f35e9344: am ec69003d: am 9d598e11: Pass signal strength thresholds inside a Bundle
* commit 'f35e93446d5172446fa2cf37cac405a62cd54233':
  Pass signal strength thresholds inside a Bundle
2015-07-18 18:08:45 +00:00
Lorenzo Colitti
a169460950 am 1c6b02af: am da355c80: am c3f21f3b: Support NetworkCallbacks based on signal strength.
* commit '1c6b02af8b53982c2717c684e5cdd94618dff422':
  Support NetworkCallbacks based on signal strength.
2015-07-18 18:08:39 +00:00
Lorenzo Colitti
15cda089b6 am 6163290e: am e647d93d: am 8bf977d5: ConnectivityManager API for for packet keepalives.
* commit '6163290e5975b0d4ebdecc20dfa41faac4b4ba79':
  ConnectivityManager API for for packet keepalives.
2015-07-18 17:51:42 +00:00
Lorenzo Colitti
2d2a59924d am 47a47d3b: am 00365fc6: am 260a36d1: Make immutable NetworkCapabilities more explicit.
* commit '47a47d3b907325be3b851ce87f275e6032527c5e':
  Make immutable NetworkCapabilities more explicit.
2015-07-18 17:51:36 +00:00
Erik Kline
9d598e115f Pass signal strength thresholds inside a Bundle
Bug: 21407651
Change-Id: I2c80e89441e2eb15a246cb1fa9347f886cefa80f
2015-07-18 17:28:52 +00:00
Lorenzo Colitti
c3f21f3b8b Support NetworkCallbacks based on signal strength.
Bug: 21405941
Change-Id: I2ed8a5aeb8dac464a4305671ed22abcacb485bc9
2015-07-18 17:28:26 +00:00
Lorenzo Colitti
8bf977d562 ConnectivityManager API for for packet keepalives.
Bug: 21405946
Change-Id: Ie1f8f8bee684fe2bb1092a9f1bc9f5dc29b1defc
2015-07-18 17:00:13 +00:00
Lorenzo Colitti
260a36d1b2 Make immutable NetworkCapabilities more explicit.
Bug: 21405941
Change-Id: Iafd738c31747b0f5f9356bed1c97f5f282830af1
2015-07-18 16:59:47 +00:00
Neil Fuller
b662579ec0 am 3ecbca50: am 886630c0: Merge "Switch shutdownInput / shutdownOutput to using Os.shutdown."
* commit '3ecbca5081f26ca03ef6b8b68767753343e67f38':
  Switch shutdownInput / shutdownOutput to using Os.shutdown.
2015-07-13 15:26:09 +00:00
Robin Lee
f8b96edf47 am 81093dd0: am 51cfb3a4: am 2164cf4f: am f180fe31: Merge "Legacy VPN calls to require a userID" into mnc-dev
* commit '81093dd04bc1fdfe1f7389baefb891122e232ff9':
  Legacy VPN calls to require a userID
2015-07-10 20:03:02 +00:00
Robert Greenwalt
cc5cd90029 am e84c6b37: am 2cef47ff: am 66f59dc1: am 1570b6b3: Merge "Enable EMERGENCY mobile connections." into mnc-dev
* commit 'e84c6b37f4859371e274b30035a1a5ec04307f66':
  Enable EMERGENCY mobile connections.
2015-07-10 19:17:55 +00:00
Robin Lee
f180fe31de Merge "Legacy VPN calls to require a userID" into mnc-dev 2015-07-10 19:05:38 +00:00
Robert Greenwalt
1570b6b3c7 Merge "Enable EMERGENCY mobile connections." into mnc-dev 2015-07-10 18:23:24 +00:00
Paul Jensen
851bcaf2ed am ca36baaf: am 2cb16d2e: am 75a43340: am 00c64f7c: Merge "Add android.net.CaptivePortal class for captive-portal-handling-app callbacks" into mnc-dev
* commit 'ca36baafef8024973ab8aebb54913a96db3d0e77':
  Add android.net.CaptivePortal class for captive-portal-handling-app callbacks
2015-07-10 15:46:28 +00:00
Paul Jensen
00c64f7ca5 Merge "Add android.net.CaptivePortal class for captive-portal-handling-app callbacks" into mnc-dev 2015-07-10 14:57:13 +00:00
Neil Fuller
a7f7c248c7 Switch shutdownInput / shutdownOutput to using Os.shutdown.
Bug: 3106438
Change-Id: I2c4817e435c6b253d6c507ea57bdfdfe45df8862
2015-07-10 12:30:07 +01:00
Robert Greenwalt
4bd4389616 Enable EMERGENCY mobile connections.
Hooks the ConnectivityManager.TYPE_MOBILE_EMERGENCY,
PhoneConstants.APN_TYPE_EMERGENCY, and NetworkCapabilities.NET_CAPABILITY_EIMS
together so carrier apps can request connections to this APN.

bug:21785357
Change-Id: Id92a5e28d19407cc7a8f8b5478b23457f2f7f89d
2015-07-09 14:49:35 -07:00
Robert Greenwalt
c3ed104c25 am 49a8822d: am 8d6620bd: am 30d822e2: am b091695b: Merge "Revive NetworkInfo\'s SUSPENDED state." into mnc-dev
* commit '49a8822db9dcf2bc2b11a6a44179b361c1f8b86b':
  Revive NetworkInfo's SUSPENDED state.
2015-07-09 18:50:16 +00:00
Paul Jensen
49e3edff51 Add android.net.CaptivePortal class for captive-portal-handling-app callbacks
This new class replaces the awkward string token and ConnectivityManager APIs
used by apps handling captive portals.

Bug:21343774
Change-Id: I1a2c69edb17322715bf8422bb4216b0ea60bfd59
2015-07-09 10:47:34 -04:00
Neil Fuller
f74d27af87 am b27c379b: am 2ca4f73e: Merge "Switch LocalSocketImpl.accept() over to using Os.accept()"
* commit 'b27c379b259d42a1e90eb4b4d79abc2426def731':
  Switch LocalSocketImpl.accept() over to using Os.accept()
2015-07-09 11:38:36 +00:00
Neil Fuller
c1eaeb9337 Switch LocalSocketImpl.accept() over to using Os.accept()
Bug: 3106438
Change-Id: I3b4a07cc2283c3cfdbaf3d2460f37264f67690e3
2015-07-09 09:45:01 +00:00
Robert Greenwalt
8d48252b80 Revive NetworkInfo's SUSPENDED state.
This got lost in the multinetwork work for L.  It means
that if telephony stops having the ability to pass packets for a while
the rest of the platform doesn't know.

Telephony enters the suspended state if it enters a telephony call
while using certain radio access technologies, or if it switches to
one of those RATs while in a call.  It also can enter this state if
it temporarily loses contact with the network - the modem will
not report the loss of the data call for an indeterminant time in
the hope that regaining the network will restore the connection
without harm to any ongoing ip layer interactions.  For example
passing through a tunnel or taking an elevator trip may use this
mechanism.

bug: 19637156
Change-Id: If9fde68175e8561c19323c81fbfcb02a6e5a00fb
2015-07-08 20:42:55 -07:00
Zoltan Szatmary-Ban
55a3a23307 am 5bc85aa8: am d426cf73: am 30871415: am 89592760: Merge "Expose time-interval detail query on INetworkStatsSession" into mnc-dev
* commit '5bc85aa8dbfdf03a5e764e74c415189c1bfa591c':
  Expose time-interval detail query on INetworkStatsSession
2015-07-08 12:55:18 +00:00
Neil Fuller
849558b727 am 26e58f09: am b05c2beb: Merge "Move listen() over to using android.system.Os"
* commit '26e58f09d9c040b8abaa5184a16ec52e5f401b4c':
  Move listen() over to using android.system.Os
2015-07-08 10:50:36 +00:00
Robin Lee
3eed5eca80 Legacy VPN calls to require a userID
This way, system applications with INTERACT_ACROSS_USERS permission will
be able to fetch the information they need.

Pre-requisite for bug 21499103

Change-Id: I7e759d5039ae6e85abc6435049016b1dcaabc834
2015-07-07 19:37:21 +00:00
Neil Fuller
b66e748577 am 23325440: am 50d11ded: Merge "Reimplement LocalSocket methods using android.system.Os"
* commit '2332544040d294ee81f64aabebe49c4f548c1337':
  Reimplement LocalSocket methods using android.system.Os
2015-07-07 16:46:44 +00:00
Zoltan Szatmary-Ban
72027d2e42 Expose time-interval detail query on INetworkStatsSession
Also, force polling when a session is opened for NetworkStatsManager.

Bug: 21864554
Bug: 21754685
Change-Id: I24ea822c2d5bc1421ec7ee65d0cfe27cf02dd69e
2015-07-07 17:36:54 +01:00
Neil Fuller
a8f4499c54 am 93bb2bf2: am 761e39e1: Merge "Switch to using android.system.Os for more calls"
* commit '93bb2bf2e835f714d09b53dea3ca5d9e4451021e':
  Switch to using android.system.Os for more calls
2015-07-04 02:58:40 +00:00
Neil Fuller
4fa438ef72 Move listen() over to using android.system.Os
Bug: 3106438
Change-Id: I9b4d1d58d84a28828555ae863e86530995191f2c
2015-07-03 17:58:00 +01:00
Neil Fuller
d2df87eb44 Reimplement LocalSocket methods using android.system.Os
InputStream.available()
OutputStream.flush()

Bug: 3106438
Change-Id: I3a9425c323229e27bb72f6232dd13f7579586840
2015-07-03 15:16:37 +01:00
Neil Fuller
c80af6d84d Switch to using android.system.Os for more calls
The methods being switched here should involve no important
semantic changes. socket.getSoTimeout() is now implemented:
previously it would have returned 0 in all cases.

Some tidy up of unimplemented / commented code.

Switching other calls to use Os would carry more risk and
will be handled separately they can be switched safely.

Bug: 3106438
Change-Id: I5526249395565fee6e43f159a2b5975b0d41d058
2015-07-03 13:02:08 +01:00
Paul Jensen
f2c1cfe4c5 Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API
This better pairs up with
registerNetworkCallback(NetworkRequest, PendingIntent).

Bug:22175708
Change-Id: I336df3f48a0b814f1cbeba6d00afc4e6cc536483
2015-06-30 14:29:18 -04:00
Erik Kline
b36a3131d1 Fix use of reachable DNS server logic
Move reachable DNS server computation out of ConnectivityService
and split it into LinkProperties#isReachable() and a companion
change in WifiStateMachine's makeLinkProperties().

Restore previous ConnectivityService#updateDnses() behaviour, as
the pruning is done in WifiStateMachine now.

Bug: 19470192
Bug: 20733156
Bug: 22098233
Change-Id: I810ef74d504e5dc1ca2017d435cdadd6b82171e6
2015-06-30 12:12:37 +09:00
Paul Jensen
bb2e0e9816 Disallow requesting networks with mutable NetworkCapabilities.
It's not clear what it means to request a network with a mutable
NetworkCapability like NET_CAPABILITY_VALIDATED or
NET_CAPABILITY_CAPTIVE_PORTAL.  Presently requesting such a network
would fail in a number of different ways:
1. The NetworkFactories would fail to match the request against their
   filter which doesn't include stateful NetworkCapabilities.
2. If the NetworkFactories did match, they'd bring up networks to try
   and satisfy the requests, but the networks would not have any
   mutable NetworkCapabilities initially so they'd be reaped.
Because of these problems it's safest to simply disallow these
requests.

Bug: 21343774
Change-Id: I56303242b81d39b370b8d5d1e32059bfcfc25949
2015-06-23 14:13:10 -04:00
Paul Jensen
3d194eae6f Add NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL
Bug: 21343774
Bug: 20898908
Change-Id: I23069a6cba346999d1b2eeaa445023bd6bf4ef94
2015-06-23 14:09:01 -04:00
Lorenzo Colitti
e2d921da29 Merge "Re-hide onPreCheck and unhide NET_CAPABILITY_VALIDATED." into mnc-dev 2015-06-23 14:41:57 +00:00
Paul Jensen
2f56a33041 Merge "Add ConnectivityManager.registerNetworkCallback(NetworkRequest, PendingIntent)" into mnc-dev 2015-06-20 01:13:18 +00:00
Paul Jensen
694f2b8472 Add ConnectivityManager.registerNetworkCallback(NetworkRequest, PendingIntent)
Without this API we're more or less encouraging apps to have long running
processes (battery draining) to receive NetworkCallbacks for the stateful
NetworkCapabilities NET_CAPABILITIES_VALIDATED and
NET_CAPABILITIES_CAPTIVE_PORTAL.  With this API they can instead using
PendingIntents which outlive their apps.

Bug: 21343774
Change-Id: I168d0ac3757729acf7ca5546079846f575a0eedd
2015-06-18 20:00:44 -04:00
Xiaohui Chen
802ece6139 Merge "system_server: add two child chains to firewall" into mnc-dev 2015-06-17 23:50:28 +00:00
Xiaohui Chen
b41c9f7f39 system_server: add two child chains to firewall
This is an attempt to speed up getting out of device idle.  It groups
uid firewall rules in these child chains so we can attach/detach a whole
chain instead of individual uid rules.

BUG:21446713
Change-Id: Ie8f392da2deabe7cc86a9ecf4ed080163861d41e
2015-06-17 15:55:37 -07:00
Paul Jensen
19769114b4 Merge "Remove dead hidden ConnectivityManager and NetworkInfo APIs." into mnc-dev 2015-06-16 11:30:51 +00:00