Commit Graph

3178 Commits

Author SHA1 Message Date
Paul Jensen
23e37057e6 am 4f74dbe1: resolved conflicts for merge of f5b01767 to mnc-dr-dev
* commit '4f74dbe114cd7b2d6f9c113777424e5a4e1a37a3':
  Fix NOT_RESTRICTED network capability and enforce it.
2015-08-05 11:24:35 +00:00
Paul Jensen
4f74dbe114 resolved conflicts for merge of f5b01767 to mnc-dr-dev
Change-Id: I3a8624b2b375e0d174983d7690082e0e6932c4de
2015-08-05 07:07:24 -04:00
Paul Jensen
f5b0176786 Merge "Fix NOT_RESTRICTED network capability and enforce it." into mnc-dev 2015-08-05 10:03:47 +00:00
Paul Jensen
1b2d980e40 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
2015-08-04 07:24:24 -04:00
Abodunrinwa Toki
90c145b2cd Merge "Turn off failing tests in FrameworksCoreTests." 2015-08-01 18:32:11 +00:00
Dianne Hackborn
3317ea3798 am 80d0df7c: am 62f05dfa: am 55a23950: am 34300e4b: am 18c1d830: Fix build.
* commit '80d0df7cd967d877422be706b250d46d33270477':
  Fix build.
2015-08-01 17:53:17 +00:00
Abodunrinwa Toki
47a70d00e7 Turn off failing tests in FrameworksCoreTests.
We want a green state so we can confidence in tests we write
going forward.

Change-Id: I2c8db848897b56d0c64202ad28861eb4a7572e07
2015-07-31 18:13:30 -07:00
Dianne Hackborn
953c40cf61 am 34300e4b: am 18c1d830: Fix build.
* commit '34300e4bd479d3e85692202688826662e7661eb1':
  Fix build.
2015-07-31 19:53:59 +00:00
Dianne Hackborn
34300e4bd4 am 18c1d830: Fix build.
* commit '18c1d8301d8f544ae133198459bbf2698d80a14b':
  Fix build.
2015-07-31 19:42:24 +00:00
Dianne Hackborn
18c1d8301d Fix build.
Change-Id: Icdf6fa14e53a1c030d0d90205d3bf2d7610b6196
2015-07-31 10:35:34 -07:00
Lorenzo Colitti
1a119d520b am 5bbbf8ed: am 3b03916d: am c7a86e90: am 25c1e480: am 4024ad11: Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev
* commit '5bbbf8edfd74389f9b38d3497d6d86afb543b8f2':
  Stop supporting legacy ConnectivityManager routing methods in M.
2015-07-31 05:49:08 +00:00
Lorenzo Colitti
2e0d5f45f5 am 25c1e480: am 4024ad11: Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev
* commit '25c1e480f5fd3f67b4a4d2d9616c8af822db8de5':
  Stop supporting legacy ConnectivityManager routing methods in M.
2015-07-31 05:31:13 +00:00
Lorenzo Colitti
25c1e480f5 am 4024ad11: Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev
* commit '4024ad119816ed4c4ab62e8c6252c9d484e74a5f':
  Stop supporting legacy ConnectivityManager routing methods in M.
2015-07-31 05:24:49 +00:00
Lorenzo Colitti
4024ad1198 Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev 2015-07-31 05:17:08 +00:00
Hung-ying Tyan
2604fa162f am 058fbd0f: am 4581ca53: am 7b2b74e1: am dc7add28: am f049071d: Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev
* commit '058fbd0fef35e62d2baf3e58b7a0c2f24b155dff':
  Revise lockdown check in getLegacyVpnInfo()
2015-07-31 03:23:43 +00:00
Hung-ying Tyan
6a9f6f6738 am dc7add28: am f049071d: Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev
* commit 'dc7add287de5ef1e7c96596924bf73ee2d1c0f5d':
  Revise lockdown check in getLegacyVpnInfo()
2015-07-31 03:04:41 +00:00
Hung-ying Tyan
dc7add287d am f049071d: Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev
* commit 'f049071da45bec441813e29593e2bcd323a97bd0':
  Revise lockdown check in getLegacyVpnInfo()
2015-07-31 02:57:19 +00:00
Hung-ying Tyan
f049071da4 Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev 2015-07-31 02:51:32 +00:00
Lorenzo Colitti
2780e4bc0b Stop supporting legacy ConnectivityManager routing methods in M.
The methods startUsingNetworkFeature, stopUsingNetworkFeature and
requestRouteToHost were @removed in all the M preview builds, but
internal and external developers have noted that this imposes
additional burden for applications that need to work across
multiple platform versions because it causes compile-time errors.

