History log of /frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
829dfa7cd80faa61b3f63c455f81411571144f82 28-Nov-2014 Lorenzo Colitti <lorenzo@google.com> Only use mDefaultDns if the network claims to offer Internet

Currently, if a network does not specify DNS servers, we default
it to using 8.8.8.8. This was done because the emulator did not
specify DNS servers. However, it causes queries to fail slowly,
instead of failing fast, on networks that do not have
connectivity to 8.8.8.8.

Bug: 18327075
Change-Id: I0df13ff4a17ee65e640be96695a3af31b020963a
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
d09c4cad65c708f2c4810d24295456708a2000d2 22-Nov-2014 Wink Saville <wink@google.com> Additional changes to SubscriptionManager API as per API council.

bug: 17575308
Change-Id: Idd98aa46c15a9219ccf28091c62602ac8bf16c62
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
2d1ee982276f5dbd0e035778b731b48e4ef34515 20-Nov-2014 Wink Saville <wink@google.com> Revert "Additional changes to SubscriptionManager API as per API council."

This reverts commit baf21da1e17ef358632c078128d381b3be218a08.

Change-Id: I73cbdfadf07ca3cf20b042781b62aafcc72b17d6
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
baf21da1e17ef358632c078128d381b3be218a08 20-Nov-2014 Wink Saville <wink@google.com> Additional changes to SubscriptionManager API as per API council.

bug: 17575308
Change-Id: I7773965094510999bfce8fc6b2b31ba6ce496653
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
e21a26b3ba78b0238f4ed4a09b43319a2320fbaa 28-Oct-2014 Lorenzo Colitti <lorenzo@google.com> Add support for running 464xlat on wifi as well.

1. Add a command to NetworkManagementService to enable/disable
IPv6 ND offload via netd.
2. Make Nat464Xlat enable offload if clatd successfully comes up
on a wifi network (which means it detected a NAT64), and
correspondingly re-enable offload when the clatd interface
goes down.

This change does not enable clatd on wifi yet, that requires an
extra 2 lines to enable it.

Bug: 12111730
Change-Id: I4318611762a37487c9a84f8c4867ec5aece98be8
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
954394653dad05838235f48244a4320893e0f0cf 09-Oct-2014 Lorenzo Colitti <lorenzo@google.com> Support more than one clatd at a time.

1. Make Nat464Xlat a per-network object, one for every network
requiring clat, instead of a ConnectivityService singleton.
2. Make the NetworkManagementService clatd commands take an
interface.
3. When we attempt to start clatd on a network, store its
Nat464Xlat object in the NetworkAgentInfo, so we have an
authoritative way of knowing whether clat is running on a
given network.
4. Rework Nat464Xlat, hopefully simplifying it.

Bug: 12111730
Change-Id: I1fa5508ef020cd1c3d1c7a1f7b06370ac5fc2ae2
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
e4a05afe85f15472325db9c535ef81f409fb6070 24-Sep-2014 Sreeram Ramachandran <sreeram@google.com> Send app permissions to netd.

Based largely off Robert's http://ag/546170 (thanks!)

Bug: 15413737
Change-Id: I8a1f0a184923c4c0a4935e6b88895bcc05e39f02
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
60446165d8bd44f72cec8d0c5583a688369fa660 19-Sep-2014 Lorenzo Colitti <lorenzo@google.com> Block address families with routes, not NetworkAgent side channel

Now that we support unreachable routes, use those to block
address families on VPNs. This is a much more elegant solution.
Also update LinkProperties when IP addresses are added and
removed, fixing a TODO.

Bug: 17462989
Change-Id: Ib749d84710dca70d672350b9f129bb91419ec77e
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
4b0f8e6fb707e19799011c1f4a5e4f54603e34b1 18-Sep-2014 Lorenzo Colitti <lorenzo@google.com> Support non-unicast route types: unreachable and throw.

Bug: 17462989
Change-Id: I8635472ca3e96ec2866af2de48e6260ab2da13fb
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
b57edc5ae999abd9c7310833f4f10bbacbc469d7 23-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Pass the socket mark for DNS queries to dnsmasq.

This makes tethered clients use the correct DNS servers when
tethering to non-default networks like the DUN APN.

Bug: 16357676
Change-Id: I8933b6de198a92c2aaf0291931ace8966ddba275
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
b69a3a8eaade042aa5b4d17f9b0dfd565c2e4a97 06-Aug-2014 Paul Jensen <pauljensen@google.com> Revert DNS cache flush command deletion from "Cleanup: Delete dead code."

This reverts part of commit 7a161c535104555890fa78b99faf1f414fc03e85.
The DNS cache flushing code needs to be called when routes change.

