Commit Graph

2213 Commits

Author SHA1 Message Date
Adam Lesinski
dc044a85f9 am 01ed50f4: am 886e7a63: Merge "Change default cellular activity timeout to 10" into mnc-dev
* commit '01ed50f414e3c2d042939774fe78e1585f915124':
  Change default cellular activity timeout to 10
2015-08-19 01:39:03 +00:00
Adam Lesinski
01ed50f414 am 886e7a63: Merge "Change default cellular activity timeout to 10" into mnc-dev
* commit '886e7a63b122a30c69c663d32e3e5f880a07593e':
  Change default cellular activity timeout to 10
2015-08-19 00:53:35 +00:00
Adam Lesinski
3961c0efb7 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
2015-08-18 11:47:07 -07:00
Billy Lau
0876f4f3f5 am 29ea9fd5: am 746d1e33: Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev
* commit '29ea9fd5c40b366034bca93bd4f7b468c637d13f':
  Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS
2015-08-09 19:40:47 +00:00
Billy Lau
29ea9fd5c4 am 746d1e33: Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev
* commit '746d1e3321fa60992ec48a84e97b588e2a920195':
  Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS
2015-08-07 22:22:24 +00:00
Billy Lau
746d1e3321 Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev 2015-08-07 22:16:03 +00:00
Billy Lau
16c5d9a6a7 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
2015-08-07 19:29:51 +01:00
Paul Jensen
9f1af846ba am 41027a92: resolved conflicts for merge of 32380993 to mnc-dr-dev
* commit '41027a921c413cc02fe2568b098bedfbee6ca42b':
  Fix NOT_RESTRICTED network capability and enforce it.
2015-08-05 11:24:35 +00:00
Paul Jensen
41027a921c resolved conflicts for merge of 32380993 to mnc-dr-dev
Change-Id: I3a8624b2b375e0d174983d7690082e0e6932c4de
2015-08-05 07:07:24 -04:00
Paul Jensen
3238099342 Merge "Fix NOT_RESTRICTED network capability and enforce it." into mnc-dev 2015-08-05 10:03:47 +00:00
Paul Jensen
bc99fc7d96 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
Dianne Hackborn
6a30d2a1da am 52728c1c: am c16abda3: Fix build.
* commit '52728c1c60a964c4c18cfa84909b7c7afd5ced8b':
  Fix build.
2015-07-31 19:53:59 +00:00
Dianne Hackborn
52728c1c60 am c16abda3: Fix build.
* commit 'c16abda34d6b0c4fe5c936b51d9be427d80f0ed5':
  Fix build.
2015-07-31 19:42:24 +00:00
Dianne Hackborn
c16abda34d Fix build.
Change-Id: Icdf6fa14e53a1c030d0d90205d3bf2d7610b6196
2015-07-31 10:35:34 -07:00
Lorenzo Colitti
8130d911ac am 42f290a7: am 7a18b377: Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev
* commit '42f290a7a3afdac6a2f86cc95f6a231e4e52b43a':
  Stop supporting legacy ConnectivityManager routing methods in M.
2015-07-31 05:31:13 +00:00
Lorenzo Colitti
42f290a7a3 am 7a18b377: Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev
* commit '7a18b377495e5d02c600dc7dbe09fb3fc4883277':
  Stop supporting legacy ConnectivityManager routing methods in M.
2015-07-31 05:24:49 +00:00
Lorenzo Colitti
7a18b37749 Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev 2015-07-31 05:17:08 +00:00
Hung-ying Tyan
02e4bae335 am ce009dd4: am d7208c5c: Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev
* commit 'ce009dd42678c83473ccc34a527d2f796391d8b2':
  Revise lockdown check in getLegacyVpnInfo()
2015-07-31 03:04:41 +00:00
Hung-ying Tyan
ce009dd426 am d7208c5c: Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev
* commit 'd7208c5c4a4ec14208b46b35aa6a859315716c48':
  Revise lockdown check in getLegacyVpnInfo()
2015-07-31 02:57:19 +00:00
Hung-ying Tyan
d7208c5c4a Merge "Revise lockdown check in getLegacyVpnInfo()" into mnc-dev 2015-07-31 02:51:32 +00:00
Lorenzo Colitti
9b026faa77 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
Hung-ying Tyan
5b36cd3f37 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
89006358b3 am 225466b3: am 7dffaafc: Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev
* commit '225466b363970d947e1f20ae45281f1d034b5289':
  Fix missing onLost NetworkCallbacks when network loses capability
2015-07-30 02:34:36 +00:00
Paul Jensen
225466b363 am 7dffaafc: Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev
* commit '7dffaafc0dbf59b4a1cb2c48a160bb1e62d6ab12':
  Fix missing onLost NetworkCallbacks when network loses capability
2015-07-30 02:20:49 +00:00
Paul Jensen
7dffaafc0d Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev 2015-07-30 02:10:50 +00:00
Paul Jensen
1461904e69 am d0b0b466: resolved conflicts for merge of 951aabb4 to mnc-dr-dev
* commit 'd0b0b466d09227cd309c8a139069bc9999954175':
  Disable WiFi autojoin when user decides via "Stay connected?" dialog
