Commit graph android_packages_modules_Co.../core/java
Message SHA1
Move factoryReset to service and protect.
bug:16161518
Change-Id: I02d1bbae1887c62ee426e6f03e8bc1f18c6666bf

Stuart Scott   commited 2015-04-20 10:52:35 -07:00
ca888bf2fe
LCE service implementation - connectivity side
Change-Id: If11bd99c44c7dc8d2aa2bc05a10e04421739baa6

fenglu   commited 2015-04-16 02:53:39 -07:00
7656433e44
Merge "am b5e0cfb..557d2f5 from mirror-m-wireless-internal-release"
Vinit Deshpande   authored and   Android (Google) Code Review   commited 2015-04-16 02:36:30 +00:00
3153bb0792
Merge changes from topic 'no_internet'
* changes:
  Add a noInternetAccessExpected boolean to WifiConfiguration.
  Prompt if a network without an Internet connection is selected
  Give SystemUI the OVERRIDE_WIFI_CONFIG permission.
  Add an UNKNOWN_UID constant to WifiConfiguration.

Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-04-15 11:48:22 +00:00
bc319b4349
multinetwork API: native implementation
Bug: 19537384
Change-Id: I04f4a7de2b1e583989b67a853df6ab50289c2185

Erik Kline   commited 2015-04-15 15:32:08 +09:00
0dccb80c09
Prompt if a network without an Internet connection is selected
When a network is explicitlySelected, keep it connected but do
not automatically switch to it. Instead, attempt to validate it,
and if 8 seconds have passed and the network is not yet
validated, prompt the user asking whether to switch to it anyway.

Bug: 20081183
Change-Id: I03a8459eb39979e3dc8e94662b85a44605dd7e69

Lorenzo Colitti   commited 2015-04-15 13:38:22 +09:00
36fbebe442
am b5e0cfb..557d2f5 from mirror-m-wireless-internal-release
557d2f5 Merge "Add ConnectivityManager.reportNetworkConnectivity() API" into m-wireless-dev
ab5267a Fix onLost/onFound logic in isSettingsAndFilterComboAllowed
7aac1b3 Add ConnectivityManager.reportNetworkConnectivity() API
238e0f9 OBEX Over L2CAP + SDP search API for BT profiles
c256943 Add ConnectivityManager.getActiveNetwork(). Rework NetID allocation in ConnectivityService so registerNetworkAgent() can return the allocated NetID.
bf18bed Merge "Non-functional code cleanup of ConnectivityService." into m-wireless-dev
db8784e Merge "Cleanup of Video Call pause functionality." into m-wireless-dev
71299dd Non-functional code cleanup of ConnectivityService.
e593d0a Onfound onlost feature.
0326f58 Merge "API for config app." into m-wireless-dev
e9b056f API for config app.
d5351e7 RTT framework interface update
a3dfc6b Unhide Network.openConnection(URL, Proxy).
a9208b9 Fix typos in ConnectivityManager documentation.

Change-Id: Ib4c88f6d7ad1b24227b032555c62a5804194384b

Vinit Deshpande   commited 2015-04-14 16:15:02 -07:00
3f60a32607
am 73e056d3: am 402f2501: am 3312c6b9: Merge "Add android.net.IpPrefix#contains()"
* commit '73e056d3931b419c2653eb7365fb72b50a9a36c3':
  Add android.net.IpPrefix#contains()

Erik Kline   authored and   Android Git Automerger   commited 2015-04-14 09:58:38 +00:00
5ab348404a
Add android.net.IpPrefix#contains()
This was originally to avoid RuntimeException in RouteInfo#matches():
    When an IPv6 prefix with a length greater than the max permitted
    for IPv4 is matched against an Inet4Address, the call to
    NetworkUtils throws RuntimeException.

Change-Id: I92e2bd19a4e7d656cf682fd27678da07e211850d

Erik Kline   commited 2015-04-14 16:19:11 +09:00
8a100e31b9
Add ConnectivityManager.reportNetworkConnectivity() API
This new API allows reporting networks that are perceived to provide Internet
connectivity and networks that are not.  This allows the framework to avoid
needlessly reevaluating networks where the apps perception matches the
framework's perception.  This was not possible with the prior API,
reportBadNetwork.

Bug: 16214361
Change-Id: Id4409bd7538854bd837231fb50e693c10a62b4f2

Paul Jensen   commited 2015-04-13 18:48:54 +00:00
7aac1b3ef7
Merge commit 'e593d0a' into merge_work
Change-Id: I4f8ae40fc446cd9cda4d5c6ec99469a98dda595b