Change-Id: I20d39eabfa088deeeeeff0c3292b1910fd948b0d
bug:16549455
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
42065ac64cba166dc0fe602957ea8fe80bf406e2 27-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Prohibit address families by default unless a VPN explicitly allows them.

Bug: 15972465
Change-Id: I3278d94536fefacc86390c1ba4231680f7be8589
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
8cd33ed84e94036a5e1201485af7603dc6fb0d9b 24-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Implement support for bypassable VPNs.

Bypassable VPNs grab all traffic by default (just like secure VPNs), but:
+ They allow all apps to choose other networks using the multinetwork APIs.
If these other networks are insecure ("untrusted"), they will enforce that the
app holds the necessary permissions, such as CHANGE_NETWORK_STATE.
+ They support consistent routing. If an app has an existing connection over
some other network when the bypassable VPN comes up, it's not interrupted.

Bug: 15347374
Change-Id: Iaee9c6f6fa8103215738570d2b65d3fcf10343f3
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
03666c705ddabe0e7c5869ab69c2ca8b964164e9 20-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Cleanup: Delete dead code.

Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
a77760d74ad544bbd4f6310fd28b395f24c5467d 18-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Fix WiFi-Direct.

Add a new command to let netd know about routes on a p2p interface.

Bug: 15413694

Change-Id: I36effc438d5ac193a77174493bf196cb68a5b97a
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
06b6cdaed5c68816faac9d2354c6caf61e65e19d 12-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Remove unnecessary code and APIs.

This stuff has been replaced by setNetworkForUser() in NetdClient.

Change-Id: If525ee259b74314191d1913f7c2a3e828e05c38f
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
31ab41726b84c31a6aa45c929aad4ad04d32a992 12-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Delete unused APIs in NetworkManagementService.

Change-Id: Idc6c0ac0d3a4149821fc7820b7f37d4209fc55d3
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
6bc2c2c34f2b23eae79ad733c97a691734055c4f 07-May-2014 Paul Jensen <pauljensen@google.com> Convert Vpn from NetworkStateTracker to NetworkAgent.

This eliminates the need for the ConnectivityService.VpnCallback class.
This requires shifting VPNs to the new "network" netd API.
VpnService.protect() is modified to no longer go through ConnectivityService.
NetworkCapabilities is extended to add a transport type for VPNs and a
capability requiring a non-VPN (so the default NetworkRequest isn't satisfied
by a VPN).

bug:15409918
Change-Id: Ic4498f1961582208add6f375ad16ce376ee9eb95
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
67e0789cd3870af2fbbdefbff28f6fde9095a015 19-Jun-2014 Wink Saville <wink@google.com> Mobile_radio in battery history is not accurate

Invoke TelephonyManager#listen to connect mPhoneStateListener to receive
the notifications.

Bug: 15568103
Change-Id: I5a3fa6347704e96ceb34289f74ba6e3157bbb333
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
c18cbfdf8d40e7a526a088225cb32341e1ea0920 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Notify network observers of route changes.

Bug: 9180552
Change-Id: If8432bc74335676320b815784b21f404d3479c35
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
fb40dd4d00bd3361b2535bc866e6c21eadc52558 13-Jun-2014 Wink Saville <wink@google.com> Merge kwd to master

Add initial IMS and MSIM support from klp-wireless-dev-mirror

Change-Id: Idb607c0aa32f80fe4fe1539aedea7a221e9e7f04
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
7dc78cf3af9fd11a4f1e2e981ce584a23755ea9e 09-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Minor changes to the LinkAddress API docs.

1. Rename getNetworkPrefixLength to getPrefixLength. Update all
callers in frameworks/base and add a shim method and a TODO
for the rest.
2. @hide isSameAddressAs. It doesn't add much, and it's just
one-liner that callers can implement if they want.
3. Fix the alignment of the initial paragraph (<ul> should have
been </ul>).
4. Remove the documentation that talks about creating
LinkAddresses, since there's no public API for creating them.

With these changes I think LinkAddress is fine as a public API.

Bug: 15142362
Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
cc91c7b804a079f7b20404827277c61dd403805f 04-Jun-2014 Sreeram Ramachandran <sreeram@google.com> Add a new IpPrefix class and use it in RouteInfo.

This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.

Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.

Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
1fbcb2719828f16aec8b2d742a20b98e4a2cf17c 23-May-2014 Sreeram Ramachandran <sreeram@google.com> Support legacy routes added by apps via ensureRouteToHost().

Change-Id: I0ee1ca89fdc859d75a89021ca8c1902811b1e4a9
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
2d4b4ed681efcfb64c4d2b4d2a2d236aae1dc7ee 22-May-2014 Dianne Hackborn <hackbod@google.com> Battery monitoring fixes:

