Commit graph

2,185 commits

Message SHA1
am 9c8abd1d: am f23eece2: am f90627d4: Merge "Don\'t crash if an invalid always-on VPN profile is configured." into mnc-dr-dev
* commit '9c8abd1d7ab205047a7e0f131eca24b2f3019d5d':
  Don't crash if an invalid always-on VPN profile is configured.

Erik Kline   authored and   Android Git Automerger   commited 2015-10-14 17:55:13 +00:00
bc68bc37c4
Merge "Don't crash if an invalid always-on VPN profile is configured." into mnc-dr-dev
Erik Kline   authored and   Android (Google) Code Review   commited 2015-10-14 17:37:57 +00:00
f90627d40b
Don't crash if an invalid always-on VPN profile is configured.
This is currently being hit because Settings does not clear the
always-on VPN configuration when the corresponding VPN profile is
deleted. This will be fixed in Settings, but there's no harm in
being robust to invalid configurations here.

Bug: 23625458
Change-Id: Id185a54d5892339197cd40026df5174debd957cf

Lorenzo Colitti   commited 2015-10-13 15:29:14 +09:00
f5e2883d41
am 75051c3a: am 7f6d8754: am 22d9b51c: Merge "Push firewall rules up to ConnectivityService." into mnc-dr-dev
* commit '75051c3a62123b4668231d0243ba11462e02ac5a':
  Push firewall rules up to ConnectivityService.

Jeff Sharkey   authored and   Android Git Automerger   commited 2015-10-12 16:55:58 +00:00
a8f0bb0ff1
Merge "Push firewall rules up to ConnectivityService." into mnc-dr-dev
Jeff Sharkey   authored and   Android (Google) Code Review   commited 2015-10-12 16:34:19 +00:00
22d9b51ce0
am ccffea7a: resolved conflicts for a884d81e to stage-aosp-master
* commit 'ccffea7a3d':
  constify JNINativeMethod function pointer tables

Elliott Hughes   authored and   Android Git Automerger   commited 2015-09-24 17:14:10 +00:00
26c330a424
resolved conflicts for a884d81e to stage-aosp-master
Change-Id: Ice485967fa96f13786024b6939b826638e906ff0

Elliott Hughes   commited 2015-09-24 10:01:32 -07:00
ccffea7a3d
am 06cf7c44: am 4e0d6dbd: am 4cbfe331: am 46a36218: am 5eff98f8: am ece4ac21: Merge "Don\'t mark NetworkRequests restricted when they don\'t have restricted caps" into lmp-dev
* commit '06cf7c44af':
  Don't mark NetworkRequests restricted when they don't have restricted caps

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 14:50:45 +00:00
7724cffc30
am d2af51fa: am bfff9435: (-s ours) am 10a7d744: am 21087892: am 334c6e9a: am a9e98343: Merge "Fix NOT_RESTRICTED network capability and enforce it." into lmp-dev
* commit 'd2af51fabf':
  Fix NOT_RESTRICTED network capability and enforce it.

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 14:50:40 +00:00
477302fede
am 4e0d6dbd: am 4cbfe331: am 46a36218: am 5eff98f8: am ece4ac21: Merge "Don\'t mark NetworkRequests restricted when they don\'t have restricted caps" into lmp-dev
* commit '4e0d6dbdb4':
  Don't mark NetworkRequests restricted when they don't have restricted caps

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 14:42:02 +00:00
06cf7c44af
am bfff9435: (-s ours) am 10a7d744: am 21087892: am 334c6e9a: am a9e98343: Merge "Fix NOT_RESTRICTED network capability and enforce it." into lmp-dev
* commit 'bfff94358e':
  Fix NOT_RESTRICTED network capability and enforce it.

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 14:41:57 +00:00
d2af51fabf
am 4cbfe331: am 46a36218: am 5eff98f8: am ece4ac21: Merge "Don\'t mark NetworkRequests restricted when they don\'t have restricted caps" into lmp-dev
* commit '4cbfe3316fd1105b697a9838ef7bafaebf5080a2':
  Don't mark NetworkRequests restricted when they don't have restricted caps

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 11:33:18 +00:00
4e0d6dbdb4
am 10a7d744: am 21087892: am 334c6e9a: am a9e98343: Merge "Fix NOT_RESTRICTED network capability and enforce it." into lmp-dev
* commit '10a7d7449dae2aabf4f22f980e7efabf274a939a':
  Fix NOT_RESTRICTED network capability and enforce it.

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 11:33:13 +00:00
bfff94358e
am 5eff98f8: am ece4ac21: Merge "Don\'t mark NetworkRequests restricted when they don\'t have restricted caps" into lmp-dev
* commit '5eff98f8f6':
  Don't mark NetworkRequests restricted when they don't have restricted caps

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 11:13:48 +00:00
46a3621883
am 334c6e9a: am a9e98343: Merge "Fix NOT_RESTRICTED network capability and enforce it." into lmp-dev
* commit '334c6e9a5d':
  Fix NOT_RESTRICTED network capability and enforce it.

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 11:13:40 +00:00
21087892f8
am ece4ac21: Merge "Don\'t mark NetworkRequests restricted when they don\'t have restricted caps" into lmp-dev
* commit 'ece4ac2105d18d8d7b6296d6de3fdd5641c35258':
  Don't mark NetworkRequests restricted when they don't have restricted caps

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 11:06:32 +00:00
5eff98f8f6
am a9e98343: Merge "Fix NOT_RESTRICTED network capability and enforce it." into lmp-dev
* commit 'a9e98343146244b71e236d82c95a8d0fa30a41c1':
  Fix NOT_RESTRICTED network capability and enforce it.