Prerepa Viswanadham   commited 2015-04-10 15:58:10 -07:00
3711800270
Add ConnectivityManager.getActiveNetwork().
Rework NetID allocation in ConnectivityService so registerNetworkAgent() can
return the allocated NetID.

Bug: 19416463
Change-Id: I68e395552cf27422c80b4dfae5db5d56a0d68f5d

Paul Jensen   commited 2015-04-10 14:03:13 +00:00
c256943936
Non-functional code cleanup of ConnectivityService.
1. Remove ConnectivityService.findConnectionTypeForIface() as this can be done
   just as easily with supported APIs now.
2. Avoid making copies of Network objects as this precludes reuse of Network
   internals (e.g. socket factory, connection pool).

Change-Id: I52f92e35d769d8350471f485e408169608630082

Paul Jensen   commited 2015-04-08 07:46:49 -04:00
71299dd2b7
Unhide Network.openConnection(URL, Proxy).
Spun off from
https://partner-android-review.googlesource.com/#/c/205463/ for
ease of review.

Bug: 19416463
Change-Id: Ia37a53a350d55b5514b949242368dfe396f6b9a0

Lorenzo Colitti   commited 2015-04-07 13:13:20 +09:00
a3dfc6b84b
Fix typos in ConnectivityManager documentation.
Spun off from
https://partner-android-review.googlesource.com/#/c/205463/ for
ease of review.

Bug: 19416463
Change-Id: I2f88ac415177ecd96c9191df5e390830869f52e1

Paul Jensen   authored and   Lorenzo Colitti   commited 2015-04-07 13:13:13 +09:00
a9208b9ad9
Deprecate EXTRA_PROXY_INFO and unhide ConnectivityManager.getDefaultProxy().
1. Unhide ConnectivityManager.getDefaultProxy() and update it to
   take into account process-bound-Networks.
2. Deprecate EXTRA_PROXY_INFO and instead encourage querying via
   getDefaultProxy().

Bug: 17905627
Bug: 17420465
Bug: 18144582

Change-Id: I45358ee82fe705d048022c8238b2452f52c37b88

Paul Jensen   commited 2015-04-03 07:25:55 -04:00
4e73a3caf0
Deprecate static ConnectivityManager.get/setProcessDefaultNetwork() functions.
These functions risk hitting an unchecked Exception due to ConnectivityManager
not being instantiated yet.  Also, change Network.openConnection() to throw a
checked Exception rather than an unchecked Exception when ConnectivityManager
is not yet instantiated.

bug:19416463
Change-Id: Ie1e2b3238aec0343d267c76b64927073f2f05f85

Paul Jensen   commited 2015-04-02 14:03:43 +00:00
895c394f5d
Move reset network settings into framework.
bug: 16161518
Change-Id: Ic3b537ebd09d1b9723feff9dcc96e20fda05a94f

Stuart Scott   commited 2015-03-30 18:02:55 -07:00
d3bb508971
Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into master_merge
Change-Id: I49aab437af220f1139cfd2d0a9c362acce31074e

Prerepa Viswanadham   commited 2015-03-24 13:46:08 -07:00
44ef2337cb
Merge "Make NetworkCapabilities.NOT_VPN javadoc visible." into m-wireless-dev
Paul Jensen   authored and   Android Partner Code Review   commited 2015-03-20 11:27:18 +00:00
95db5df370
Add a protectFromVpn method that takes a FileDescriptor
Bug: 19704592
Change-Id: I9aeb29c2f6cf55fa010bc606c99b21a797ac5a19

Lorenzo Colitti   commited 2015-03-20 16:32:40 +09:00
dd76f2a45d
DHCP: Add a native method for making a DHCP socket.
Bug: 19704592
Change-Id: Iadd60d39c93aaabd2917e76791101a7d313b34be

Lorenzo Colitti   commited 2015-03-20 16:32:35 +09:00
f53d98ba53
Add two utility methods for IPv4 netmasks.
1. Add a validating method to convert a netmask to a prefix length.
2. Add a function to get the implicit netmask of an IPv4 address.
3. Add a unit test.

Bug: 19704592
Change-Id: Icb9f58d3903ea01df9e3720383c9bd5db6dd8f26

Lorenzo Colitti   commited 2015-03-20 16:32:34 +09:00
878a6092f1
Remove dead code, mostly DataStateTracker.
(cherry picked from AOSP commit 4c12c31336)

Change-Id: I18c44cd08dfb51e02a96d0b726e9af1db21e3058

Paul Jensen   commited 2015-03-18 12:29:13 -04:00
6879b9138d
Make NetworkCapabilities.NOT_VPN javadoc visible.
Also adjust wording to be more suitable for NetworkRequests and NetworkAgents.

