The JavaDoc for many of the requestNetwork and
[un]registerNetworkCallback APIs incorrectly mentions the
PendingIntent version of the APIs instead of the NetworkCallback
version.
Also fix a minor issue in the registerDefaultNetworkCallback
JavaDoc: the default network request is an implementation detail,
so don't mention it. Instead, talk about the "system default
network".
Change-Id: Id94d98261daa2bd768c10e033cb8092729b21c91
am: 3e5055b -s ours
* commit '3e5055bec9570280638d5da0ef209765bba9dfaf': (546 commits)
Update studio landing page and add all-new install flow docs. bug: 27850063 (update system reqs for 2.0) bug: 27725026 (update download page for 2.0) bug: 23908299 (clean up download and get started)
docs: April 2016 Dashboard update
docs: Added new partner logos to the car brands section of auto index page.
Revert "Updates for Play" April Fool's joke.
Updates for Play.
docs: "Result is:" paragraph now in correct position on page.
docs: Fixed namespace shown in a line of style XML
docs: Add note about missing recording functionality in Live Channels
docs: NDK r11c - release notes and downloads
docs: Removed dead link in "create project" TOC.
docs: Corrected reference link for NotificationManager.notify().
docs: Added link to "preparing for multiwindow" blog post
docs: Clarified how multi-window applies to activities in task stack
[RenderScript] Update documentation about API level and RS Support Lib.
cherrypick from mnc-docs docs: Updated API changes for Dinar wearable support.
simplification and clarification to the Studio Overview
Substitute for placeholder text.
docs: Added missing semicolon within code sample.
docs: Fixed Marshmallow links in API level table.
docs: Update Nexus 9, 9G OTA images for N Preview
...
Change-Id: I2a64872d24ff2780503766f94e6d693edbdd47b8
Transport may use the redirect to make additional determination about network
state.
Bug: 25203607
Change-Id: I07d8918f13fdcbe0b6fd757536bfc1850a2a244f
Added not_metered capability to a mobile network if none
of its associated APN types are metered. Also used not_metered
capability to determine if a network should be accounted for
data usage or not instead of using network type, which is
always MOBILE after refactoring. Will add VT usage support
in next phase.
bug: 20888836
Change-Id: Id692cb856be9a47d0e918371112630128965b1bb
Callers with CONNECTIVITY_INTERNAL permission can read off the netId
that an application is assigned to by default.
Necessary for making connections as the default network for a client
app eg. when downloading stuff on its behalf.
Bug: 27074270
Change-Id: I8d35e8e99126875f55f3c545090326f3e9be43fb
Since Lollipop, routes are isolated within Networks. Flushing a
Network's DNS cache whenever that same Network's routes are updated
doesn't provide any benefit. Any system components depending on this
behaviour need to uncovered and fixed.
Additionally, clean up no-longer-used flushNetworkDnsCache(). This
should be replaced, when needed, by a proper binder interface to netd.
Change-Id: I34bf79e4839da014d466058a876d754209d0c007
There's a few advantages to having ApfFilter in IpManager:
1. If things go wrong, crashing a particular transport is less bad then
crashing ConnectivityService. We also don't want to use
ConnectivityService as a dumping ground for transport-specific logic.
2. This makes implementing WifiManager.MulticastLock a lot simpler and
safer because enabling/disabling it doesn't have to go through the
NetworkAgent, which could risk various races (e.g. installing a filter
into the wrong WiFi network).
3. IpManager is the ultimate source for LinkProperties for a particular
transport and since ApfFilter uses the LinkProperties it's better to
have it closely paired with the IpManager. Likewise, ApfFilter needs
to know the APF capabilities of the transport, so having it in
the transport avoids having to parcel this information through the
NetworkAgent.
Bug: 26238573
Change-Id: I99b85f2b64972f0e7572170ec5d1926081aa3429
Adds initial support for IP connectivity metrics collection (DHCP
client, IP reachability monitor, network monitor, connectivity
service).
Change-Id: If9a0455f2a34aa9abea90f9c1b38e4d895dc1a72
The "default network tracking" request is somewhere between a listen
and a request, in previous semantics. It is more like a listen in that
it doesn't cause any network to be brought up, but also like a request
in that will only get callbacks about a single network at a time (not
all networks that might match).
This change minimally splits the NetworkRequest types into 3: LISTEN,
REQUEST, and TRACK_DEFAULT.
Change-Id: I2d113b2f6eed526a7808592bce0118260a56f77c
Create a common singleton thread to be shared among all
connectivity tasks. Instead of launching separate threads to
handle downstream messages from the various service instances used
in connectivity, these managers can choose to share this instance.
Bug: 27695292
Change-Id: Idd1e37a3e793c5485091509c3d7351e4d29288f0
Occasionally, ConnectivityServiceTest fails with "BUG: only one
idle handler allowed". I have not been able to reproduce this
consistently, but code inspection reveals an unsafe access to
mIdleHandler inside queueIdle. Wrap that in a synchronized block.
Change-Id: I27307e2e55fa8d937d7f043bd436894091c3c667
1. Store additional debug information when RA filtering.
2. Add a toString method for RA packets.
3. Make "adb shell dumpsys connectivity apf" dump APF filter
state.
Bug: 26238573
Change-Id: I1441ff7bc90e63624f8b10a220b2ac97f4d390a5
Sometimes USER_UNLOCKED can be sent before USER_STARTED. This puts
lockdown in a bad state as it needs a fully-functioning user to tie
itself to and listen for connectivity events.
Bug: 27637943
Change-Id: I41a784a75a8c8674cb61dbba10693dd56c9396dd
Probably not a portal: exception java.net.SocketException: Binding socket to network 102 failed: EPERM (Operation not permitted)
If there are SYSTEM permissions, then the original is SYSTEM permissions,
do not update. If other app of this uid have network permissions, the same
as before do not update, or update permissions. If all app of this uid
do not have any network permission to remove permissions.
Change-Id: I304d22b37de38d8b182639c0d7d7200adfcf715d
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
am: 502d7cd551 -s ours
* commit '502d7cd551e8a510f818bbe85a038c4e60913ef7':
DO NOT MERGE: Move PinningNetworkCallback out to a new NetworkPinner class.
Listen for ICMP6 router advertisements on networks that support
packet filters. Construct packet filters and install them to
ignore redundant future ICMP6 router advertisements.
Bug: 26238573
Change-Id: If78300b9fda257c21f3ee6533e1da7de9f897cb4
1. Override WakeupMessage with an implementation that uses
sendEmptyMessageDelayed. This allows us to replace a
6-second sleep with a 150ms wait.
2. Change waitFor()'s polling interval from 100ms to 50ms.
With these changes ConnectivityServiceTest goes from ~9s to ~3s.
Change-Id: Id78aab9cded90a5b17f09d7f437904e179808dd2
Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.
The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.
Bug: 27364859
Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b