Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
Migrate legacy VPN arguments to system_server.
Generate the racoon and mtpd daemon arguments in system_server,
instead of accepting them from Settings.

Bug: 5756357
Change-Id: I42c1a644f6add477fe4222342640d7db15982cb8

Jeff Sharkey   commited 2012-08-24 11:29:58 -07:00
64d8b3be3a
Include network type that caused broadcast.
Network type can be obtained through EXTRA_NETWORK_INFO, but offer
it as first-class extra since the returned NetworkInfo is deprecated.

Bug: 6936247
Change-Id: Ief59577afd2bd930f0f4c5650b413feef86bfbc3

Jeff Sharkey   commited 2012-08-06 11:45:01 -07:00
47905d1f1d
Network data activity change intent for network interfaces.
The activity notification is received from netd, an intent
DATA_ACTIVITY_CHANGE is then raised for other part of the system to
consume.

Change-Id: Idfcc4763c51c5b314c57f546c12557082f06bebf

Haoyu Bai   commited 2012-07-17 17:13:03 -07:00
b5da575fc7
Added or fixed doctrings for required permissions.
Bug: 6591338
Change-Id: Ia2092f9994854701b5fa1425c371817367ae07ec

Nicolas Falliere   commited 2012-06-18 17:22:34 -07:00
7842df58d0
Begin collecting xtables iface counters.
Add method to parse new iface_stat_fmt proc stats, or return null
when kernel support is unavailable. Add test and remove older, unused
parsing code. Create new "xt" recorder to persist the new xtables
counters when available.

Add SSID support to NetworkIdentity to fix policy tests.

Bug: 6422414
Change-Id: I77f70e9acb79a559ab626f3af5c4f3599801ed43

Jeff Sharkey   commited 2012-05-01 21:04:26 -07:00
5cc4da38f0
API to report if active network is metered.
Report to developers if active network is "metered" and define it
as the user being sensitive to heavy data usage.

Bug: 3001465
Change-Id: I855ca3cd3eb1de3c4814148d70ccf24957af898a

Jeff Sharkey   commited 2012-04-16 11:20:27 -07:00
d00b130332
Migrate to @Override to remove warnings.
Bug: 6303344
Change-Id: I0d33b2ed448467379d576ccd71fb5ae20c878852

Jeff Sharkey   commited 2012-04-09 10:57:21 -07:00
078d356a9b
Support metered Wi-Fi NetworkPolicy.
Add networkId field to NetworkIdentity to identify Wi-Fi networks by
SSID.  Add support for policies without usage cycles.

Only apply mobile policies when SIM state is ready, which is cleaner
than just checking for airplane mode.  Also avoids creating no-op
default policies when subscriberId is null.

Bug: 3001465, 3291052
Change-Id: I1f8aaa49a5db306df022c402ea7f3f5d4bc0cfc7

Jeff Sharkey   commited 2012-04-05 16:02:25 -07:00
2d9e5a5f9e
Improve Wi-Fi hand-off
When Wi-fi connects at L2 layer, the beacons reach and the device
can maintain a connection to the access point, but the application
connectivity can be flaky (due to bigger packet size exchange).

We now use Watchdog to monitor the quality of the last hop on
Wi-Fi using signal strength and ARP connectivity as indicators
to decide if the link is good enough to switch to Wi-Fi as the uplink.

ARP pings are useful for link validation but can still get through
when the application traffic fails to go through and thus not best indicator
real packet loss since they are tiny packets (28 bytes) and have
much low chance of packet corruption than the regular data
packets.

Signal strength and ARP used together ends up working well in tests.
The goal is to switch to Wi-Fi after validating ARP transfer
and RSSI and then switching out of Wi-Fi when we hit a low
signal strength threshold and waiting until the signal strength
improves and validating ARP transfer.

Change-Id: Ica593291ec7772da892f03cf45b649635b730c47

Irfan Sheriff   commited 2012-02-29 17:33:36 -08:00
b9f329f633
store the hw addr in the extraInfo field of ethernet NetworkInfos
Doug Zongker   authored and   Mike Lockwood   commited 2012-02-10 14:44:03 -08:00
b1a238dbb3
Deprecate ACTION_BACKGROUND_DATA_SETTING_CHANGED.
Broadcast is no longer sent, except during first boot after platform
upgrade.