- Improve monitoring of level changes to not be confused
when it goes up while draining or down while charging.
- Put back in connectivity service code to tell battery
stats about the interfaces.
- Turn back on reporting of mobile radio active state
from the RIL.
- Fix bug in marshalling/unmarshalling that would cause
the UI to show bad data.

Change-Id: I733ef52702894cca81a0813eccdfc1023e546fce
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
992f25257938ecc0378514f21c6e6e6375272976 28-Apr-2014 Paul Jensen <pauljensen@google.com> Separate network and interface addition/removal netd APIs.
This should facilitate stacked interfaces (i.e. clatd).

Change-Id: Ib3e7a4d3847ef6ec4449451f6da42e75959baa4f
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
b2829fa165124264c7ec06a6e23b08a1d97b99e5 16-Apr-2014 Sreeram Ramachandran <sreeram@google.com> Specify netId when adding/removing routes.

Change-Id: I07fd950aee726e9721153f75c3e4c10d8e19d8e9
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
f047f2a8f49cd06d9cb94238861f4acce937d87b 16-Apr-2014 Sreeram Ramachandran <sreeram@google.com> Update netd API.

Remove:
- resetOldSockets from setDefaultNetId: netd takes care of this automatically.
- {add,remove}DnsServersForNetId: equivalent to "resolver setnetdns".

Change-Id: I819a8be216d07cf9a8c05f51745b64658027ed02
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
13e817df516a803fbedeacca2c802a9fc1c1370f 10-Apr-2014 Paul Jensen <pauljensen@google.com> Use NetId instead of interface name when communicating DNS changes to netd.

Change-Id: Ic82b73de6f50d39d56c5e1a32f5b1f3ebb80bb7d
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
e4bde7d475135252cfa799d337ebbb029ebaf937 11-Apr-2014 Sreeram Ramachandran <sreeram@google.com> Update the API for permission set/clear.

Change-Id: I1d10a5702a77cb24fa52016bb497d52270379f8a
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
913c895216c0cb248ed0ce910e69dd84b285c064 08-Apr-2014 Robert Greenwalt <rgreenwalt@google.com> Update netd interface

Adding netId for route changes

bug:13732575
Change-Id: Id171412a0f580f71398c9b0b8742acb1f3ef5a1e
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
568891d9282383747c418a59ee714281726f390a 04-Apr-2014 Robert Greenwalt <rgreenwalt@google.com> Add multinetwork netd calls

bug:13732575
Change-Id: I7f030bd63971ff71d32a221e50318c781e7f2370
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
9ba9c58e4a249456794fbfb9989f27bd846d067e 20-Mar-2014 Robert Greenwalt <rgreenwalt@google.com> First pass on multinetwork framework

Starting to switch netd to use NetId.
Adding the Network identifying class

bug:13550136
Change-Id: Ie0db4fb17c9300bfafb63329adfa02339911b33d
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
2ffa11e4b71c545e34533ef827bdc1a07fbe8246 22-Apr-2014 Dianne Hackborn <hackbod@google.com> Start collecting mobile radio activity from the radio.

Hook in to the new radio API to find out when the radio
is active and use that to track its state in batter stats.
We also still have the data being tracked from the kernel's
emulation, and continue to use that if we don't get data from
the radio.

Currently this monitoring is turned off until some issues
in the radio can be fixed that are providing bad data.

Also add a new API to get estimated drain and charge times.

Change-Id: Ifc4900fabb8f848f9cda361dce698664ea75f175
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
2c9f5475beabcc1c71d88b7c88d6029c3245be65 21-Apr-2014 Robert Greenwalt <rgreenwalt@google.com> Make sure events handled on same looper

Two handlers are used to call a function, but the init was not forcing them on the
same looper/thread, so we could get synchronization problems as a result.

Moved to a single looper.

Also added finally clauses to clean up if a broadcast throws an uncaught exception.

bug:13399768
Change-Id: I0044e2442335ee45a15588f910064e848cf6ac55
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
43111e897be9f79ababb0ecf99f155695416d956 24-Mar-2014 Dianne Hackborn <hackbod@google.com> Merge "Battery stats: wake locks, radio active, cleanup."
4590e52f3d0558e01322fe4dd55bb612afdfb079 24-Mar-2014 Dianne Hackborn <hackbod@google.com> Battery stats: wake locks, radio active, cleanup.

- Improve wake lock work source updates to also update the current
history tag, in case the new work source gets recorded in the
history.

- Fix bug in recording radio active time that was not distributing
any time to apps.

- No longer hold a wake lock while dispatching data conn active call,
since it comes with its own timestamp.

- Fix issue where the top app was not being cleared while the screen
was off.

- Remove obsolete STATS_LAST stats type.

- Fix bug that was not clearing the total run time when resetting
the stats.

