Commit Graph

219 Commits

Author SHA1 Message Date
Jianzheng Zhou
c98a894ebf Refactor getPersistedNetworkPreference am: a8aa160836
Original change: undetermined

Change-Id: Ifc544d6b8f094995520b4693fded8a96cde1b1c3
2021-05-31 05:50:54 +00:00
Robert Greenwalt
e9b9567f1b Merge "Support for dns domain." am: ff31bee14a
Original change: undetermined

Change-Id: I15fc7fdc8b73adae2e64df434099d2b4dea0653d
2021-05-31 05:50:40 +00:00
Robert Greenwalt
b7ea39f7b6 Merge "Remove DhcpInfoInternal" am: 2be645a342
Original change: undetermined

Change-Id: I5146d6392f0ab9f64b4b12d90f64ace6b6bee47d
2021-05-31 05:50:03 +00:00
Jeff Sharkey
1f713c5178 am 65f4de10: am 3a8af8ef: Merge "Migrate more Secure settings to Global." into jb-mr1-dev am: b1ed51bc0e
Original change: undetermined

Change-Id: I35ddc8afb63c59d551e66128c852c7dedd940f8e
2021-05-31 05:49:26 +00:00
Jeff Sharkey
e311bbc849 am 116e0ed0: am c3e3311c: Merge "Migrate network stats from removed users." into jb-mr1-dev am: aab7d3b292
Original change: undetermined

Change-Id: I9a7fe89d2b009273b4716df98e0e2dd5eee07137
2021-05-31 05:48:19 +00:00
Irfan Sheriff
57cf5c5294 Merge commit '949dcad8' into manualmerge am: 04327607d0
Original change: undetermined

Change-Id: Icb01bb1b9ae845b0e152d7cda3b6e2d3f0542b6a
2021-05-31 05:46:21 +00:00
Jeff Sharkey
251f1fdfda am f261d88f: am 116ee10b: Merge "Always-on VPN." into jb-mr1-dev am: 03ca5c9f83
Original change: undetermined

Change-Id: I7b62064b2f4b99c76e63d92040a09889c24aa792
2021-05-31 05:35:35 +00:00
Jeff Sharkey
df20a146df am 33f94286: am 34f86312: Merge "Migrate legacy VPN arguments to system_server." into jb-mr1-dev am: 31b50e628d
Original change: undetermined

Change-Id: Icd8ddfdc79188341c38bd284071f6d4002918aa0
2021-05-31 05:35:21 +00:00
Jeff Sharkey
57026e4f63 Merge "Include network type that caused broadcast." into jb-mr1-dev am: 976942a8ee
Original change: undetermined

Change-Id: I200833519100685474c282353239b5818374dbec
2021-05-31 05:33:37 +00:00
Haoyu Bai
17319ab7c7 Network data activity change intent for network interfaces. am: b5da575fc7
Original change: undetermined

Change-Id: I2d89198295e658bf70053dfd8dbee53234273f96
2021-05-31 05:32:48 +00:00
Nicolas Falliere
dd41b308bd am 56bb344c: Merge "Added or fixed doctrings for required permissions." into jb-dev am: 5889983f0b
Original change: undetermined

Change-Id: Ib57570da47d7054773df637a8e1895ec9d10f51d
2021-05-31 05:32:00 +00:00
Jeff Sharkey
d4dbd985b8 Merge "Begin collecting xtables iface counters." into jb-dev am: 1e329235a6
Original change: undetermined

Change-Id: Ibda8099e60ccf095f14ac433896c344d4ad874b5
2021-05-31 05:29:58 +00:00
Jeff Sharkey
b2649bbe67 Support full 32 bits for socket tags. am: 528cf48b34
Original change: undetermined

Change-Id: I0f3805aead4ccbe44738f66d34c8d0be7f3f6b97
2021-05-31 05:29:14 +00:00
Jeff Sharkey
f09e632335 Pipe DHCP vendor info towards framework. am: d6075598cb
Original change: undetermined

Change-Id: I036af97e82b8ffc62bd745733ece4974093e6e6e
2021-05-31 05:28:23 +00:00
Jeff Sharkey
10485cf869 API to report if active network is metered. am: d00b130332
Original change: undetermined

