History log of /frameworks/base/core/java/android/net/NetworkRequest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3d4a10617c6d967aa0f07e129264e07320e99073 09-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Add a background NetworkRequest type for mobile data always on.

Like a normal (foreground) request, a background request is only
satisfied by one network and will keep that network up. Unlike a
foreground request, when a network only has background requests,
it will linger, and after lingering is complete, it will become
a background network.

Future CLs will cause the system to treat background networks
differently, e.g., by requiring different permissions.

Bug: 23113288
Change-Id: I40f735269dad1042eb04fea15e64584fc903ccb3
/frameworks/base/core/java/android/net/NetworkRequest.java
f4a45f4c330fb4035ceb4878e18a2f7c0c772ab2 18-Jul-2016 Lorenzo Colitti <lorenzo@google.com> Add an isListen method to NetworkRequests.

This allows simplification of the ConnectivityService code.

Bug: 23113288
Change-Id: I124544b99c5a920124e9a3d31cda8c6d2abc21fd
/frameworks/base/core/java/android/net/NetworkRequest.java
1ec11eb5bcd8dc2310ffc89b338cc01fad27b3ec 04-Jul-2016 Lorenzo Colitti <lorenzo@google.com> Unbreak unregisterNetworkCallback.

http://ag/1194313 broke unregisterNetworkCallback because the
system does not parcel the type of the request back to the app.
So when the app calls unregisterNetworkCallback, the
NetworkRequest that's passed in does not have a type and thus
doesn't match the request in mNetworkRequests.

Fix this by parceling over the type as well.

This was not caught by the unit test because the unit test all
runs in the same process with no parceling.

Bug: 23113288
Change-Id: I58b2ed651b9bf5cbdcca5b25c3ca24db53cffdf1
/frameworks/base/core/java/android/net/NetworkRequest.java
b35d40d4e2205475a4a3111bb5a9fbd7bc6b0ca3 01-Jul-2016 Lorenzo Colitti <lorenzo@google.com> Move the request type from NetworkRequestInfo to NetworkRequest.

This will allow us to simplify code that deals with
NetworkRequests outside ConnectivityService.

Bug: 23113288
Change-Id: I9b3a859d0c68cad73d7f6baa4b584d13ffd2ae36
/frameworks/base/core/java/android/net/NetworkRequest.java
ddb9ef0357e3ee609e188fb9e1e461f95aa601fa 18-Nov-2015 Etan Cohen <etancohen@google.com> Allow NetworkFactories to match any network specifier on a request

Current usage of NetworkSpecifier: network factory will match a request
if the request has either a (1) empty network specifier, or (2) a
network specifier which is identical to that of the network factory.
Note: 'matching' w.r.t. network specifier - all other matching rules
are still in effect.