Change-Id: Iabe17a9edf34f762374ae09fcffb8a819cf72e30
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
ff3bb2fe95a7d0158f5a456368eb7fa91069bc23 24-Mar-2014 Chad Brubaker <cbrubaker@google.com> am 7f623d6b: am 9506e84b: am c7726147: am 1fce89d9: am de4e7b49: Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev

* commit '7f623d6b9459bc982c49f0a74aa2c9911f8e1dd8':
Include the interface for clearDnsInterfaceForUidRange
a1bd79268be693f04f4adee90673d6ed400cc9fd 21-Mar-2014 Dianne Hackborn <hackbod@google.com> Battery stats: track actually running time

Use the uptime while creating the battery stats history to
generate a new event indicating when the CPU is actually running.
We can do this in combination with the new event reporting when
the CPU comes awake, looking at the difference between the
uptime and elapsed time at that point to determine when it last
when to sleep.

Also use this information to generate a new set of aggregated
states, the uptime caused by each wake reason.

Finally use new radio down timestamp to adjust the times we
compute for radio use. Note that this information is not (yet)
being used to adjust how these are recorded in the history.

Change-Id: I723b3b526c8e7d64de0cac9d1193e04132d5a3e4
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
9506e84b6f1b8a63abd5c7ecd580548386cc9aae 21-Mar-2014 Chad Brubaker <cbrubaker@google.com> am c7726147: am 1fce89d9: am de4e7b49: Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev

* commit 'c77261471432e1577586395dd0a6a481ef7431b5':
Include the interface for clearDnsInterfaceForUidRange
c77261471432e1577586395dd0a6a481ef7431b5 21-Mar-2014 Chad Brubaker <cbrubaker@google.com> am 1fce89d9: am de4e7b49: Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev

* commit '1fce89d946760a1bcf3a733f55494f963eab00c2':
Include the interface for clearDnsInterfaceForUidRange
0535a9f7aa5d0f875b06845e9af5f6dbfc5c8a19 13-Mar-2014 Ashish Sharma <ashishsharma@google.com> Include elapsed realtime (nanos) of the event in the radio state change notifications.

Bug: 13247811
Change-Id: I3454aa159a68b9087b4762df947b41965b5a3941
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
77b987f1a1bb6028a871de01065b94c4cfff0b5c 27-Feb-2014 Dianne Hackborn <hackbod@google.com> 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
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
d0c5b9abed60b7bc056d026bf0f2b2235410fb70 22-Feb-2014 Dianne Hackborn <hackbod@google.com> Improve how battery stats collects network stats.

This optimizes the path for battery stats to collect
per-uid network usage. It now collects wifi and mobile
usage separately, with a path that allows it to recycle
all data structures and filter out stats it isn't
interested in before they come back to java.

This is setting us up for the actual goal, to collect
mobile stats independently each time the mobile radio
goes down, allowing us to distribute mobile radio usage
across uids based on the number of packets they transferred
during a session.

Change-Id: I21a0f517cf087ea5aa8b8dd535e20b46e361a52b
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
d3b21393bfdd9adb6d5936f1f6c04b7c410261de 18-Feb-2014 Jeff Sharkey <jsharkey@android.com> am fef3dd01: am 41185c84: am df47ecaa: am 02a64dae: Merge "Tethering: Skip link local addresses when enabling NAT"

* commit 'fef3dd01fbad923bf7ff509f4ee95312fd7cb4db':
Tethering: Skip link local addresses when enabling NAT
41185c844fa7986ff3e5daa4c11288f6bed1463b 18-Feb-2014 Jeff Sharkey <jsharkey@android.com> am df47ecaa: am 02a64dae: Merge "Tethering: Skip link local addresses when enabling NAT"

* commit 'df47ecaa0973b80c9b97ef9ed3ad7abcfef361c7':
Tethering: Skip link local addresses when enabling NAT
e13c4c0b664dabdc069ca8f9601d96a337eb02f9 12-Feb-2014 Dianne Hackborn <hackbod@google.com> Start tracking radio up time.

We now always turn on network state tracking for mobile,
and push this information down to battery stats.

In battery stats we use this to both log the changes in
the history and keep track of the total time the mobile
radio was active.

Power computation is switched over to using this information
to help determine power use, which will hopefully make it
more accurate (not counting inaccuracies in knowing when it
actually goes down).

Note yet done is aggregating this data per-uid, to better
emphasize which apps are causing the radio to be up. Right
now we just spread the total time across all uids weighted
by the total number of packets they have sent and received.

Also put in the battery stats infrastructure for bluetooth to
address issue #12973036: Improve power_profile.xml

Change-Id: I39d11b7ff6ae4f336f253d1cba308d8569de7e0d
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/NetworkManagementService.java