Change-Id: Iec8831e29ecdae115d1468380467e01802f75eb6
2021-05-31 05:27:56 +00:00
Jeff Sharkey
99732343de Migrate to @Override to remove warnings. am: 078d356a9b
Original change: undetermined

Change-Id: Iaba016fbd8e2803aae910cec366d14b71d05da61
2021-05-31 05:27:42 +00:00
Jeff Sharkey
2d6480dd66 Support metered Wi-Fi NetworkPolicy. am: 2d9e5a5f9e
Original change: undetermined

Change-Id: Ib8038840a80ab8b21b1f425afc6427169745ae7e
2021-05-31 05:27:14 +00:00
Irfan Sheriff
80a9c0bbec Improve Wi-Fi hand-off am: b9f329f633
Original change: undetermined

Change-Id: I718d815a282684a97427802c2ca1f5632fb5481a
2021-05-31 05:26:34 +00:00
Doug Zongker
97c9b10241 store the hw addr in the extraInfo field of ethernet NetworkInfos am: b1a238dbb3
Original change: undetermined

Change-Id: I4fc5d3cc752ce7b7b88ef313f26c1e9af47c1a63
2021-05-31 05:25:20 +00:00
Jeff Sharkey
d1b9e02bc9 Unify shorthand for byte-based units. am: b3a842ef9c
Original change: undetermined

Change-Id: Ic9124ec7ec56f56bbd9263c2541c30a35470861f
2021-05-31 05:24:51 +00:00
Jeff Sharkey
db4ca2cb46 Deprecate ACTION_BACKGROUND_DATA_SETTING_CHANGED. am: c958c77f1a
Original change: undetermined

Change-Id: Ic3944170c85029ce52fd7c6b85a0bb8fd9203438
2021-05-31 05:24:38 +00:00
Jianzheng Zhou
a8aa160836 Refactor getPersistedNetworkPreference
Optimize for updating mNetworkPreference according to device's networkAttributes
setting from overlay config.xml when connectivityservice start.

Change-Id: I90286332d4f453038f1ddac7dd9d1265d96b4859
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
2012-12-06 12:00:04 -08:00
Robert Greenwalt
0bc6c967cc Support for dns domain.
bug:6799630
Change-Id: I10070eddb65b7b60f0bc2b3e1e320e1aa4ec6e98
2012-11-16 11:25:32 -08:00
Robert Greenwalt
e110d00751 Remove DhcpInfoInternal
First step in accepting a set of patches.
bug:6799630

Change-Id: I6c894c60aeb3022960c2aaa45451bb1dde2b493b
2012-11-09 09:46:32 -08:00
Jeff Sharkey
5eccd9c147 Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
2012-09-27 16:22:53 -07:00
Jeff Sharkey
4126de53fc Migrate network stats from removed users.
When a user is removed, migrate all network stats belonging to that
user into special UID_REMOVED bucket.  Also removes those stats from
kernel to avoid double-counting if another user is created.

Bug: 7194784
Change-Id: I03f1d660fe3754566326b7749cae8068fc224ea9
2012-09-19 14:54:05 -07:00
Irfan Sheriff
ba8388bf7a Captive portal handling
We now notify the user of a captive portal before switching to the network as default.
This allows background applications to continue to work until the user confirms he
wants to sign in to the captive portal.

Also, moved out captive portal handling out of wifi as a seperate component.

Change-Id: I7c7507481967e33a1afad0b4961688bd192f0d31
2012-08-27 22:27:06 -07:00
Jeff Sharkey
f2e722a507 Always-on VPN.
Adds support for always-on VPN profiles, also called "lockdown." When
enabled, LockdownVpnTracker manages the netd firewall to prevent
unencrypted traffic from leaving the device. It creates narrow rules
to only allow traffic to the selected VPN server. When an egress
network becomes available, LockdownVpnTracker will try bringing up
the VPN connection, and will reconnect if disconnected.

ConnectivityService augments any NetworkInfo based on the lockdown
VPN status to help apps wait until the VPN is connected.

This feature requires that VPN profiles use an IP address for both
VPN server and DNS. It also blocks non-default APN access when
enabled. Waits for USER_PRESENT after boot to check KeyStore status.