Change-Id: I7a9c105b5783ca9f9c3aca2efff6fe5c13a4c1fd

Jeff Sharkey   commited 2012-01-30 16:32:54 -08:00
c958c77f1a
am 4741163c: am fbb09ea8: Merge "Fix NPE in trimV4AddrZeros." into ics-mr1
* commit '4741163cd719ce88eddf17ebb0a3ffd6a8044fbe':
  Fix NPE in trimV4AddrZeros.

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-12-07 17:12:47 -08:00
60660ab0f4
Fix NPE in trimV4AddrZeros.
Change-Id: Id6ab91dabce4a2adba02f2601bc1157e87b782c3

Robert Greenwalt   commited 2011-12-07 16:55:38 -08:00
549920a597
am e55e5b84: am 3dba4353: Fix the build.
* commit 'e55e5b84e53889791c0b6be8cad7cc134c9dfcba':
  Fix the build.

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-12-07 13:19:37 -08:00
177cac90d0
Fix the build.
Change-Id: I71d1d9958182966d2eff0d34fa05ac57f2cabc48

Robert Greenwalt   commited 2011-12-07 13:10:59 -08:00
3dba435361
am 2ebd3612: am f352491a: Merge "Trim leading zeros from ipv4 addrs." into ics-mr1
* commit '2ebd3612d82f728873f87cdbea9fa5513b5cfb39':
  Trim leading zeros from ipv4 addrs.

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-12-07 12:33:24 -08:00
0b3d2a85b1
Trim leading zeros from ipv4 addrs.
Underlying libraries will interpret leading zeros as octal values and
fail.

bug:5262995
Change-Id: Iff949225bb6b941f7274ee81754e1f41ed719a6c

Robert Greenwalt   commited 2011-12-07 09:58:48 -08:00
86a570287f
docs: some helpful javadocs for network info
Change-Id: I8f1879bf10acd6371a76f11a8e5ec08643c3f943

Scott Main   commited 2011-10-06 19:26:48 -07:00
f58b7d82d0
docs: deprecate thingy
Change-Id: I579824680f3b5110d56981becaaf81f917989e7e

Scott Main   commited 2011-10-06 18:32:43 -07:00
5058914700
Hide quota APIs until finalized.
Bug: 5383656
Change-Id: Ia2a978a6ff2ee642b0ea4d7d6b8857b7efffd612

Jeff Sharkey   commited 2011-10-06 10:50:09 -07:00
eb3e8c66cb
Reduce connectivity logging
Change-Id: I5d45b8fbcd01e42df7f2b1cf02fb5b226128abb8

Wink Saville   commited 2011-09-21 11:05:43 -07:00
a7d56571c2
Collect and persist tethering stats.
Use new "gettetherstats" netd command to retrieve statistics for
active tethering connections.  Keep tethering poll events separate
from UID poll, even though they end up same historical structures.

Bug: 5244846
Change-Id: Ia0c5165f6712c12b51586f86c331a2aad4ad6afb

Jeff Sharkey   commited 2011-09-16 16:05:51 -07:00
300f08f094
Create new isNetworkSupported API
Useful for checking if on a wifi-only device.
Similar to asking for NetworkInfo for a network type and checking for
null, though here the intent is explicit.

bug:5087537
Change-Id: Ia3ddd09b6b735b8b3ceb7a347891e015fd96b218

Robert Greenwalt   commited 2011-08-31 16:53:12 -07:00
0114f6e8e9
Introduce immediate CONNECTIVITY_ACTION variant.
New broadcast that is dispatched immediately after connectivity
changes have been handled by ConnectivityService, bypassing any
applicable CONNECTIVITY_CHANGE_DELAY.

Also protect CONNECTIVITY_CHANGE broadcasts, since they should only
be sent by system.

Bug: 5198167
Change-Id: I75f1fb44b21da1879f0ab960bcaa481126d70fde