Paul Jensen   authored and   Android Git Automerger   commited 2015-09-23 11:06:27 +00:00
334c6e9a5d
constify JNINativeMethod function pointer tables
Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954

Daniel Micay   commited 2015-09-22 17:10:35 -04:00
6d5e7fa0c5
Framework fixes for RSSI offload.
1. When registering a NetworkCallback, only update RSSI
   thresholds if the request specifies a signal strength.
2. When releasing a NetworkCallback, only update RSSI
   thresholds if the request specified a signal strength.
3. Add logging.

Add logging.
Bug: 21405941
Bug: 23679346
Bug: 23815756
Change-Id: I4bc42d0ab02285a7a9d14e09f8a1cd868f4d9d7f

Lorenzo Colitti   commited 2015-09-15 16:00:39 +09:00
71ec67ddf7
Push firewall rules up to ConnectivityService.
getActiveNetworkInfo() and friends already know how to augment their
results to help apps detect when network access is blocked.  This
change wires up the new app-idle and device-idle firewall rules to
be reported through these APIs.

This also causes other platform tools like DownloadManager and
SyncManager to respect these new policies.

Bug: 24050462
Change-Id: Id9517b0b70be7e3ca2ab27bed8049db916e4d829

Jeff Sharkey   commited 2015-09-14 15:49:36 -07:00
baefe062f7
NetworkDiagnostics: ping default router from all global addreses.
This will hopefully allow us to determine if the router does not
have our global addresses in its neighbour cache.

Bug: 23661687
Change-Id: I46734c3c719003939cfccf038457ec309a9ff967

Lorenzo Colitti   commited 2015-09-10 15:49:54 +09:00
db30ceba87
Require the new PACKET_KEEPALIVE_OFFLOAD permission.
Bug: 23884210
Change-Id: I50a1a647a69deaba92e73021ee7d6cc0f3eb1eee

Lorenzo Colitti   commited 2015-09-09 00:16:57 +09:00
520287e881
Add an error code for generic hardware error.
This is necessary because currently the wifi code just returns
whatever hardware-specific integer it gets back from the HAL,
which is bad because that will be interpreted by the caller as
one of the error codes defined in this class.

In parallel we'll also modify the wifi code to return this new
error code if the hardware returns an error.

Bug: 21405946
Change-Id: Ic9fa1193ced69a4e7ff543e397221c89b10a5a13

Lorenzo Colitti   commited 2015-09-09 00:16:57 +09:00
2aab71871c
Fix bugs and crashes in PacketKeepalive API.
Bug: 22606153
Bug: 23820819
Bug: 23884210
Change-Id: I1bf82094ec664baed345e9fb137fada0cbf4b7a0

Lorenzo Colitti   commited 2015-09-09 00:16:56 +09:00
f99389f155
Add tests for the PacketKeepalive API.
This currently fails in many different ways, but it tells us what
to fix.

Bug: 22606153
Bug: 23884210
Change-Id: If2e5ee0a8d7b26cad67d3d566ed5b1383e0db096

