Commit graph android_packages_modules_Co.../core/java
Message SHA1
Include elapsed realtime (nanos) of the event in the radio state change notifications.
Bug: 13247811
Change-Id: I3454aa159a68b9087b4762df947b41965b5a3941

Ashish Sharma   commited 2014-03-18 21:42:02 +00:00
29f7e0e8ca
Merge "Return detailed reason of invalid proxy settings"
Yuhao Zheng   authored and   Android (Google) Code Review   commited 2014-03-04 17:43:47 +00:00
dcac3aaf9f
Return detailed reason of invalid proxy settings
Make Proxy.validate() return valid/invalid int code, instead of throwing
exceptions. If invalid, detailed reason code is returned (currently for
Settings UI use).

bug: 13248097
Change-Id: Ic68d03f666f1cd63667afc311de7dc370d233901

Yuhao Zheng   commited 2014-03-03 11:23:07 -08:00
6b593934d3
Hold a wake lock while dispatching network activity events.
Also add new API for determining whether the current data network
is active, and thus better scheduling network operations.  This
API is designed to not be tied to a mobile network -- regardless
of the network, apps can use it to determine whether they should
initiate activity or wait.  On non-mobile networks, it simply always
reports as the network being active.

This changed involved reworking how the idle timers are done so
that we only register an idle timer with the current default
network.  This way, we can know whether we currently expect to
get callbacks about the network being active, or should just always
report that it is active.  (Ultimately we need to be getting this
radio active data from the radio itself.)

Change-Id: Iaf6cc91a960d7542a70b72f87a7db26d12c4ea8e

Dianne Hackborn   commited 2014-02-28 15:19:39 -08:00
5ac8816d55
Add the calling package name to requestRouteToHost
The calling package name will be used to check if an application is a
system application when deciding if a route should be exempt from VPN
routing rules.

Bug: 12937545
Change-Id: I2c09c875fe9bb9685871a0a801ddcbb32fc17405

Chad Brubaker   commited 2014-02-19 11:04:49 -08:00
71e8953171
Add new RIL commands to read/write NV items and reset NV config.
Add new RIL commands and generic code cleanups.

The only changes required for OMA DM support are the
addition of five new methods in ITelephony.aidl for
reading/writing NV items and performing NV config and
radio resets (requires MODIFY_PHONE_STATE), along with
the new RIL request IDs in RILConstants.java.

Bug: 12864208
Change-Id: I958d2571580d98a49936ef2e6822e5ac086acbe2

Jake Hamby   commited 2014-02-03 15:52:18 -08:00
4deacc2420
am 3cab7fc1: Merge "Add proxy as another network." into klp-modular-dev
* commit '3cab7fc1b8f06166df3a58cf10d4a0db36bde788':
  Add proxy as another network.

Hui Lu   authored and   Android Git Automerger   commited 2014-01-31 08:11:57 +00:00
451691e2d2
Add proxy as another network.
Change-Id: I70cb6ac5604c4f0d6a752a291c40de2445ae98bb

Hui Lu   commited 2014-01-30 17:26:18 -05:00
865b70dfcf
am 263c4788: am 4d60936e: am 24a32d08: Merge "Add address flags and scope to LinkAddress."
* commit '263c4788dcf45f104f8668fd6621d1a7c39689b9':
  Add address flags and scope to LinkAddress.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2013-12-09 18:34:44 +00:00
86c4687a66
Merge "Add address flags and scope to LinkAddress."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2013-12-07 02:43:04 +00:00
24a32d083f
Add address flags and scope to LinkAddress.
This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.

1. Add flags and scope to the class and update the unit test.
   Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
   Since most callers don't know about flags and scope, provide
   constructors that default the flags to zero and determine the
   scope from the address. Addresses notified by the kernel will
   have these properly set. Make multicast addresses invalid.
   Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
   address and prefix information between two LinkAddress
   objects. This is necessary because an interface can't have
   two addresses with the same address/prefix but different
   flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
   to identify existing addresses to add/remove using
   isSameAddressAs instead of implicit equals(). Specifically:
   - If addLinkAddress is called with an address that is already
     present, the existing address's flags and scope are updated.
     This allows, for example, an address on an interface to go
     from preferred to deprecated when it expires, without it
     having to be removed and re-added.
   - If removeLinkAddress is called with an address that is
     present but with different flags, it deletes that address
     instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
   notification methods to take just a LinkAddress instead of
   LinkAddress, flags, and scope. While I'm at it, change the
   order of the arguments for consistency with the other
   functions in the interface.

Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e