Bug: 5756357
Change-Id: If615f206b1634000d78a8350a17e88bfcac8e0d0
2012-08-27 12:35:05 -07:00
Jeff Sharkey
c2a8e40c7a 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
2012-08-24 11:29:58 -07:00
Jeff Sharkey
47905d1f1d 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
2012-08-06 11:45:01 -07:00
Haoyu Bai
b5da575fc7 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
2012-07-17 17:13:03 -07:00
Nicolas Falliere
7842df58d0 Added or fixed doctrings for required permissions.
Bug: 6591338
Change-Id: Ia2092f9994854701b5fa1425c371817367ae07ec
2012-06-18 17:22:34 -07:00
Jeff Sharkey
1e329235a6 Merge "Begin collecting xtables iface counters." into jb-dev 2012-05-04 12:53:02 -07:00
Jeff Sharkey
528cf48b34 Support full 32 bits for socket tags.
Bug: 5321184
Change-Id: Iadb3a4ad541ef012cea35b70ad440eca4c879f42
2012-05-02 16:01:14 -07:00
Jeff Sharkey
5cc4da38f0 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
2012-05-01 21:04:26 -07:00
Jeff Sharkey
d6075598cb Pipe DHCP vendor info towards framework.
Bug: 6344821
Change-Id: Ifb9a93c995f4d70f4ae2aa03b7e21f13013ef3b6
2012-04-18 21:55:14 -07:00
Jeff Sharkey
d00b130332 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
2012-04-16 11:20:27 -07:00
Jeff Sharkey
078d356a9b Migrate to @Override to remove warnings.
Bug: 6303344
Change-Id: I0d33b2ed448467379d576ccd71fb5ae20c878852
2012-04-09 10:57:21 -07:00
Jeff Sharkey
2d9e5a5f9e 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
2012-04-05 16:02:25 -07:00
Irfan Sheriff
b9f329f633 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
2012-02-29 17:33:36 -08:00
Doug Zongker
b1a238dbb3 store the hw addr in the extraInfo field of ethernet NetworkInfos 2012-02-10 14:44:03 -08:00
Jeff Sharkey
b3a842ef9c Unify shorthand for byte-based units.
Change-Id: If990859dee3f0973e1d4c48f05312c84071b3328
2012-02-03 14:50:13 -08:00
Jeff Sharkey
c958c77f1a Deprecate ACTION_BACKGROUND_DATA_SETTING_CHANGED.
Broadcast is no longer sent, except during first boot after platform
upgrade.

Change-Id: I7a9c105b5783ca9f9c3aca2efff6fe5c13a4c1fd
2012-01-30 16:32:54 -08:00
Steve Block
1be767cf74 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2012-01-03 22:38:27 +00:00
Robert Greenwalt
60660ab0f4 am 4741163c: am fbb09ea8: Merge "Fix NPE in trimV4AddrZeros." into ics-mr1
* commit '4741163cd719ce88eddf17ebb0a3ffd6a8044fbe':
  Fix NPE in trimV4AddrZeros.
2011-12-07 17:12:47 -08:00
Robert Greenwalt
549920a597 Fix NPE in trimV4AddrZeros.
Change-Id: Id6ab91dabce4a2adba02f2601bc1157e87b782c3
2011-12-07 16:55:38 -08:00
Robert Greenwalt
177cac90d0 am e55e5b84: am 3dba4353: Fix the build.
* commit 'e55e5b84e53889791c0b6be8cad7cc134c9dfcba':
  Fix the build.
2011-12-07 13:19:37 -08:00
Robert Greenwalt
3dba435361 Fix the build.
Change-Id: I71d1d9958182966d2eff0d34fa05ac57f2cabc48
2011-12-07 13:10:59 -08:00
Robert Greenwalt
0b3d2a85b1 am 2ebd3612: am f352491a: Merge "Trim leading zeros from ipv4 addrs." into ics-mr1
* commit '2ebd3612d82f728873f87cdbea9fa5513b5cfb39':
  Trim leading zeros from ipv4 addrs.
2011-12-07 12:33:24 -08:00
Robert Greenwalt
86a570287f Trim leading zeros from ipv4 addrs.
Underlying libraries will interpret leading zeros as octal values and
fail.

bug:5262995
Change-Id: Iff949225bb6b941f7274ee81754e1f41ed719a6c
2011-12-07 09:58:48 -08:00