2015-07-29 19:57:05 +00:00
Robert Greenwalt
f3802d5a27 am 0a19c601: am 86e8b037: Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
* commit '0a19c6015819064df4a14714de062d592ee7457d':
  Un-remove legacy ConnectivityManager API.
2015-07-29 19:49:04 +00:00
Paul Jensen
d0b0b466d0 resolved conflicts for merge of 951aabb4 to mnc-dr-dev
Change-Id: I8b33797528f16596f0d350ad38458baa51fcacf6
2015-07-29 11:31:53 -04:00
Paul Jensen
951aabb4a7 Merge "Disable WiFi autojoin when user decides via "Stay connected?" dialog" into mnc-dev 2015-07-29 13:52:02 +00:00
Lorenzo Colitti
68cab31ce1 resolved conflicts for merge of b5f86615 to mnc-vt-dev
Change-Id: Ic16a7e4b146e6b2af00ae17976f876ace29a60e8
2015-07-29 09:52:48 +09:00
Robert Greenwalt
0a19c60158 am 86e8b037: Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
* commit '86e8b037f409ea27639006208b9acb4b24afc6b5':
  Un-remove legacy ConnectivityManager API.
2015-07-28 19:57:31 +00:00
Robert Greenwalt
86e8b037f4 Merge "Un-remove legacy ConnectivityManager API." into mnc-dev 2015-07-28 19:39:48 +00:00
Robert Greenwalt
b40e37e123 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
8c23d5f652 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
b5f86615b6 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
994ba7343f 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
3853d2fa76 am 2308195d: Pass signal strength thresholds inside a Bundle
* commit '2308195d12c28c3deaa75a6514a8a9f0e8c74eaf':
  Pass signal strength thresholds inside a Bundle
2015-07-21 17:12:27 +00:00
Lorenzo Colitti
7cc12b83c5 resolved conflicts for merge of 87f93fe6 to mnc-vt-dev
Change-Id: I112f476acf812b7ca3052c1544f324b40a04b7fb
2015-07-22 02:00:55 +09:00
Lorenzo Colitti
ab0d88c47f resolved conflicts for merge of d1039d17 to mnc-vt-dev
Change-Id: I148cd278ada966e78d3976d32e33d36846a706d1
2015-07-22 01:38:26 +09:00
Prerepa Viswanadham
852a38e0d8 resolved conflicts for merge of 6d71af1f to mnc-vt-dev
Change-Id: Ib6418b64164c77fb1a8849af18da3c86e42a2730
2015-07-20 15:53:54 -07:00
Erik Kline
2308195d12 Pass signal strength thresholds inside a Bundle
Bug: 21407651
Change-Id: I2c80e89441e2eb15a246cb1fa9347f886cefa80f
2015-07-18 17:28:52 +00:00
Lorenzo Colitti
87f93fe6f4 Support NetworkCallbacks based on signal strength.
Bug: 21405941
Change-Id: I2ed8a5aeb8dac464a4305671ed22abcacb485bc9
2015-07-18 17:28:26 +00:00
Lorenzo Colitti
d1039d1731 ConnectivityManager API for for packet keepalives.
Bug: 21405946
Change-Id: Ie1f8f8bee684fe2bb1092a9f1bc9f5dc29b1defc
2015-07-18 17:00:13 +00:00
Lorenzo Colitti
6d71af1f53 Make immutable NetworkCapabilities more explicit.
Bug: 21405941
Change-Id: Iafd738c31747b0f5f9356bed1c97f5f282830af1
2015-07-18 16:59:47 +00:00
Paul Jensen
4afac2378d Disable WiFi autojoin when user decides via "Stay connected?" dialog
If the user selects "No" in the "Stay connected?" dialog box:
1. Disable autojoining that network in the future, and
2. Disassociate from that network.

Bug:22187193
Change-Id: I14dc9236c57e3ab7d3ec95edc906787cbfbf3c9f
2015-07-16 14:41:18 +00:00
Erik Kline
006a220097 am 68bc390c: am c2ce3ff6: Merge "Log NetworkRequestInfo to get more detailed history" into mnc-dev
* commit '68bc390c0ab592b86b93e153fcc0c0dd51545e44':
  Log NetworkRequestInfo to get more detailed history
2015-07-14 06:17:07 +00:00
Erik Kline
c2ce3ff6dd Merge "Log NetworkRequestInfo to get more detailed history" into mnc-dev 2015-07-14 04:09:29 +00:00
Erik Kline
47401fa30e Log NetworkRequestInfo to get more detailed history
Bug: 21641983
Bug: 22235775
Bug: 22299819
Bug: 22358164
Change-Id: I48a2d162dd499a3590f06d805267a63822856969
2015-07-14 11:46:51 +09:00
Erik Kline
8300b39bd6 Merge "Pass signal strength thresholds inside a Bundle" into mnc-vt-dev 2015-07-14 01:50:52 +00:00
Etan Cohen
778824231a am 686be938: am c09544bb: Merge "Fix filter on CONNECTIVITY_ACTION updates" into mnc-dev
* commit '686be93854cce44d2dd87148ff8063edc89b6d7b':
  Fix filter on CONNECTIVITY_ACTION updates
2015-07-13 23:32:43 +00:00