Change-Id: I1cc93cb20779cf02d6ffa0fa11ad2916c199b365

Paul Jensen   commited 2015-03-18 09:33:07 -04:00
46c53b8099
Add a protectFromVpn method that takes a FileDescriptor
Bug: 19704592
Change-Id: I9aeb29c2f6cf55fa010bc606c99b21a797ac5a19

Lorenzo Colitti   commited 2015-03-17 19:46:12 +09:00
5077751ec3
Merge changes from topic 'dhcpclient' into m-wireless-dev
* changes:
  DHCP: Minor cleanups to the packet code.
  DHCP: Move the packet code to frameworks/base/services.
  DHCP: Add a native method for making a DHCP socket.
  DHCP: Add a superclass for DhcpStateMachine.

Lorenzo Colitti   authored and   Android Partner Code Review   commited 2015-03-16 12:12:42 +00:00
e4c5223b2b
Merge "Add two utility methods for IPv4 netmasks." into m-wireless-dev
Lorenzo Colitti   authored and   Android Partner Code Review   commited 2015-03-16 12:11:37 +00:00
d1914c5cd6
DHCP: Add a native method for making a DHCP socket.
Bug: 19704592
Change-Id: Iadd60d39c93aaabd2917e76791101a7d313b34be

Lorenzo Colitti   commited 2015-03-16 20:08:45 +09:00
0e61c519ab
Add two utility methods for IPv4 netmasks.
1. Add a validating method to convert a netmask to a prefix length.
2. Add a function to get the implicit netmask of an IPv4 address.
3. Add a unit test.

Bug: 19704592
Change-Id: Icb9f58d3903ea01df9e3720383c9bd5db6dd8f26

Lorenzo Colitti   commited 2015-03-16 16:07:36 +09:00
7a864c2df4
am "Refactor NetworkUtils interaction with DHCP."
merged from goog/mirror-m-wireless-internal-release
25d2dba Refactor NetworkUtils interaction with DHCP.

Vinit Deshpande   commited 2015-03-15 13:40:27 -07:00
7e67bc3a2a
Fix javadoc braces for ConnectivityManager.EXTRA_NETWORK.
Change-Id: I5ad30a34f96e9e99a557b5bae9a30bfc08c89620

Paul Jensen   commited 2015-03-13 14:06:12 -04:00
7af7fd3afb
resolved conflicts for merge of b6b9fe21 to master
Change-Id: If4f62aa1fd8bb774288a677e7008e86a7e3ea6d9

Andreas Gampe   commited 2015-03-13 00:04:10 -07:00
b96902e7bc
NetworkStatsService to adjust VPN stats before recording.
* Creates a new Parcelable class VpnInfo to hold required
  parameters for VPN stats adjustments.
* ConnectivityService to collect infomation and provide
  a list of VpnInfo, one for each user.
* NetworkStatsService passes the VpnInfo array to
  NetworkStatsRecorder.
* NetworkStatsRecorder calls NetworkStats.migrateTun()
  to do the math.
* Poll NetworkStats when the vpn application calls
  setUnderlyingNetworks().

Bug: 19536273
Change-Id: I7a4c7726b8243fead10416f7ec6eb5cf95f20183

Wenchao Tong   commited 2015-03-12 17:43:41 -07:00
ae7e9fb00a
Remove dead code, mostly DataStateTracker.
Change-Id: I1433937bffdb29bd42fb1adbfcf0a50ceffac7dd

Paul Jensen   commited 2015-03-11 10:03:58 -04:00
4c12c31336
Refactor NetworkUtils interaction with DHCP.
Separate out starting DHCP (DISCOVER) and RENEW operations from fetching
the results.  Add NetworkUtils.getDhcpResults(), to enable quick checks
of any available DhcpResults without extraneous interaction with the
DHCP daemon.

Bug: 19422416
Change-Id: I58808e529dda8429737e749f5caef56d923c0809

Erik Kline   commited 2015-03-02 12:35:35 +09:00
25d2dba89c
Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17

John Spurlock   commited 2015-02-28 14:47:49 -05:00
ca9ba60d53
Merge "Move apache specific portions of android.net.http to external/apache-http."
Narayan Kamath   authored and   Android (Google) Code Review   commited 2015-02-13 09:51:44 +00:00
6478469ae5
am 861103ca: am 1267462c: am f456d4dc: am 0fb710e4: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit '861103ca17':
  Update Javadoc for EXTRA_NETWORK.

Jeremy Joslin   authored and   Android Git Automerger   commited 2015-02-12 19:40:48 +00:00
a0b0e76b46
am 1267462c: am f456d4dc: am 0fb710e4: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit '1267462c0bf8ef5a0cfaca535847fc962b2cf32e':
  Update Javadoc for EXTRA_NETWORK.