Change: add rule (3) or the network specifier of the network factory
is the special string (which is defined as "*" and which user-facing
network requests aren't allowed to use).

Rationale: allows on-demand network creation.

Example:
- Can specify a Wi-Fi NetworkRequest with NetworkSpecifier="ssid"
- It will match a Wi-Fi network factory specifying NetworkSpecifier="*"
- That network factory will bring up a Wi-Fi network, connecting to the
specified SSID.
- Once the network is created it will create a NetworkAgent which will
now have a NetworkSpecifier matching that of the request (not the
match-all special string!)

That final step of making sure that the NetworkAgent matches the request
and not the match-all is critical to delivering any subsequent callbacks
correctly. I.e. your network will only get callbacks which match it.

Bug: 26192833
Change-Id: I49e3b492e0bb48a3f6e9a34e3f94f0e1cf89741f
/frameworks/base/core/java/android/net/NetworkRequest.java
86e7d135acbdb0055de6a687817d44ac60603c9f 05-Aug-2015 Paul Jensen <pauljensen@google.com> resolved conflicts for merge of dbc4edcc to mnc-dr-dev

Change-Id: I3a8624b2b375e0d174983d7690082e0e6932c4de
487ffe7d3d84bf65212158f7098e8a84b5b55e09 24-Jul-2015 Paul Jensen <pauljensen@google.com> Fix NOT_RESTRICTED network capability and enforce it.

With this change:
1. NOT_RESTRICTED should be removed from NetworkRequests that bring up
special restricted carrier networks (e.g. IMS, FOTA).
2. NetworkRequests without NOT_RESTRICTED require CONNECTIVITY_INTERNAL
permission to register
3. Binding sockets to networks without NOT_RESTRICTED requires
CONNECTIVITY_INTERNAL permission

Bug:21637535
Change-Id: I5991d39facaa6b690e969fe15dcbeec52e918321
/frameworks/base/core/java/android/net/NetworkRequest.java
c3f21f3b8b01508f5dc01b2e5fa4c3d652bb67bb 06-Jul-2015 Lorenzo Colitti <lorenzo@google.com> Support NetworkCallbacks based on signal strength.

Bug: 21405941
Change-Id: I2ed8a5aeb8dac464a4305671ed22abcacb485bc9
/frameworks/base/core/java/android/net/NetworkRequest.java
84b83c5a95c9822683eec5a348893c1afba17444 19-May-2015 Lorenzo Colitti <lorenzo@google.com> Add a hidden method to clear the capabilities of a NetworkRequest

Change-Id: I41d4f2229259d0bf9d68aa00f92f3bf4e2e71fbc
/frameworks/base/core/java/android/net/NetworkRequest.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/core/java/android/net/NetworkRequest.java
f5b74f981fb4e67f77a78b7038785fb3871acaa6 04-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> Catch creation of NetworkRequest without NetCap

Using reflection you could do this and it would crash the system.
Thanks, ServiceFuzzer!

bug:17379629
Change-Id: I8b470bda78a69761ccd92496746f5d295b5d07f2
/frameworks/base/core/java/android/net/NetworkRequest.java
5f90bccd96397f23b988c5e668b13f5344fd104b 10-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Add networkSpecifier string to NetworkCapabilties.

Allows transport specific network selectivity where multi-sim or sta+sta
is supported.

bug:1575597
Change-Id: I9c60fe7710e988c17d63236788b492a3ddd264a1
/frameworks/base/core/java/android/net/NetworkRequest.java
6078b50b017fbcf8d6cbf9f83226ed5667d5729e 12-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Apply API Council comments to ConnectivityManager

rename isNetworkActive -> isDefaultNetworkActive
rename registerNetworkActiveListener -> registerDefaultNetworkActiveListener
make listenForNetwork/requestNetwork take a NetworkRequest
rename NetworkCallbackListener -> NetworkCallback
rename listenForNetwork -> registerNetworkCallback
rename releaseNetworkRequest -> unregisterNetworkCallback
remove NetworkRequest param from NetworkCallback functions
rename onNetworkCapabilitiesChagned to onCapabilitiesChanged
remove onReleased
change time units in onLosing from Sec -> ms

bug: 15142362
Change-Id: Ibc96e3f461706efe1eafa0d85605249cfd6e9fdd
/frameworks/base/core/java/android/net/NetworkRequest.java
7569f1811f6061b2a6605c69bca1bb7af72ae1a0 09-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Make NetworkCapabilities publicly immutable.

Applying API council comments.

bug: 15142362

(cherry picked from commit Ie0bde68b72656a676d90c0343b9756fe9268d8d6)
Change-Id: Ie0bde68b72656a676d90c0343b9756fe9268d8d6
/frameworks/base/core/java/android/net/NetworkRequest.java
32aa65a11207e1fb7d346a68fdf3299f87a20db4 03-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Fix Legacy NetworkInfo API

Make the connectivity changed broadcasts send correct NetworkInfos.
Also update the results of getNetwork.

bug:15290306
bug:15191336
bug:14993207
Change-Id: Ie99ad25f3ebb90d18348e7013761b139e7481866
(cherry picked from commit 16fe1c18289de200d2249e51db8c0986619f487b)
/frameworks/base/core/java/android/net/NetworkRequest.java
d19c41c0bbd2de637eb6a52a49e0ebcd420cf2ba 19-May-2014 Robert Greenwalt <rgreenwalt@google.com> Add javadoc and unhide new API

Change-Id: I12e475bbf4000c7acec4ca27b1d3bf8f870cc2cf
/frameworks/base/core/java/android/net/NetworkRequest.java
34524f06fb77607884c69f891471725f4ac0889a 19-May-2014 Robert Greenwalt <rgreenwalt@google.com> Add javadoc for NetworkRequest.

Also moved the requestId serial number out of this public class into CS.

Had to leave NetworkRequest hidden for now because the docs refer to things still hidden
in ConnectivityManager.

Change-Id: I14d1fe52d992adf5e4dc197b8f5433e40b0adfe6
/frameworks/base/core/java/android/net/NetworkRequest.java
7b81602f3c18df8a4ca0342c514af8f7e394c0d7 19-Apr-2014 Robert Greenwalt <rgreenwalt@google.com> Enabling internal msg apis

NetworkFactory and NetworkAgent. First trying with wifi and
getting rid of WifiStateTracker.

Conflicts:
api/current.txt
services/core/java/com/android/server/ConnectivityService.java

Change-Id: I7f0ec13d7d8988b32f3c6dc71f72012f3349fe02
/frameworks/base/core/java/android/net/NetworkRequest.java
3c0bf5e536ea6ee59385065d1d4830d3647cffaf 12-Apr-2014 Robert Greenwalt <rgreenwalt@google.com> Add NetworkRequest to the multinetwork API

bug:13885501
Change-Id: I7b9a01aadf26b6ff104d088b6e283c838ec4dfac
/frameworks/base/core/java/android/net/NetworkRequest.java