We switched from @removed back to @deprecated to avoid these
problems. In order to effectively deprecate these methods, which
are error-prone and insecure, make them throw
UnsupportedOperationException if the app's target SDK is M or
above.

Because there are still one or two places in system code that use
these APIs, exempt Process.SYSTEM_UID and the OMA-DM client from
the check for now.

Bug: 22728205
Change-Id: I790bd32f3aa8067cbb625962a209bb9232f4b58c
2015-07-31 11:08:27 +09:00
Paul Jensen
841092d2a2 am 917b275d: am 06287d1c: am 9a2314b0: am 6995b9e5: am 13156c7d: Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev
* commit '917b275d6b54b08edb6326512d7e48a02163e730':
  Fix missing onLost NetworkCallbacks when network loses capability
2015-07-30 03:12:21 +00:00
Hung-ying Tyan
dd494fb2f3 Revise lockdown check in getLegacyVpnInfo()
Return null instead of raising exception in lockdown mode.

BUG=22749146

Change-Id: I0e9e3ded0d189e3fa9e872b7af9fe363799c85d6
2015-07-30 10:52:25 +08:00
Paul Jensen
9a846179b7 am 6995b9e5: am 13156c7d: Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev
* commit '6995b9e5866aa03b23baeb957881a0c8c84a1282':
  Fix missing onLost NetworkCallbacks when network loses capability
2015-07-30 02:34:36 +00:00
Paul Jensen
6995b9e586 am 13156c7d: Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev
* commit '13156c7d07e0e1d839b5d54dfe0e983c4f7cb93f':
  Fix missing onLost NetworkCallbacks when network loses capability
2015-07-30 02:20:49 +00:00
Paul Jensen
13156c7d07 Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev 2015-07-30 02:10:50 +00:00
Paul Jensen
72530b5d9d am bbfacbbc: resolved conflicts for merge of 2813d5ba to mnc-dr-dev
* commit 'bbfacbbc960d57d0471b5e9a9943af2edf1475d6':
  Disable WiFi autojoin when user decides via "Stay connected?" dialog
2015-07-29 19:57:05 +00:00
Robert Greenwalt
59dbc9a7ad am 91892f55: am f5a934b6: Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
* commit '91892f55247d71452c9c9de74878de771484d8e9':
  Un-remove legacy ConnectivityManager API.
2015-07-29 19:49:04 +00:00
Paul Jensen
4cca5cbc29 am 06eabfcc: am 4c55639a: am 8c83be09: am bbfacbbc: resolved conflicts for merge of 2813d5ba to mnc-dr-dev
* commit '06eabfcc2d82833ec89bf92d087210bab18d78bb':
  Disable WiFi autojoin when user decides via "Stay connected?" dialog
2015-07-29 17:31:12 +00:00
Paul Jensen
bbfacbbc96 resolved conflicts for merge of 2813d5ba to mnc-dr-dev
Change-Id: I8b33797528f16596f0d350ad38458baa51fcacf6
2015-07-29 11:31:53 -04:00
Paul Jensen
2813d5ba39 Merge "Disable WiFi autojoin when user decides via "Stay connected?" dialog" into mnc-dev 2015-07-29 13:52:02 +00:00
Lorenzo Colitti
9a9ab05153 resolved conflicts for merge of 2d2a8d16 to mnc-vt-dev
Change-Id: Ic16a7e4b146e6b2af00ae17976f876ace29a60e8
2015-07-29 09:52:48 +09:00
Robert Greenwalt
5f301c3345 am 691b8104: am f99b6f28: am 872d264c: am 91892f55: am f5a934b6: Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
* commit '691b81042f0d443dc16d82426c043d4a3f76378a':
  Un-remove legacy ConnectivityManager API.
2015-07-28 21:26:33 +00:00
Robert Greenwalt
91892f5524 am f5a934b6: Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
* commit 'f5a934b60c6ade4f034e3b5222adc1a1be66a9a4':
  Un-remove legacy ConnectivityManager API.
2015-07-28 19:57:31 +00:00
Robert Greenwalt
f5a934b60c Merge "Un-remove legacy ConnectivityManager API." into mnc-dev 2015-07-28 19:39:48 +00:00
Lorenzo Colitti
950c6c88ab am 2ae3a05b: am b0014e9f: am 08ef66bb: am 2d2a8d16: am e288b3af: Merge changes I5c994de5,I6cb0dd84 into mnc-dev
* commit '2ae3a05b424f7ef7c3a28507e2c19fde7f1e5963':
  Add a test for public bugs 2111 and 2136.
  Always check off-link connectivity in NetworkDiagnostics.