Jeff Sharkey   commited 2011-08-29 16:10:43 -07:00
971cd16561
Proactively disable data when over policy limit.
Add policy controls to NetworkStateTracker which are combined with
other user preference and internal flags to decide if data connection
should be established.  Better locking around enabled flags.

When data network would be over limit, proactively disable data on
that network.  Enable when policy is snoozed or when cycle resets.

Track and dismiss notifications from now-stale policies.

Bug: 4587023, 5178147
Change-Id: Ibfcc9f73cda7c369209af701b46eddd3d1943f2d

Jeff Sharkey   commited 2011-08-23 18:45:44 -07:00
805662d8fa
Merge "Background data notification, API clean up."
Jeff Sharkey   authored and   Android (Google) Code Review   commited 2011-08-18 15:01:10 -07:00
e612a38faa
Background data notification, API clean up.
When restricting background data, show ongoing notification to give
easy access to re-enable. Deprecate getBackgroundDataSetting() API
to always return true, since NetworkInfo.isConnected() is new source
of truth. Handle upgrade path by reading from existing secure value,
and kick one last broadcast when changing value. Remove background
data code from ConnectivityService.

Remove warning alerts, since they push ifaces into restricted list;
should only happen when iface has limit.

Bug: 5163559, 5129421
Change-Id: I0064d9d643656a4d32aaae51d4a58bce49fe295f

Jeff Sharkey   commited 2011-08-17 14:12:42 -07:00
39c01ebcce
P2p enhancements
- ConnectivityService interaction and support for running dhcp server
and client

- State machine enhancements for connectivity interaction

Change-Id: Iba3beb8c87554ffd67a7b7e852bbb4dd8666a4f5

repo sync   commited 2011-08-10 15:53:49 -07:00
f5de557544
Expose quota status for active network.
Create API to expose quota status derived from underlying network
policy.  This is designed to support applications making informed
decisions when performing network requests.

Fix bug with random stats generation, and write policy when changing
restrict background data flag.  Deprecate EXTRA_NETWORK_INFO, since
it varies based on UID.

Bug: 4517283, 5088603
Change-Id: Ic6893a8967f69937e466be226ba7bb86ef5a5d2d

Jeff Sharkey   commited 2011-08-02 18:19:54 -07:00
66fa96870b
am fec26c50: am f3ab069b: Make copy-constructor make deep copy.
* commit 'fec26c5097':
  Make copy-constructor make deep copy.

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-07-29 09:24:38 -07:00
2351e41ea8
am f3ab069b: Make copy-constructor make deep copy.
* commit 'f3ab069bec':
  Make copy-constructor make deep copy.

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-07-29 09:20:51 -07:00
fec26c5097
Make copy-constructor make deep copy.
Used to grab immutables but now will copy the data so the result
is mutable and we don't get crashes.

bug:5051667
Change-Id: I0878bf8c58069055f528121541d1911f404cbe49

Robert Greenwalt   commited 2011-07-28 17:21:25 -07:00
f3ab069bec
Merge "Use dns proxy a bit." into honeycomb-LTE
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2011-07-26 13:21:09 -07:00
9520d6af5a
Use dns proxy a bit.
Sets the current default interface and sets the dns per interface.
port of changes 23041 and 22098 from opensource.
bug:5060618

Change-Id: I80e7ef88727eeb8ff2b48059f69b270e5a6b5c16

Robert Greenwalt   commited 2011-07-25 17:00:13 -07:00
fd0597c8e4
resolved conflicts for merge of aaf31586 to master
Change-Id: I9e8faaa94f9b251a9c003dc6b9a3e2a97c4564a9

Robert Greenwalt   commited 2011-07-25 16:06:25 -07:00
fce7186be1
Fix build.
Add NetworkUtils function missed in manual merge.

Change-Id: Ifce8f2988bb581ddc9b971b8af07a32f46c91e14

Robert Greenwalt   commited 2011-07-25 14:00:42 -07:00
9186900f54
Merge "Fix USB tethering"
Mike Lockwood   authored and   Android (Google) Code Review   commited 2011-07-23 19:36:32 -07:00
865fcf3eb3
Fix USB tethering
The previous approach no longer works with the new USB drivers, since the usb0
interface is no longer enabled by default.
This introduced a chicken & egg problem - usb0 will not be enabled until the
user tries to start tethering, but Settings will not enable the checkbox unless
usb0 is enabled.
To fix this we add an explicit call to start USB tethering in the connectivity manager.
This will enable RNDIS if necessary and then bring up tethering once usb0 is enabled.