Jeremy Joslin   authored and   Android Git Automerger   commited 2015-02-12 18:56:35 +00:00
861103ca17
Move apache specific portions of android.net.http to external/apache-http.
We continue to compile external/apache-http into ext.jar. This contains
a few changes apart fom the classes moving around :

- Makefile changes to build docs and api-stubs for now. A future change
  will revert these changes and remove these classes from stubs and
  docs.
- Hardcode event IDs in legacyerrorstrings to avoid a dependency between
  the frameworks and apache. These strings are on their way out and will
  never change anyway.
- Remove imports due to {@link} tags and use {@code} instead.
- Remove an accidental(?) dependency on apache commons code that's a
  part of apache-http.

bug: 18027885

Change-Id: I51cd038d846ec7d02c283a4541b10a6a9cf62ecf

Narayan Kamath   commited 2015-02-12 11:15:49 +00:00
439fe7bfb0
Update Javadoc for EXTRA_NETWORK.
Bug: 19352840
Change-Id: Ib668bee0fb2c6f5bcd01a7908ebd20b9ec8a40ef

Jeremy Joslin   commited 2015-02-11 18:28:57 -08:00
fe76e0e853
Merge "Also include the domain when parceling StaticIpConfiguration." automerge: 998c8f7 automerge: 5b392ee
automerge: e142cde

* commit 'e142cde1b3':
  Also include the domain when parceling StaticIpConfiguration.

Lorenzo Colitti   authored and   android-build-merger   commited 2015-01-30 15:59:49 +00:00
548851645c
Merge "Also include the domain when parceling StaticIpConfiguration." automerge: 998c8f7
automerge: 5b392ee

* commit '5b392ee7584688d6929ca40760d0df2a12bd0b16':
  Also include the domain when parceling StaticIpConfiguration.

Lorenzo Colitti   authored and   android-build-merger   commited 2015-01-30 15:56:00 +00:00
e142cde1b3
Also include the domain when parceling StaticIpConfiguration.
StaticIpConfiguration objects are parceled at least as part of the
IpConfiguration objects that are passed to IEthernetManager when an
application sets static IP configuration on Ethernet.

Change-Id: I49991e2f591cc6cf01b503c18eb343b5929efe29

Lorenzo Colitti   commited 2015-01-29 12:20:55 +00:00
67635d5982
Fix DhcpResults.setDomain() and StaticIpConfiguration.toLinkProperties()
setDomain() and toLinkProperties() were not setting the domains.
The setDomain() bug affected Wifi and I believe the toLinkProperties()
bug affected Ethernet and Bluetooth reverse-tethering.

(cherry picked from commit f084aea4d7)

bug:18252947
Change-Id: I6235fcd6b875aee516efbb5f880db1a99380355b

Paul Jensen   authored and   Lorenzo Colitti   commited 2015-01-29 17:12:35 +09:00
fe83f04c44
Support connecting to networks with misconfigured subnet masks.
In K and earlier, we would connect to a network where the gateway
was not covered by the subnet mask of the IP address. This is an
invalid configuration, but it used to work, and other OSes appear
to accept it too, so support it.

Bug: 19067207

(cherry picked from commit d2a878d730)

Change-Id: I80088f291466dbd5a47f360dcc1620acee5cf57e

Lorenzo Colitti   commited 2015-01-28 20:36:37 +09:00
d5824b5d2b
am 50f9d93a: am 220f987b: Merge "Support connecting to networks with misconfigured subnet masks." into lmp-mr1-dev
automerge: 2ee310c

* commit '2ee310c9c1':
  Support connecting to networks with misconfigured subnet masks.

Lorenzo Colitti   authored and   android-build-merger   commited 2015-01-23 13:05:26 +00:00
22d4a6f870
am 50f9d93a: am 220f987b: Merge "Support connecting to networks with misconfigured subnet masks." into lmp-mr1-dev
* commit '50f9d93a1c6f3d9f28966dd61997b4b780f31fb2':
  Support connecting to networks with misconfigured subnet masks.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-01-23 13:01:42 +00:00
2ee310c9c1
Support connecting to networks with misconfigured subnet masks.
In K and earlier, we would connect to a network where the gateway
was not covered by the subnet mask of the IP address. This is an
invalid configuration, but it used to work, and other OSes appear
to accept it too, so support it.

Bug: 19067207
Change-Id: I822e1d754b336691b675438eefa959a3d75fd07b

Lorenzo Colitti   commited 2015-01-23 21:10:34 +09:00
d2a878d730