Lorenzo Colitti   commited 2013-12-06 13:54:35 +09:00
61b6582970
Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7

The Android Open Source Project   commited 2013-12-05 13:10:46 -08:00
943ac81ddf
am 13d9dfb4: am 7dcabe75: am 5a7c768e: Merge "Minor changes to LinkAddress."
* commit '13d9dfb495db1431623c712b36cac1fe2f3c2fc0':
  Minor changes to LinkAddress.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2013-12-04 01:35:11 +00:00
839363d0ad
am 5a7c768e: Merge "Minor changes to LinkAddress."
* commit '5a7c768e79':
  Minor changes to LinkAddress.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2013-12-03 17:26:06 -08:00
7dcabe75aa
Minor changes to LinkAddress.
1. Simplify the parceling code. Since the InetAddress inside a
   LinkAddress can never be null, we don't need to special-case
   the case where it is.
2. Add / update method documentation.
3. Write a unit test.

Change-Id: Iba0a8cecc683d55d736419965e72ee33dd66dc22

Lorenzo Colitti   commited 2013-12-03 19:46:36 +09:00
ee3f442711
Merge commit 'b873a17ce7be0a9771c24999adca6964431728f6' into HEAD
Change-Id: I938755073e70602cc8f51ce9bd420fdcf870cecd

The Android Open Source Project   commited 2013-11-22 11:18:57 -08:00
6e35df34c9
Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906

John Spurlock   commited 2013-11-20 11:31:47 -05:00
c1455d3014
am 61efbf7f: am 4c514f2a: am 594eeb08: Merge "Fix for the invalid Global Proxy Setting" into klp-dev
* commit '61efbf7f38':
  Fix for the invalid Global Proxy Setting

Robert Greenwalt   authored and   Android Git Automerger   commited 2013-11-13 18:47:57 -08:00
3cfa4fad96
am a3c50d75: Merge "Fix for the invalid Global Proxy Setting"
* commit 'a3c50d75ac':
  Fix for the invalid Global Proxy Setting

Robert Greenwalt   authored and   Android Git Automerger   commited 2013-11-13 16:27:56 -08:00
94a718f80b
Fix for the invalid Global Proxy Setting
Adding validation for Global Proxy setting before it is
being set.

Proxy is validated at the boot time also to make sure
the value set is valid.

Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
bug:11598568

Change-Id: Idff5ae81119d8143da096b5291ecbfbc5875cbd4

Raj Mamadgi   authored and   Robert Greenwalt   commited 2013-11-14 00:08:21 +00:00
f3df16221a
Fix for the invalid Global Proxy Setting
b/11598568

Adding validation for Global Proxy setting before it is
being set.

Proxy is validated at the boot time also to make sure
the value set is valid.

Change-Id: Ib93d24a80af1a329694f07c47bd81dfcc1e1b874
Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>

Raj Mamadgi   authored and   Ankit Somani   commited 2013-11-12 21:14:02 -05:00
97eba6ba41
Remove captive portal code that has no effect.
Note that this CL does not change any behaviour.

At the center of this change is
CaptivePortalTracker#detectCaptivePortal(), which does nothing
except call back into ConnectivityService. Removing it allows us to
simplify code in ConnectivityService. It also allows us to remove
ConnectivityService#captivePortalCheckComplete which was only ever
called in response to this method.

While this does not change any behaviour, it preserves existing
bad behaviour, i.e, that the CAPTIVE_PORTAL_CHECK NetworkInfo
state does not correspond to actual captive portal detection.
We transition into that state and immediately (and unconditionally)
out of it and into CONNECTED.

Change-Id: Ib3797f956d2db5e3cacaaa53e899d81aa8e958af