Change-Id: Iae1f733366aa6b0dafa66d4c97207794173ef54b
Signed-off-by: Mike Lockwood <lockwood@android.com>

Mike Lockwood   commited 2011-07-23 21:57:55 -04:00
ed4a1741b4
am 6ef5bd7a: am 9810742c: Add better routes for secondary DNS
* commit '6ef5bd7a00':
  Add better routes for secondary DNS

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-07-22 13:17:54 -07:00
da15bead3c
Add better routes for secondary DNS
We'd been doing no-gateway hostroutes for dns servers on secondary nets, but on
some devices (multi-homed stingray) this is a problem.  Add gateway-ed hostroutes
instead so the BP can do it's nonstandard "magical" demultiplexing.

bug:5011392
Change-Id: Ia48f69c8ddf2a37cfb8f014f078f96bf601d2ddb

Robert Greenwalt   commited 2011-07-22 12:52:21 -07:00
9810742cd8
resolved conflicts for merge of d57579a4 to master
Change-Id: If2881b8b7faea5139af83a37cba04ccac5904f81

Robert Greenwalt   commited 2011-07-15 10:52:54 -07:00
3079c1666e
Apply the dns and route diff which we get a change
bug:5008973
Change-Id: Ib99e43d9d852452cc1f2aea6bef07bbd194f28cc

Robert Greenwalt   commited 2011-07-14 18:12:14 -07:00
e8d2a4a8a0
VPN: close the socket in protectVpn() to avoid leaking descriptors.
Change-Id: Idda0c2ea1770abc490566e894711bcb08f60b354

Chia-chi Yeh   commited 2011-07-14 16:19:19 -07:00
9e4ff6ef91
am 6b5e201d: am 6d1d16c3: Merge "Remove STOPSHIP but allow seamless Handoff when possible." into honeycomb-LTE
* commit '6b5e201d47':
  Remove STOPSHIP but allow seamless Handoff when possible.

Wink Saville   authored and   Android Git Automerger   commited 2011-07-14 10:55:58 -07:00
d622c319ae
Remove STOPSHIP but allow seamless Handoff when possible.
If an address is removed we must reset the connection but
only for the connections associated with that address. For
now we're doing the "all" addresses for a type (IPv6 or IPv4)
in the future we only need to reset a particular addresses
connections.


Bug: 4981919
Change-Id: I97f8071a3ed6f827ed22f32216ca5011bfe6c1d9

Wink Saville   commited 2011-07-13 13:44:13 -07:00
051a664b14
resolved conflicts for merge of a3b4b5ca to master
Change-Id: I50f8fe61303efa78f5d450ddda1483e0ecb81d12

Wink Saville   commited 2011-07-08 12:49:14 -07:00
620e1078ec
Use resetConnections with resetMask.
Bug: 4981919
Change-Id: I5dec2da0756d5083bc81494fd583672704537694

Wink Saville   commited 2011-07-07 16:17:06 -07:00
c101c56ecc
VPN: implement status report for legacy VPN.
Change-Id: I81c28dafd9588572df76cbc303b0d6a0f41f9bc6

Chia-chi Yeh   commited 2011-07-04 03:23:12 -07:00
bded3eb138
VPN: convert prepare() into a form which helps solve race conditions.
When someone tries to revoke packageA, it is possible that packageA is
already revoked by packageB. In this case packageB should not be revoked,
and the new prepare() can help solve this problem.

Change-Id: Iee056a191dd99467b8ad1b5379a17b02d404bad1

Chia-chi Yeh   commited 2011-07-03 17:03:27 -07:00
3e2e1da0a0
VPN: export legacy VPN in IConnectivityManager.
Change-Id: I016fe056ceab39ffc36aa235d14b30a9f094a2e1

Chia-chi Yeh   commited 2011-07-02 17:15:00 -07:00
7e026b38e9