Commit graph android_packages_modules_Co.../core
Message SHA1
resolved conflicts for a884d81e to stage-aosp-master
Change-Id: Ice485967fa96f13786024b6939b826638e906ff0

Elliott Hughes   commited 2015-09-24 10:01:32 -07:00
830ed7c82f
Hotspot 2.0 relase 2 first cut.
CP mods to take a URL as a parameter, and new ScanInfo object.

Change-Id: Idbb2d4751c575ba07a56942771e2b2955b624635

Jan Nordqvist   commited 2015-09-22 17:24:22 -07:00
032e267212
constify JNINativeMethod function pointer tables
Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954

Daniel Micay   commited 2015-09-22 17:10:35 -04:00
b4dd27d4cf
am fd183706: am 22262f31: am 0bc35668: am 017223ac: Merge changes from topic \'packet-keepalive-fixes\' into mnc-dr-dev
* commit 'fd18370675f8794807747a18276dd7385e25f06e':
  Require the new PACKET_KEEPALIVE_OFFLOAD permission.
  Add an error code for generic hardware error.
  Fix bugs and crashes in PacketKeepalive API.
  Add tests for the PacketKeepalive API.
  Add a PACKET_KEEPALIVE_OFFLOAD permission.
  Use a CountDownLatch instead of sleep() in NetworkFactory tests.
  Get rid of shortSleep() in ConnectivityServiceTest.
  Make ConnectivityServiceTest a bit more readable.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-09-09 01:04:38 +00:00
449a404216
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
723f82f17f
am a59ee3ac: am 597c55b5: am e686d9b3: am 8e285f2f: Merge "Cut down some logs." into mnc-dr-dev
* commit 'a59ee3ac094d9d2a1c38852bc824d20f8166e28a':
  Cut down some logs.

Robert Greenwalt   authored and   Android Git Automerger   commited 2015-09-06 23:08:25 +00:00
72c6951953
Cut down some logs.
bug:23623327
Change-Id: I737d4e6c384bf4da62c65ad2abe0c9b5dca0067a

Robert Greenwalt   commited 2015-09-03 17:53:42 -07:00
72877c2493
am 429b020e: am 280b4495: am 967c8816: am cfd45ae4: Merge "Add SUPL-specific network bcast" into mnc-dr-dev
* commit '429b020e615eebd244208373c2a3e81c59da36ec':
  Add SUPL-specific network bcast

Daniel Estrada Alva   authored and   Android Git Automerger   commited 2015-09-03 06:40:03 +00:00
43b0bcbe25
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
6803efe7ee
am 8096be27: am fbb28f55: am 77d02900: am 325c15df: am e3bcde94: Merge "Reduce CONNECTIVITY_CHANGE bcasts" into mnc-dev
* commit '8096be27323b26ae177255381366823c8448e3c5':
  Reduce CONNECTIVITY_CHANGE bcasts

Robert Greenwalt   authored and   Android Git Automerger   commited 2015-08-28 22:16:02 +00:00
21fc1a295e
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
325c15dfe3
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
1bb9827d76
am a5bfd73a: am ab5e962e: am d7121f56: am 3e4966ed: am 11e84bde: Merge "Don\'t mark NetworkRequests restricted when they don\'t have restricted caps" into mnc-dev
* commit 'a5bfd73ab683d3310ee3ce31d7ad3edb656aa858':
  Don't mark NetworkRequests restricted when they don't have restricted caps

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-08-19 21:23:03 +00:00
749bfc1606
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
3e4966ed21
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
5d87922526
am 4a10b66d: am 99271a39: am 9751afcf: am a0984c71: am 0ed58c3f: Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev
* commit '4a10b66df364092cdc42a3cfaa990c877b389624':
  Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS

Billy Lau   authored and   Android Git Automerger   commited 2015-08-08 02:49:54 +00:00
85b90229bd
am 0ed58c3f: Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev
* commit '0ed58c3f00':
  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
a0984c71a1
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
0ed58c3f00
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
ce3f9dc328
am abd27102: am 41779e46: am 95297732: am 4f74dbe1: resolved conflicts for merge of f5b01767 to mnc-dr-dev
* commit 'abd27102f4e232be448bc6012e0bd833637ab3fa':
  Fix NOT_RESTRICTED network capability and enforce it.

Paul Jensen   authored and   Android Git Automerger   commited 2015-08-05 11:44:46 +00:00
8d8db52e89
resolved conflicts for merge of f5b01767 to mnc-dr-dev
Change-Id: I3a8624b2b375e0d174983d7690082e0e6932c4de