Narayan Kamath   commited 2013-10-16 08:10:55 +00:00
ab03543323
Fix minor thread corectness issue in NetworkInfo
Hold the right lock while copying info from another
NetworkInfo object to prevent changes being made to it
while the copy is in progress.

Change-Id: I1aa2c29e81e045b0359f957352c438e79e692823

Narayan Kamath   commited 2013-10-14 09:07:40 +00:00
b82bc07c9d
getProxy in ConnectivityService returns port w/PAC
Changes the PacManager to report message back to ConnectivityService
to send a broadcast once the download has completed.  This allows the
ConnectivityService to store the correct proxy info for getProxy().

This made the problem arise that ProxyProperties was not handling port
while it had PAC.  Added small fix for equals() and parcelization.

The combination of these fixes seems to resolve Bug: 11028616.

Bug: 11168706
Change-Id: I92d1343a8e804391ab77596b8167a2ef8d76b378

Jason Monk   commited 2013-10-10 17:01:45 -04:00
a69f1b06de
Un-deprecate getDhcpInfo
Replacement api isn't available.

bug:10003785
Change-Id: Ibe981ae90e1c6c2f1b65fa225443ae4cc92c2a3a

Robert Greenwalt   commited 2013-10-04 09:53:39 -07:00
5b1ce8a835
Merge "Guarantee that PAC Local Proxy owns Port" into klp-dev
Jason Monk   authored and   Android (Google) Code Review   commited 2013-09-13 20:31:54 +00:00
fddacc6045
Guarantee that PAC Local Proxy owns Port
This changes the PAC support to not broadcast the Proxy information until
the Local Proxy has started up and successfully bound to a port so that
the local proxy information can be guaranteed to be owned by the proxy.

Bug: 10459877
Change-Id: I175cd3388c758c55e341115e4a8241884b90d633

Jason Monk   commited 2013-09-13 09:53:26 -04:00
0a9cc50662
Merge changes Ib1274847,I2eb2a1bf into klp-dev
* changes:
  Fix SDK build.
  Request all tethering interfaces, fix corruption.

Jeff Sharkey   authored and   Android (Google) Code Review   commited 2013-09-11 20:16:59 +00:00
6cb013235d
Request all tethering interfaces, fix corruption.
netd now tracks statistics for tethered interfaces across tethering
sessions, so switch to asking for all tethering stats.  (Currently
we're double-counting all tethering data, ever since it started
tracking across sessions.)

Also catch OOME to handle corrupt stats files, which we then dump to
DropBox and then start over.

Bug: 5868832, 9796109
Change-Id: I2eb2a1bf01b993dd198597d770fe0e022466c6b9

Jeff Sharkey   commited 2013-09-10 21:03:30 -07:00
168cd72f76
Add a hidden API to toggle airplane mode.
Added a hidden API under ConnectivityManager to toggle airplane mode.
This may be a temp solution for b/10653570.
bug:10653570

Change-Id: I0b2b42230073289eb8dc6891317d62b84e26c133

Yuhao Zheng   commited 2013-09-10 09:57:12 -07:00
b77f15d90b
Fix docs build.
Change-Id: I6fd0d711b2cc7726fdaa9119ee467ed6fab82de1

Ying Wang   commited 2013-09-06 22:53:16 -07:00
cb5620b2c4
Setting MTU size for specific network.
Able to config network specific MTU size. Normally, the default size of MTU is 1500.
 US - ATT 1410, TMUS 1440, SPRINT 1422
 KR - SKT 1440, KT 1450, LGU+ 1428
 JP - KDDI 1420, SoftBank 1340
 CA - RGS 1430, FIDO 1430, MTS 1430, BELL 1358, SaskTel 1358
 AU - TEL 1400

Bug: 10195070
Change-Id: Ie18650b37a3d44af944f2dae4aa97c04fb12cd5e

sy.yun   authored and   Robert Greenwalt   commited 2013-09-06 15:26:19 -07:00
4aa73924fd
am 55c4f2aa: am 50f86448: am 59a9884b: Merge "Do not change NetworkInfo.DetailedState." into jb-mr2-dev
* commit '55c4f2aa7a':
  Do not change NetworkInfo.DetailedState.