Lorenzo Colitti   commited 2015-09-09 00:16:56 +09:00
b793d607a5
Use a CountDownLatch instead of sleep() in NetworkFactory tests.
This makes testNetworkFactoryRequests 2-3 times faster.

Bug: 22606153
Change-Id: I9657b6929e77f23ec811d0ab57b2ba974f0b6a69

Lorenzo Colitti   commited 2015-09-08 16:41:47 +09:00
221dace9cc
Get rid of shortSleep() in ConnectivityServiceTest.
Instead, use IdleHandler to wait for things to become idle.

Bug: 22606153
Change-Id: Ic6ab93ad4d336b40962f9be1096629a44b63ee2f

Lorenzo Colitti   commited 2015-09-08 16:41:47 +09:00
1b8b5cdfad
Make ConnectivityServiceTest a bit more readable.
1. Make TestNetworkCallback a bit smarter and rename it to
   SingleUseNetworkCallback. This allows us to get rid of all the
   calls to TestNetworkCallback#getConditionVariable.
2. Delete the commented out code that used to test a
   ConnectivityService model that has not been used since KK.
3. Remove unused imports, etc.

Bug: 22606153
Change-Id: I81a2d0b970d19e5f4515490d8c2f88d416445fa1

Lorenzo Colitti   commited 2015-09-07 20:41:51 +09:00
5629741caa
Cut down some logs.
bug:23623327
Change-Id: I737d4e6c384bf4da62c65ad2abe0c9b5dca0067a

Robert Greenwalt   commited 2015-09-03 17:53:42 -07:00
9b33077561
Add SUPL-specific network bcast
Move SUPL CONNECTIVITY_ACTION bcasts to a different, hidden intent
to reduce the churn of apps when SUPL comes/goes.

Short term hack until SUPL moves to use the new APIs and there's
no bcast.

bug:23350688
Change-Id: I3dc14b42afa72465260aa41ccedfe1df27baabd9

Robert Greenwalt   commited 2015-09-01 15:06:04 -07:00
e577c8181d
am e3bcde94: Merge "Reduce CONNECTIVITY_CHANGE bcasts" into mnc-dev
* commit 'e3bcde94caf8440d5e3958a340b3d276d03f7691':
  Reduce CONNECTIVITY_CHANGE bcasts

Robert Greenwalt   authored and   Android Git Automerger   commited 2015-08-28 21:36:39 +00:00
76ba16e7aa
Reduce CONNECTIVITY_CHANGE bcasts
If an app uses the new api (requestNetwork) to bring up MMS, don't
mark it as a legacy request.  This was done because the messaging
service had to use a combination of new API and old
(requestRouteToHost) due to api problems.  This has been resolved
so don't mark these as legacy requests anymore.

The general stuff is still in for other types due to lack of testing
time but this should be removed altogether in the future.

bug:23350688
Change-Id: I41c27efb253c39d8af1357ae7916ed5315c716db

Robert Greenwalt   commited 2015-08-28 12:37:54 -07:00
051e641346
Don't mark NetworkRequests restricted when they don't have restricted caps
Requests without NET_CAPABILITIES_INTERNET and just the default network
capabilities should not be marked restricted.  Without this fix apps
can hit permissions exceptions if they inadvertently make requests
without NET_CAPABILITIES_INTERNET.

Bug:23164917
Change-Id: I4c7136821315bcb05dfc42ffbc505a5d4f6109e6
(cherry picked from commit e8f0b4b312)

Paul Jensen   commited 2015-08-28 12:50:09 -04:00
4fd9190492
Fix NOT_RESTRICTED network capability and enforce it.
With this change:
1. NOT_RESTRICTED should be removed from NetworkRequests that bring up
   special restricted carrier networks (e.g. IMS, FOTA).
2. NetworkRequests without NOT_RESTRICTED require CONNECTIVITY_INTERNAL
   permission to register
3. Binding sockets to networks without NOT_RESTRICTED requires
   CONNECTIVITY_INTERNAL permission

Bug:21637535
Change-Id: I5991d39facaa6b690e969fe15dcbeec52e918321
(cherry picked from commit bc99fc7d96)