2015-07-28 18:48:06 +00:00
Robert Greenwalt
8c160a7614 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
Paul Jensen
6eb94e6f5f Fix missing onLost NetworkCallbacks when network loses capability
If a network no longer satisfies a NetworkRequest, send the onLost
NetworkCallback.  If it was a real request (not listen) then update
the NetworkFactories.

To test this change I created a little infrastructure to fake
different Internet connectivity probe results during tests.  This
allowed me to rewrite some of ConnectivityServiceTest's logic for
validating networks.  This brought to light a couple issues that
I had to address to keep tests passing:
1. testUnlingeringDoesNotValidate was relying on a bad side-effect
   of my old method of ConnectivityServiceTest's logic for
   validating networks, so I rewrote the test.
2. ConnectivityService was not sending out NetworkCallbacks for
   WiFi when Cellular was validated.  I'm including a fix for this
   in this CL also.

Bug:22220234
Change-Id: I29314f38189817f8b2561a213c4f9e8522696663
2015-07-28 12:19:32 -04:00
Lorenzo Colitti
2d2a8d167e 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
05a505c943 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
797bf533c5 am 8d59d1c7: Pass signal strength thresholds inside a Bundle
* commit '8d59d1c718126ca893cfbe9a64e0e25770049ef0':
  Pass signal strength thresholds inside a Bundle
2015-07-21 17:12:27 +00:00
Lorenzo Colitti
260e4f7347 resolved conflicts for merge of 5d2656c1 to mnc-vt-dev
Change-Id: I112f476acf812b7ca3052c1544f324b40a04b7fb
2015-07-22 02:00:55 +09:00
Lorenzo Colitti
341df4fa1a resolved conflicts for merge of 0b798a83 to mnc-vt-dev
Change-Id: I148cd278ada966e78d3976d32e33d36846a706d1
2015-07-22 01:38:26 +09:00
Prerepa Viswanadham
511450f6e6 resolved conflicts for merge of 6b56e9e1 to mnc-vt-dev
Change-Id: Ib6418b64164c77fb1a8849af18da3c86e42a2730
2015-07-20 15:53:54 -07:00
Erik Kline
58e1ae7855 am 56066f60: am f35e9344: am ec69003d: am 8d59d1c7: Pass signal strength thresholds inside a Bundle
* commit '56066f6036afca62cf48b5971131503dba6ae7c1':
  Pass signal strength thresholds inside a Bundle
2015-07-18 18:21:25 +00:00
Lorenzo Colitti
b5b3f6578e am a1694609: am 1c6b02af: am da355c80: am 5d2656c1: Support NetworkCallbacks based on signal strength.
* commit 'a1694609508b87c9c844ce07fb7a409b59c6b693':
  Support NetworkCallbacks based on signal strength.
2015-07-18 18:21:18 +00:00
Lorenzo Colitti
72458ff026 am 15cda089: am 6163290e: am e647d93d: am 0b798a83: ConnectivityManager API for for packet keepalives.
* commit '15cda089b6209ba8d68beea81271b44612bbfb95':
  ConnectivityManager API for for packet keepalives.
2015-07-18 18:05:13 +00:00
Lorenzo Colitti
e2a3e5fa2d am 2d2a5992: am 47a47d3b: am 00365fc6: am 6b56e9e1: Make immutable NetworkCapabilities more explicit.
* commit '2d2a59924d758660c40358477c54a85b03b70b75':
  Make immutable NetworkCapabilities more explicit.
2015-07-18 18:05:07 +00:00
Erik Kline
8d59d1c718 Pass signal strength thresholds inside a Bundle
Bug: 21407651
Change-Id: I2c80e89441e2eb15a246cb1fa9347f886cefa80f
2015-07-18 17:28:52 +00:00
Lorenzo Colitti
5d2656c181 Support NetworkCallbacks based on signal strength.
Bug: 21405941
Change-Id: I2ed8a5aeb8dac464a4305671ed22abcacb485bc9
2015-07-18 17:28:26 +00:00
Lorenzo Colitti
0b798a8331 ConnectivityManager API for for packet keepalives.
Bug: 21405946
Change-Id: Ie1f8f8bee684fe2bb1092a9f1bc9f5dc29b1defc
2015-07-18 17:00:13 +00:00
Lorenzo Colitti
6b56e9e1c0 Make immutable NetworkCapabilities more explicit.
Bug: 21405941
Change-Id: Iafd738c31747b0f5f9356bed1c97f5f282830af1
2015-07-18 16:59:47 +00:00