History log of /frameworks/base/core/java/com/android/server/net/BaseNetworkObserver.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c18cbfdf8d40e7a526a088225cb32341e1ea0920 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Notify network observers of route changes.

Bug: 9180552
Change-Id: If8432bc74335676320b815784b21f404d3479c35
/frameworks/base/core/java/com/android/server/net/BaseNetworkObserver.java
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/core/java/com/android/server/net/BaseNetworkObserver.java
64483947fdb03bf838e317ac0a4af5e0f53a5bbf 15-Nov-2013 Lorenzo Colitti <lorenzo@google.com> 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
/frameworks/base/core/java/com/android/server/net/BaseNetworkObserver.java
5ad421a3d00c92c155d57af9d1a05d81cc2fa88f 17-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Use LinkAddress in address notifications.

Currently address{Updated,Removed} pass in the address as a
string such as "fe80::1/64". Use LinkAddresses instead, since
that's what it is.

This makes the code more robust in the unlikely case that netd
passes in an invalid string. In the future we can move flags and
scope into the LinkAddress itself and simplify the code further.

Bug: 9180552
Change-Id: I66599f9529cf421caa7676fdd0141bb110b8589e
/frameworks/base/core/java/com/android/server/net/BaseNetworkObserver.java
5ae4a531cc31be2868f65c40e8636658f1ae2f06 31-Oct-2013 Lorenzo Colitti <lorenzo@google.com> Pass DNS server info notifications to observers.

These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.

[Cherry-pick of 416740ad4d9132005a71dc0883334e852235a18a]

Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
/frameworks/base/core/java/com/android/server/net/BaseNetworkObserver.java
5c7daac2e3d9020185699ba554d763b825ab1778 05-Aug-2013 Lorenzo Colitti <lorenzo@google.com> Notify IP address changes to interface observers.

1. Add addressUpdated and addressRemoved methods to
INetworkManagementEventObserver. (The -Updated method is not
called -Added because it gets called for both adds and
changes.) Update all its callers in the tree.
2. Make NetworkManagementService parse IP address notifications
from NetlinkHandler and call the address{Removed,Updated} on
its observers.

Bug: 10232006
Change-Id: Ieb185dbba052bdbff03caafc0cf5397a7f04dc6d
/frameworks/base/core/java/com/android/server/net/BaseNetworkObserver.java
df86a9f2e92d077386b146fe483b2cf14850737d 20-Aug-2013 Lorenzo Colitti <lorenzo@google.com> Make BaseNetworkObserver available to core code

Currently BaseNetworkObserver is in frameworks/base/services, but
there is code in frameworks/base/core that could use it. This
code typically extends INetworkManagementEventObserver.stub
because BaseNetworkObserver is not available.

Move BaseNetworkObserver to frameworks/base/core without changing
its package name, and use it to simplify two callers. The third
caller, Tethering, is much larger, and I'm not sure it's
appropriate to change it.

Bug: 10232006
Change-Id: Ifc0f2e619e3424e27e35730c048a1cc523df345e
/frameworks/base/core/java/com/android/server/net/BaseNetworkObserver.java