Paul Jensen   commited 2015-08-28 12:48:11 -04:00
e46a802db1
am 11e84bde: Merge "Don\'t mark NetworkRequests restricted when they don\'t have restricted caps" into mnc-dev
* commit '11e84bde9e98cb4b777a67208989d259883e9375':
  Don't mark NetworkRequests restricted when they don't have restricted caps

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-08-19 20:54:48 +00:00
4286e7590d
Don't mark NetworkRequests restricted when they don't have restricted caps
Requests without NET_CAPABILITIES_INTERNET and just the default network
capabilities should not be marked restricted.  Without this fix apps
can hit permissions exceptions if they inadvertently make requests
without NET_CAPABILITIES_INTERNET.

Bug:23164917
Change-Id: I4c7136821315bcb05dfc42ffbc505a5d4f6109e6

Paul Jensen   commited 2015-08-19 11:08:38 -04:00
e8f0b4b312
am 886e7a63: Merge "Change default cellular activity timeout to 10" into mnc-dev
* commit '886e7a63b122a30c69c663d32e3e5f880a07593e':
  Change default cellular activity timeout to 10

Adam Lesinski   authored and   Android Git Automerger   commited 2015-08-19 00:53:35 +00:00
01ed50f414
Change default cellular activity timeout to 10
LTE radios take 10 seconds to power down, so we should set the
activity timeout to 10 seconds.

Bug:23294704
Change-Id: I7478b77f134b0fe2d82e39acd5c370add12735ca

Adam Lesinski   commited 2015-08-18 11:47:07 -07:00
3961c0efb7
am 746d1e33: Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev
* commit '746d1e3321':
  Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS

Billy Lau   authored and   Android Git Automerger   commited 2015-08-07 22:22:24 +00:00
29ea9fd5c4
Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev
Billy Lau   authored and   Android (Google) Code Review   commited 2015-08-07 22:16:03 +00:00
746d1e3321
Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS
Merge the CHANGE_NETWORK_STATE permission with WRITE_SETTINGS.

AndroidManifest.xml:
Raised the protection level of CHANGE_NETWORK_STATE permission from
normal to signature|appops and pre23|preinstall for compatibility

provider/Settings:
Wrote new helper methods to check if app is allowed to change network
state.

ConnectivityManager.java & ConnectivityService.java:
Replace enforcement checks for CHANGE_NETWORK_STATE with
checkAndNoteChangeNetworkStateOperations instead.

Change-Id: If8c2dd3c76a5324ca43f1d90fa17973216c2bcc5

Billy Lau   commited 2015-08-07 19:29:51 +01:00
16c5d9a6a7
resolved conflicts for merge of 32380993 to mnc-dr-dev
Change-Id: I3a8624b2b375e0d174983d7690082e0e6932c4de

Paul Jensen   commited 2015-08-05 07:07:24 -04:00
41027a921c
Merge "Fix NOT_RESTRICTED network capability and enforce it." into mnc-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2015-08-05 10:03:47 +00:00
3238099342
Fix NOT_RESTRICTED network capability and enforce it.
With this change:
1. NOT_RESTRICTED should be removed from NetworkRequests that bring up
   special restricted carrier networks (e.g. IMS, FOTA).
2. NetworkRequests without NOT_RESTRICTED require CONNECTIVITY_INTERNAL
   permission to register
3. Binding sockets to networks without NOT_RESTRICTED requires
   CONNECTIVITY_INTERNAL permission

Bug:21637535
Change-Id: I5991d39facaa6b690e969fe15dcbeec52e918321

Paul Jensen   commited 2015-08-04 07:24:24 -04:00
bc99fc7d96
am c16abda3: Fix build.
* commit 'c16abda34d':
  Fix build.

Dianne Hackborn   authored and   Android Git Automerger   commited 2015-07-31 19:42:24 +00:00
52728c1c60
Fix build.
Change-Id: Icdf6fa14e53a1c030d0d90205d3bf2d7610b6196

Dianne Hackborn   commited 2015-07-31 10:35:34 -07:00
c16abda34d
am 7a18b377: Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev
* commit '7a18b37749':
  Stop supporting legacy ConnectivityManager routing methods in M.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-07-31 05:24:49 +00:00
42f290a7a3
Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-07-31 05:17:08 +00:00
7a18b37749
am d7208c5c: Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev
* commit 'd7208c5c4a':
  Revise lockdown check in getLegacyVpnInfo()

Hung-ying Tyan   authored and   Android Git Automerger   commited 2015-07-31 02:57:19 +00:00
ce009dd426
Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev
Hung-ying Tyan   authored and   Android (Google) Code Review   commited 2015-07-31 02:51:32 +00:00
d7208c5c4a