Wink Saville   authored and   Android Git Automerger   commited 2013-09-06 09:19:40 -07:00
1256d3e505
am 50f86448: am 59a9884b: Merge "Do not change NetworkInfo.DetailedState." into jb-mr2-dev
* commit '50f864480d6e9cf9e4d83b4533e3764753b4d408':
  Do not change NetworkInfo.DetailedState.

Wink Saville   authored and   Android Git Automerger   commited 2013-09-06 09:17:19 -07:00
55c4f2aa7a
Merge "Add a function to replace all the link addresses." into klp-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2013-09-05 23:03:24 +00:00
a5642e48b0
Do not change NetworkInfo.DetailedState.
I'd changed DetailedState to force ConnectivityService to treat
provisioning apn's specially. In particular so that they wouldn't
be identified they were fully connected until the provisioning
actually started. The problem is that DetailedState is a public enum
that has a CTS test and just changing the CTS to allow for the new
state (CONNECTED_TO_PROVISIONING_NETWORK) was inappropriate.

Instead I've added a new mIsConnectedToProvisioningNetwork variable
and used the DetailedState.SUSPENDED as the intermediate state.

Bug: 10620248
Change-Id: Id4a842398cad67455541ce629959351c27d83639

Wink Saville   commited 2013-09-05 12:02:25 -07:00
b1a3202e79
Merge "Rename LinkInfo to LinkQualityInfo" into klp-dev
Vinit Deshapnde   authored and   Android (Google) Code Review   commited 2013-09-05 17:50:19 +00:00
77dc937242
Add a function to replace all the link addresses.
Bug: 10232006
Change-Id: I689ce4735999dac2ab5e1fae09d80b1f734292a1

Lorenzo Colitti   commited 2013-09-05 13:02:54 +09:00
174782b0fc
Rename LinkInfo to LinkQualityInfo
This change renames the LinkInfo objects to LinkQuailtyInfo. The API is
still hidden; but it can be accessed via reflection.

Bug: 10342372

Change-Id: Ieccea87c467ceae5d7f76298b137573f67396cd6

Vinit Deshapnde   commited 2013-09-04 14:11:24 -07:00
00d4b8a987
Merge commit 'a37f06d7' into manualmerge
* commit 'a37f06d7':
  Add support for handling mobile provisioning networks.

Conflicts:
	core/java/android/net/CaptivePortalTracker.java
	core/java/android/net/ConnectivityManager.java
	core/java/android/net/IConnectivityManager.aidl
	core/java/android/net/MobileDataStateTracker.java
	core/res/AndroidManifest.xml
	services/java/com/android/server/ConnectivityService.java

Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5

Wink Saville   commited 2013-08-29 14:57:08 -07:00
cb117d31cb
am 8cb2f42e: am 9a1a7ef5: Add support for handling mobile provisioning networks.
* commit '8cb2f42eea2ef3b249528aa7913fc7a6dfc6b741':
  Add support for handling mobile provisioning networks.

Wink Saville   authored and   Android Git Automerger   commited 2013-08-29 10:26:06 -07:00
a37f06d7d5
Add support for handling mobile provisioning networks.
When a sim is new or it has expired it needs to be provisioned
with the carrier. Basically provisioning is associating a sim with
a user account. When a sim isn't provisioned then operators will
restrict access to the network and only allow certain addresses
or services to be used.

This set of changes allows two types of provisioning networks to be
recognized. The first is a network that causes all DNS lookups to be
redirected to a different address than was intended. This is exemplified
by how T-Mobile works.

The second technique uses a special apn for provisioning. An example is
AT&T where lwaactivate is the provisioning apn and broadband is the
normal apn. We first try broadband and if we are unable to connect we
try lwaactivate. When we see the activate we identify it as special and
the ApnContext.isProvisioningApn will return true.

In the future our plan is to create a new network type that can be added
to the apn list, but for now it identified by name.