Paul Jensen   commited 2015-08-05 07:07:24 -04:00
4f74dbe114
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
f5b0176786
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
1b2d980e40
Merge "Turn off failing tests in FrameworksCoreTests."
Abodunrinwa Toki   authored and   Android (Google) Code Review   commited 2015-08-01 18:32:11 +00:00
90c145b2cd
Turn off failing tests in FrameworksCoreTests.
We want a green state so we can confidence in tests we write
going forward.

Change-Id: I2c8db848897b56d0c64202ad28861eb4a7572e07

Abodunrinwa Toki   commited 2015-07-31 18:13:30 -07:00
47a70d00e7
am 18c1d830: Fix build.
* commit '18c1d8301d':
  Fix build.

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

Dianne Hackborn   commited 2015-07-31 10:35:34 -07:00
18c1d8301d
am 4024ad11: Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev
* commit '4024ad1198':
  Stop supporting legacy ConnectivityManager routing methods in M.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-07-31 05:24:49 +00:00
25c1e480f5
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

Lorenzo Colitti   commited 2015-07-31 11:08:27 +09:00
2780e4bc0b
am 13156c7d: Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev
* commit '13156c7d07':
  Fix missing onLost NetworkCallbacks when network loses capability

Paul Jensen   authored and   Android Git Automerger   commited 2015-07-30 02:20:49 +00:00
6995b9e586
Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2015-07-30 02:10:50 +00:00
13156c7d07
resolved conflicts for merge of 2813d5ba to mnc-dr-dev
Change-Id: I8b33797528f16596f0d350ad38458baa51fcacf6

Paul Jensen   commited 2015-07-29 11:31:53 -04:00
bbfacbbc96
Merge "Disable WiFi autojoin when user decides via "Stay connected?" dialog" into mnc-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2015-07-29 13:52:02 +00:00
2813d5ba39
am f5a934b6: Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
* commit 'f5a934b60c':
  Un-remove legacy ConnectivityManager API.

Robert Greenwalt   authored and   Android Git Automerger   commited 2015-07-28 19:57:31 +00:00
91892f5524
Merge "Un-remove legacy ConnectivityManager API." into mnc-dev
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2015-07-28 19:39:48 +00:00
f5a934b60c
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

Robert Greenwalt   commited 2015-07-28 11:41:31 -07:00
8c160a7614
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

Paul Jensen   commited 2015-07-28 12:19:32 -04:00
6eb94e6f5f
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.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-07-28 01:20:16 +00:00
2d2a8d167e
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

Lorenzo Colitti   commited 2015-07-27 16:41:44 +09:00
05a505c943
Pass signal strength thresholds inside a Bundle
Bug: 21407651
Change-Id: I2c80e89441e2eb15a246cb1fa9347f886cefa80f

Erik Kline   authored and   Prerepa Viswanadham   commited 2015-07-18 17:28:52 +00:00
8d59d1c718
Support NetworkCallbacks based on signal strength.
Bug: 21405941
Change-Id: I2ed8a5aeb8dac464a4305671ed22abcacb485bc9

Lorenzo Colitti   authored and   Prerepa Viswanadham   commited 2015-07-18 17:28:26 +00:00
5d2656c181
ConnectivityManager API for for packet keepalives.
Bug: 21405946
Change-Id: Ie1f8f8bee684fe2bb1092a9f1bc9f5dc29b1defc

Lorenzo Colitti   authored and   Prerepa Viswanadham   commited 2015-07-18 17:00:13 +00:00
0b798a8331
Make immutable NetworkCapabilities more explicit.
Bug: 21405941
Change-Id: Iafd738c31747b0f5f9356bed1c97f5f282830af1

Lorenzo Colitti   authored and   Prerepa Viswanadham   commited 2015-07-18 16:59:47 +00:00
6b56e9e1c0
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

Paul Jensen   commited 2015-07-16 14:41:18 +00:00
57e65708a8
Merge "Legacy VPN calls to require a userID" into mnc-dev
Robin Lee   authored and   Android (Google) Code Review   commited 2015-07-10 19:05:38 +00:00
718df19ed0
Merge "Enable EMERGENCY mobile connections." into mnc-dev
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2015-07-10 18:23:24 +00:00
4ab39690aa
Merge "Add android.net.CaptivePortal class for captive-portal-handling-app callbacks" into mnc-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2015-07-10 14:57:13 +00:00
f2479b9d50
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

Robert Greenwalt   commited 2015-07-09 14:49:35 -07:00
b1f7f75874
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

Paul Jensen   commited 2015-07-09 10:47:34 -04:00
75e0adb220
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

Robert Greenwalt   commited 2015-07-08 20:42:55 -07:00
7fb8adcd51