| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Currently, kernel definition of metered networks is applied at the
interface level. This change maintain list of those metered ifaces
and notifies policy listeners, like ConnectivityService. (This gives
us a consistent picture of when a network would be blocked.)
Bug: 4601393
Change-Id: I277d5ca96ab967a1c1c3f1da8f9587557cd6d74c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Handful of DownloadManager flags to record when a download was paused
because of NetworkPolicyManager rules.
Change-Id: I99fc47f529cb6c8a42dbeca049e0cd0f1556eac4
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
network." into honeycomb-LTE
* commit '241b65aca93e263f0869c5bec4ad1dbda0dec6db':
Reset connections AFTER we take down the network.
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If you do it before you have a race condition and some apps will
manage to reconnect on the dieing network before it goes and then
get no notification when it goes.
bug: 3408025
Change-Id: I5386ff313c759b3f687bc38731454ab43dbe76b8
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
Note that VpnConfig is for internal use only.
Also remove hidden methods from ConnectivityManager.
Change-Id: Ic298c4dc9a2c6c452bd8f4be6fa84e7ac489c0c4
|
|\ \ \ \
| |/ / /
|/| / /
| |/ /
| | |
| | |
| | | |
into honeycomb-mr2
* commit '1195487228e1eb6c8859368286168051bd505b2f':
Fix lease duration handling
|
| |\ \
| | |/
| |/|
| | |
| | | |
* commit 'ecda5461603b6de77beb045dfdf82dad7ae48d61':
Fix lease duration handling
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Convert lease time in seconds to long before alarm
set up and add sanity check
Change-Id: I99524c97d9a643ffa8234d016d0e819a284977a1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When launching warning/limit UI, include the template that triggered
the notification. Also move actions and extra into contract class.
Change-Id: Id2e63fd2d2e36a137a3fd8f889c7256038ca5f2e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Watch for network statistics to cross NetworkPolicy warning or limit,
and show notifications to user as needed. Currently checks during
any statistics update, but will eventually move to event registration
through netd when kernel supports.
Fixed accounting bug in getSummaryForNetwork(). Only apply UID policy
to applications; applying to system processes could break critical
services like RIL.
Change-Id: Iac0f20e910e205f3cbc54ec96395ff268b1aa379
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Devices with always present wired ethernet interfaces (as opposed
to usb ethernet dongles) don't have the interface added and removed.
Instead, it is present already at boot time. Change EthernetDataTracker
to support the already existing at boot time case.
Change-Id: I7b8e938f6b07aabd14f00ace55b35b7a05ea5a38
Signed-off-by: Mike J. Chen <mjchen@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The improved keystore will allow clients (Email not the least of them)
to establish SSL connections using custom client certificates. In order
to do this properly, the socket factories they use to establish these
connections need to be able to customize their behavior.
Change-Id: I6e0fa04dd01bd6481dfdad5a71a63e0371d0ad8c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of embedding complex template coexistence rules into policy
service, rely on external editors to enforce, and offer atomic
get/set operations for full policy sets.
Generate default mobile policy when none exists, using default of 4GB
warning and cycle reset of current day. Dispatch listener events
through Handler when holding internal lock, and catch CLASS_UNKNOWN
networks in 3G_LOWER template.
Change-Id: I063cf1eaf330e32b75d0697b89fc04488e6dfaea
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
NetworkStats now grows in place with arraycopy() instead of callers
needing to know record count a priori. Better growth calculation for
both NetworkStats and NetworkStatsHistory; 50% each time. Better
estimates of buckets needed in calling services.
Change-Id: I3adbffa0b7407612cc6349d9135a8b4eb63cd440
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Moved so they can be used by both system service and Settings UI, since
they both work with data usage cycles. Still covered by tests.
Change-Id: I01c0c4db6da9457dd867c9167d31a5f9f8e5f5d9
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Define NetworkPolicy as cycle-reset day and warning/limit values, and
set/get through NetworkPolicyManager. Watch ConnectivityManager for
network connection events, and apply quota rules based on matching
interfaces. Policy service matches based on strong identity to support
IMSI-specific policy values.
Calculates remaining quota based on current stats recorded since the
last reset cycle day. Tests to verify edge cases around February.
Persist network and UID policies in XML, and restore on boot.
Change-Id: Id40ba7d6eed6094fbd5e18e6331286c606880d80
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implements read/write of network stats using AtomicFile, along with
magic number and versioning. Stores in "/data/system/netstats.bin"
for now. Tests to verify that stats are persisted across a simulated
reboot, and to verify that TEMPLATE_WIFI is working.
Fixed bug where kernel counters rolling backwards would cause negative
stats to be recorded; now we clamp deltas at 0.
Change-Id: I53bce26fc8fd3f4ab1e34ce135d302edfa34db34
|
| | |
| | |
| | |
| | |
| | |
| | | |
The dialogs will be in another change.
Change-Id: I0cdfd2ef21ffd40ee955b3cbde5ada65dbfdb0bc
|
|\ \ \
| |/ /
| | |
| | | |
Change-Id: Ic4d8aae7dd457457d9cc8ba081b273e425729f86
|
| |\ \
| | |/
| | |
| | | |
Change-Id: I8193235a4c7e574635e17b2eb05bb5420a3c6749
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since we've already decided to inc the sdk version we should try to get these in too.
bug:4500218
Change-Id: I6dcb401bf30f1b06f02be0a93681a190d7ee5775
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add DhcpStateMachine for interation with dhcpcd
- Supports wakeup and renewal on dhcp
- Supports multiple controllers to use the state machine
simultaneously
- Optionally, a controller can request a notification prior
to DHCP request/renewal being sent
Change-Id: I5324814b19ff19863aa6fa89f1e3f0a202930c98
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When given a start/end range, interpolate between buckets to return
the total network usage. Used to summarize detailed UID stats. Method
to combine NetworkStatsHistory regardless of bucket size. Used to
combine all histories matching a template.
Added tests for both methods.
Change-Id: Ia463910c0ecf7cf08dcf97c658ad99742bd6b882
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Collect UID-granularity network stats during regular poll event. Add
dumpsys argument to generate fake historical data for debugging, and
move stats parameters to Settings.Secure.
Change-Id: I09b36a2955dc10c697d4b9c3ff23dcb3ac37bd70
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of deriving network identity based on raw subsystem broadcasts,
listen for updates from ConnectivityService. Added atomic view of all
active NetworkState, and build map from "iface" to NetworkIdentity set
for stats tracking.
To avoid exposing internal complexity, INetworkStatsService calls use
general templates. Added TelephonyManager mapping to classify network
types using broad labels like "3G" or "4G", used to drive templates.
Cleaned up Objects and Preconditions.
Change-Id: I1d4c1403f0503bc3635a59bb378841ba42239a91
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Specifically, this adds support for specifying custom
{Trust,Key}Managers in the socket factory.
Change-Id: I1fdf6587064c71ae0520f73821923dcad8d140ad
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Periodically records delta network traffic into historical buckets to
support other services, such NetworkPolicyManager and Settings UI.
Introduces NetworkStatsHistory structure which contains sparse, uniform
buckets of data usage defined by timestamps. Service periodically
polls NetworkStats and records changes into buckets. It only persists
to disk when substantial changes have occured. Current parameters
create 4 buckets each day, and persist for 90 days, resulting in about
8kB of data per network.
Only records stats for "well known" network interfaces that have been
claimed by Telephony or Wi-Fi subsystems. Historical stats are also
keyed off identity (such as IMSI) to support SIM swapping.
Change-Id: Ia27d1289556a2bf9545fbc4f3b789425a01be53a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Verifies that policy changes trigger rule updates that respect current
foregroundActivities status. Also verifies logic that promotes a UID
based on its most-foreground PID. Verifies that policy changes result
in immediate rule changes.
Also verifies that BACKGROUND_DATA_SETTING_CHANGED broadcasts are sent
by policy changes.
Change-Id: I4fd0dad9e1dbccee2c5968244bb1814e6cb2c6e1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Includes details on all internally known UIDs, which can be used for
debugging purposes.
Change-Id: I340d25212e3c7a76a57de0a94ffeea34b6748941
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Teach ConnectivityManager about UID-specific rules derived from policy,
such as rejecting network traffic on "paid" interfaces. Calls that
return NetworkInfo now filter based on any REJECT rules in effect for
the calling UID. (Added uid parameter if callers that still want all
interfaces.)
Changed NetworkPolicyManager to derive rules based on current policy
combined with PowerManager and ActivityManager status, which it passes
to ConnectivityService for eventual enforcement through netd. When
rules change the usability of a NetworkInfo for a specific UID, it also
dispatches CONNECTIVITY_ACTION broadcasts to that UID. Combined paid
and background policy together to match current working definition.
Change-Id: I797ea49439fcc487cfe2cbc16703d4b91ceb9af6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adapt to change in the way MockWebServer sets up CONNECT proxies.
git cherry-pick --no-commit c7e2feee5e7908a019a0de91123c1feb9bdc38bc
React to move of Base64 in libcore
git cherry-pick --no-commit 119f7ebdd1f8df3a8ff8e3b8056bff725d569253
Expose and document android.net.HttpResponseCache.
git cherry-pick --no-commit 7b73f0fdb8c032a65c55610541d66385bd8bcbe6)
make update-api
Change-Id: Ieb48b304ea38ee8c2ec01e860d99b1404583889e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The POLICY_REJECT_BACKGROUND policy requires that network traffic be
blocked when a UID goes into the background. Even if the UID has an
activity in the foreground, it's considered "background" if the screen
is turned off.
This changes watches for SCREEN_ON/OFF broadcasts, and rule generation
now observes screen state. It also introduces an observer pattern so
that ActivityManager doesn't directly know about NetworkPolicy, and
moves the service management into SystemServer.
Change-Id: Ie7a84929d3ca60ae4578d47e19d5a8da10fd8d58
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added startDataProfiling() and stopDataProfiling() to TrafficStats,
which can be used by apps to measure network usage delta between two
points in time. Currently takes two NetworkStats snapshots and returns
delta, which will eventually include tag-level granularity. Added
tests for NetworkStats delta subtraction.
Added NMS.getNetworkStatsUidDetail() that returns stats for specific
UID. Always gives stats access for the calling UID, otherwise enforces
that caller has permission. Fix readSingleLongFromFile(), since
/proc/ files don't have well-defined lengths.
Change-Id: Ic5b6414d8effbd66846e275b00d4b8a82c74589d
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
into honeycomb-LTE
* commit '09ded82b784b9f6e01d4cd4298097fd2b459560b':
Reset connection while data state changed.
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Check data call states and reset connection if any link properties changed.
Change-Id: I008aea969378648192852161959fdf4aad6211a1
|
|\ \ \ \
| |/ / /
| | | |
| | | | |
Change-Id: I70fc4382f832d1a2bded8a5ee7d9b96fac77879b
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Also adds support for v6 routes and for removing single routes.
Change-Id: I1c4f08c7938371090944d8d6f603e1e0d6d70c01
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
change.
* commit 'b22a9fd9bb32133cbc7dc4fc7752dbf68e52dffe':
Linkproperties update via unsol data call state change.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Handles the scenario of radio technology handover with IP continuity.
Once RIL/Modem finished a handover operation, an unsol data call state
change will be send up to FW notifying all link propertes changes.
FW will then re-configure the device with new link properties
including iptable used by Tethering.
Change-Id: I05e29f66ac3db8ba4274d3662642607742ba1d12
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
New system service that maintains low-level network policy rules and
collects statistics to drive those rules. Will eventually connect to
netfilter kernel module through NetworkManagementService and "netd".
Begin tracking foreground activities in ActivityManagerService, which
is updated as part of OOM adjustment. Eventually a network policy of
POLICY_REJECT_BACKGROUND will reject network traffic from background
processes.
Change-Id: I5ffbbaee1b9628e9c3eff6b9cb2145fc5316e64d
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Introduces public API to apply "tags" to track data traffic originating
from the current thread. (Under the hood, the tags are maintained and
applied in BlockGuard.) Also adds tag/untag methods for developers who
maintain their own Socket pools.
Change-Id: Ic2dd3155559a93a7b613c7853748d4c44fb3a39e
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
honeycomb-LTE
* commit '9c7c87941446cdd1263a87a8c4cc5672082c7e12':
Fix initialization of RouteInfo
|
| | |
| | |
| | |
| | |
| | |
| | | |
IPv6 gateway is not correctly set in RouteInfo
Change-Id: I24b1ab71a64e3097c9ba641899240fc27847b86c
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
honeycomb-LTE
* commit '441bc9a6f41ca1678a6c965bec7e2f18227ac100':
Fix the adding of host routes.
|
| | |
| | |
| | |
| | |
| | |
| | | |
We used to just add
Change-Id: I991e4cc976cc2932887dd3242fd50e013d521b0a
|