Here is a list of significant changes:

 - CaptivePortalTracker now only test WiFi networks instead of all networks
 - checkMobileProvisioning checks for provisioning networks and doesn't
   try to ping.
 - IConnectivityManager.aidl changes:
   * getProvisioningOrActiveNetworkInfo was added to and used by Manage
     mobile plan in WirelessSettings so even when there is no active
     network it will still allow provisioning. Otherwise it would report
     no internet connection.
   * setSignInErrorNotificationVisible is used by both
     CaptiviePortalTracker and checkMobileProvisioning so they use the
     same code for the notifications.
   * checkMobileProvisioning was simplified to have only a timeout as
     returning the result is now harder as we abort simultaneous call
     otherwise we'd could get into loops because we now check every time
     we connect to mobile.
 - Enhanced MDST to handle the provisioning network.
 - Added CONNECTED_TO_PROVISIONING_NETWORK to NetworkInfo to make a new
   state so we don't announce to the world we're connected.
 - TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN
   is sent by the low level data connection code to notify Connectivity
   Service that a provisioning apn has connected. This allows CS to
   handle the connection differently than a normal connection.

Bug: 10328264
Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5

Wink Saville   commited 2013-08-29 08:55:16 -07:00
9a1a7ef57c
Merge "Introduce network link quality statistics" into klp-dev
Vinit Deshapnde   authored and   Android (Google) Code Review   commited 2013-08-22 16:16:45 +00:00
5b8b6751f3
Introduce network link quality statistics
This change starts tracking traffic quality data for WiFi and mobile
networks. The quality is tracked based on incidental traffic, and not
on specific measurements. Theoretical bandwidths are hard-coded, as
well as sampling interval; although sampling interval can be changed
by setting a system policy.

Bugs filed to remove shortcomings of this change -

10342372 Change LinkInfo name to something better
10342318 Move hardcoded values of MobileLinkInfo to resources
         so they can be updated without changing code

Bug: 10006249

Change-Id: I83d8c7594da20fe53abbd5e1f909b1f606b035bb

Vinit Deshapnde   commited 2013-08-21 13:09:01 -07:00
30ad254a1e
Modify LinkProperties address update methods.
1. Make addLinkAddress a no-op if the address already exists.
2. Make addLinkAddress, addStackedLink and removeStackedLink
   return a boolean indicating whether something changed.
3. Add a removeLinkAddress method (currently there is no way of
   removing an address).
3. Move hasIPv6Address from ConnectivityService to
   LinkProperties, where it belongs.

Bug: 9625448
Bug: 10232006
Change-Id: If641d0198432a7a505e358c059171f25bc9f13d5

Lorenzo Colitti   commited 2013-08-20 21:16:37 +09:00
09de418b17
Add a string constructor to LinkAddress.
This will allow us to do new LinkAddress("2001:db8::1/64").

Bug: 10232006
Change-Id: If479bdbab16826afe9d82732215141841c282299

Lorenzo Colitti   commited 2013-08-20 14:19:20 +09:00
b48bb0801a
am ead12e2f: am 02eab434: am f42ca169: Merge "If in a mobile captive portal is detected enable fail fast." into jb-mr2-dev
* commit 'ead12e2f40':
  If in a mobile captive portal is detected enable fail fast.

Wink Saville   authored and   Android Git Automerger   commited 2013-08-08 17:10:34 -07:00
052f1b617b
am b3aae5de: am 55adb390: am 848b190c: Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev
* commit 'b3aae5de90':
  Have CaptivePortalTracker use gservices updateable provisioning urls.

Wink Saville   authored and   Android Git Automerger   commited 2013-08-08 17:10:32 -07:00
84c97feb16
am 02eab434: am f42ca169: Merge "If in a mobile captive portal is detected enable fail fast." into jb-mr2-dev
* commit '02eab434ad9faa25291e63023b7e66698ca457a8':
  If in a mobile captive portal is detected enable fail fast.

Wink Saville   authored and   Android Git Automerger   commited 2013-08-08 15:46:55 -07:00
ead12e2f40
am 55adb390: am 848b190c: Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev
* commit '55adb390bb96175db9abee3ead349a98b4dc4262':
  Have CaptivePortalTracker use gservices updateable provisioning urls.

Wink Saville   authored and   Android Git Automerger   commited 2013-08-08 15:46:52 -07:00
b3aae5de90