Commit Graph

1301 Commits

Author SHA1 Message Date
Chalard Jean
3e0a46a439 Add the list of private DNS addresses to LinkProperties
Test: atest android.net.LinkPropertiesTest, also new tests pass
Bug: 73641539
Change-Id: If33a35b1354a67db09411ff098f20064797296ad
2018-04-20 16:48:43 +09:00
Chalard Jean
33ada883b8 Merge "Add a new ssid field in NetworkCapabilities." into pi-dev
am: f920300665

Change-Id: Ia1f4e51b7c2e9118789242cf6d9e7576c4167cda
2018-04-13 02:14:02 -07:00
TreeHugger Robot
f920300665 Merge "Add a new ssid field in NetworkCapabilities." into pi-dev 2018-04-13 08:59:23 +00:00
Chalard Jean
3ec2c0fc84 Add a new ssid field in NetworkCapabilities.
Bug: 77891227
Test: frameworks-net
Change-Id: Ifba33ecd48ccecce7e8f8d05ff70bb85653f6163
2018-04-13 15:38:35 +09:00
Jeff Sharkey
d43f738892 Merge "APIs to disable data usage notifications." into pi-dev
am: d6e54408bd

Change-Id: I7b5bd380f00b6e94da79f43b354ecfc52df3f8e4
2018-04-11 16:14:26 -07:00
TreeHugger Robot
d6e54408bd Merge "APIs to disable data usage notifications." into pi-dev 2018-04-11 23:05:03 +00:00
Jeff Sharkey
7403f8207b APIs to disable data usage notifications.
Certain carriers have requested the ability to disable the warning,
limit, and rapid data usage notifications shown by the OS, so give
them that ability on a per-subId basis.  (The notifications are still
enabled by default.)

Unhide NOT_CONGESTED to match setSubscriptionOverrideCongested().

Fix bug in getPrimarySubscriptionPlanLocked() to find the first
currently active plan; the first non-recurring plan may be no longer
active.  Fix bug in SubscriptionPlan which allowed invalid negative
or zero-length Period objects.

Bug: 77851691, 77506882, 77662747
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Test: atest android.telephony.cts.SubscriptionManagerTest
Exempt-From-Owner-Approval: SDK deadline, responding to API feedback
Change-Id: Ib6e6dbadd5022937c3f0661ab4b66aa617f0b5af
2018-04-11 22:07:40 +00:00
Pavel Maltsev
7b0fb3fa55 Merge "Remove unwanted capabilitiy from the java-doc" into pi-dev
am: d5b916a0a8

Change-Id: I7fef43cce3cfe17dae6a5e4f564ad8857371502a
2018-04-10 20:58:01 -07:00
TreeHugger Robot
d5b916a0a8 Merge "Remove unwanted capabilitiy from the java-doc" into pi-dev 2018-04-11 03:26:22 +00:00
Jeff Sharkey
a9d7daabce Merge "Disable roaming sanity checking." into pi-dev
am: aacd7eb672

Change-Id: I93bb07583ef90fb8c31c5c9a0c3e2c6e4968f975
2018-04-09 18:15:36 -07:00
Jeff Sharkey
ab5f8652d3 Disable roaming sanity checking.
We've traced down all code paths where NetworkInfo.isRoaming() and
NET_CAPABILITY_NOT_ROAMING can disagree, so we're only left with
noise that happens from NetworkAgent race conditions when someone
asks for a NetworkState between pending NetworkInfo and
NetworkCapabilities updates.

We can look at adding a way for a NetworkAgent to update these
two objects atomically, but not for this release.

Bug: 70174865
Test: builds, boots
Change-Id: I830e1fc6dc922e9eb7f8c2698d75181e00aaf7fb
2018-04-09 16:17:23 -06:00
Pavel Maltsev
47839a0cb4 Remove unwanted capabilitiy from the java-doc
Per API council feedback remove unwanted capaibility from public API
java docs

Bug: 77601789
Test: make docs
Test: build and flash
Change-Id: Ia7fd6d79546bf99448f8f2bda0370c7230ea4527
2018-04-09 13:16:00 -07:00
Lorenzo Colitti
9c5c37271c Remove unwanted capability code per API council feedback.
am: f4bdf74cd6

Change-Id: I359aad5d7dceb2b188544db18424598decf14c08
2018-04-06 19:56:30 -07:00
Lorenzo Colitti
f4bdf74cd6 Remove unwanted capability code per API council feedback.
The addition of hasUnwantedCapability was late in the release
cycle and does not simplify the API enough to be worth it. The
recommendation is, in a future release, to do something more
complete: not just add something like addUnwantedCapability, but
also deprecate all the NET_CAPABILITY_NOT_xxx constants and add
opposite NET_CAPABILITY_xxx constants for use with it.

Fix: 77601789
Test: builds, boots
Test: atest android.net.cts.NetworkRequestTest
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: Ib98fb01da4a4a0bae464787b589ad88f45002eb8
2018-04-06 23:02:51 +09:00
Pavel Maltsev
9c8a869f02 Merge "Add hasUnwantedCapability method" into pi-dev
am: 3d735d02d6

Change-Id: I7feec81a3f1525055030ee16f34b8e7251e79b9b
2018-04-04 10:15:10 -07:00
TreeHugger Robot
3d735d02d6 Merge "Add hasUnwantedCapability method" into pi-dev 2018-04-04 16:55:14 +00:00
Lorenzo Colitti
9b58dd356c Mark networks with OEM_PAID always restricted
Bug: 68762530
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Cherry-picked from AOSP with no conflicts

Merged-in: I173ee0a3bc1797d03ba34c5f025844eaada87ee4
Change-Id: I173ee0a3bc1797d03ba34c5f025844eaada87ee4
(cherry picked from commit efbacc0ccb70917b2782272e6b8f1a0fb3f56cbe)
2018-04-04 05:35:54 +00:00
Pavel Maltsev
2f3f53ee19 Merge "Make addUnwantedCapability method public" into pi-dev
am: 95f4b59348

Change-Id: I6d1676b72f125baf5b72e8718bd331a30b3c3c30
2018-04-02 21:47:22 +00:00
Pavel Maltsev
a389a03bd5 Add hasUnwantedCapability method
If you put values into the Builder, you should be able to observe
those values on the built object.

Test: atest android.net.cts.NetworkRequestTest

Bug: 74945408
Bug: 72828388
Change-Id: Ib4026b8d7370d570f1b606f0d221d00fed6e787d
2018-04-02 11:10:13 -07:00
TreeHugger Robot
95f4b59348 Merge "Make addUnwantedCapability method public" into pi-dev 2018-04-02 15:07:25 +00:00
Paul Jensen
6cdb34183b Fix socket leaks in various android.net.Network methods.
Bug: 72124526
Test: make CtsNetTestCases
Merged-In: I2a2254ce65c2176ae0be1d6276034b1bb0cad987
Merged-In: I23150482d6c2ab2eaa2b37732af68af69320792b
Change-Id: I3398b67272360f894e01a8cdfbc47b17d77c2330
(cherry picked from commit 55eaa09f96)
2018-03-30 12:20:35 -07:00
Pavel Maltsev
5e5bc33153 Merge "Add OEM_PAID capability to system api" into pi-dev
am: 07019bb20f

Change-Id: Ic164c4a29cd449a31b2f1c12c8c345bcc5dc77fa
2018-03-30 18:30:23 +00:00
Jeff Sharkey
c798269988 Merge "API council requested tweaks to NetworkRequest." into pi-dev
am: 93fc2b5049

Change-Id: I0d090ebb7d57689a061badcf593ae9a37d88f7ce
2018-03-30 18:22:13 +00:00
Pavel Maltsev
07019bb20f Merge "Add OEM_PAID capability to system api" into pi-dev 2018-03-30 16:32:52 +00:00
Jeff Sharkey
93fc2b5049 Merge "API council requested tweaks to NetworkRequest." into pi-dev 2018-03-30 16:30:24 +00:00
Paul Jensen
fffa078935 Merge "Fix socket leaks in various android.net.Network methods." into pi-dev
am: f26c5341a5

Change-Id: I2a2254ce65c2176ae0be1d6276034b1bb0cad987
2018-03-30 16:22:51 +00:00
Lorenzo Colitti
729b3b5f1f Merge "Add Network.fromNetworkHandle()" into pi-dev
am: c0b767a937

Change-Id: I22e68ab29982690dee5b2c0c6e1fbd47df0b0326
2018-03-30 14:55:48 +00:00
TreeHugger Robot
f26c5341a5 Merge "Fix socket leaks in various android.net.Network methods." into pi-dev 2018-03-30 09:47:51 +00:00
Lorenzo Colitti
3754e152e7 Merge "Mark networks with OEM_PAID always restricted" am: dbc568ceaf
am: e019e0e240

Change-Id: I88500f6add4f1a6c8a77eb976a489c11c7dc5b6d
2018-03-30 09:05:09 +00:00
Chalard Jean
24b861fa74 Merge "Clarify documentation for getActiveNetworkInfo and friends" am: b1016fbf14
am: bc4e495705

Change-Id: I339bb71182723907ed078e8be739c4d4ea2d1da5
2018-03-30 08:51:38 +00:00
Lorenzo Colitti
e019e0e240 Merge "Mark networks with OEM_PAID always restricted"
am: dbc568ceaf

Change-Id: I4ffcf01e1f79c8a3570ea2b819688b55904939fe
2018-03-30 08:47:25 +00:00
Chalard Jean
bc4e495705 Merge "Clarify documentation for getActiveNetworkInfo and friends"
am: b1016fbf14

Change-Id: I167776fb6ec44aff4b35b58378b54e3b55907427
2018-03-30 08:36:58 +00:00
TreeHugger Robot
039947df6a Merge "Clarify documentation for getActiveNetworkInfo and friends" into pi-dev 2018-03-30 08:22:29 +00:00
Lorenzo Colitti
dbc568ceaf Merge "Mark networks with OEM_PAID always restricted" 2018-03-30 07:00:54 +00:00
Pavel Maltsev
8cb5245570 Mark networks with OEM_PAID always restricted
Bug: 68762530
Exempt-From-Owner-Approval: OWNERS have approved, but gerrit doesn't see it
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest
Change-Id: Ieadef7c42634d890281543226203530fb18eb0a3
2018-03-30 07:00:39 +00:00
Chalard Jean
96d10a75b6 Clarify documentation for getActiveNetworkInfo and friends
For VPNs it's unobvious what these methods do, so document that.

Bug: 70917007
Test: Comment changes only. Checkdoc passes.
Change-Id: I31ec1aea356d88d969eaf9fc7d8c2ed13ce924eb
2018-03-30 12:22:06 +09:00
Paul Jensen
55eaa09f96 Fix socket leaks in various android.net.Network methods.
Bug: 72124526
Test: make CtsNetTestCases
Change-Id: I3398b67272360f894e01a8cdfbc47b17d77c2330
2018-03-29 07:43:01 -04:00
Paul Jensen
b895ac0fe6 Add Network.fromNetworkHandle()
This is the counterpart to Network.getNetworkHandle() and facilitates
native code calling back to Java with network handle values from
getNetworkHandle.

Bug: 77210159
Bug: 64148938
Test: make CtsNetTestCases

Change-Id: I032b959d84180c063a79ddd97c35e7384b0f50a1
2018-03-29 07:24:59 -04:00
Chalard Jean
33703ef8a7 Clarify documentation for getActiveNetworkInfo and friends
For VPNs it's unobvious what these methods do, so document that.

Bug: 70917007
Test: Comment changes only. Checkdoc passes.
Change-Id: I31ec1aea356d88d969eaf9fc7d8c2ed13ce924eb
2018-03-29 18:10:56 +09:00
Pavel Maltsev
089fe77ba7 Make addUnwantedCapability method public
Allow apps to specify a list of capabilities that network must not have
in order to satisfy the request.

Bug: 72828388
Test: m -j
Change-Id: I91ee54963f7b92899c7a107b3a450b268c62fd8d
2018-03-28 15:09:50 -07:00
Jeff Sharkey
e5886f37ec API council requested tweaks to NetworkRequest.
If you put values into the Builder, you should be able to observe
those values on the built object.

Test: atest android.net.cts.NetworkRequestTest
Bug: 74945408
Change-Id: I9aacceb82c98f7881f0eb5e1106d89d469b816a7
2018-03-28 14:02:00 -06:00
Pavel Maltsev
1868811e8f Add OEM_PAID capability to system api
Some system apps should be able to request OEM_PAID networks.  This
makes a lot of sense when Android is used as in-vehicle infotainment
systems.

Bug: 68762530

Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Change-Id: Ic916de7522a9f803a2410bc4e3e82101fd9d0dbd
2018-03-27 23:17:14 -07:00
Pavel Maltsev
51f4d8a11d Merge "Minor clean-up in NetworkCapabilities" am: 539f85a18d am: b1e2bfe4df
am: 8a956a5141

Bug: 72828388
Test: frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Change-Id: I2f45d2c70c7c0142ae3b3ce9e6329c5f25b63380
(cherry picked from commit feb8d1498a822730e29cf346fe3382e3f5293a58)
2018-03-27 22:45:49 +00:00
Ricky Wai
24c776f0c4 Merge "Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc" into pi-dev
am: 2ce1e6ce2a

Change-Id: Ic3de4d136a995a8291fb43c780a311e423aeb9b7
2018-03-26 17:01:45 +00:00
Ricky Wai
2ce1e6ce2a Merge "Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc" into pi-dev 2018-03-26 16:46:20 +00:00
Chalard Jean
cc097d159f Merge "Have the status bar listen to all macro-users VPN changes." am: 90988528c3
am: cdb95af156

Change-Id: Ib4daa5f4136662721794bd8bcd4f185cb2944824
2018-03-23 09:29:28 +00:00
TreeHugger Robot
749299b1c5 Merge "Have the status bar listen to all macro-users VPN changes." into pi-dev 2018-03-23 09:26:46 +00:00
Chalard Jean
cdb95af156 Merge "Have the status bar listen to all macro-users VPN changes."
am: 90988528c3

Change-Id: Icc4fe4fbdb75c90abaaee8009f08f1220536686e
2018-03-23 09:22:36 +00:00
Chalard Jean
3f05f98daa Merge "Have PermissionMonitor arbiter which app can access background networks"
am: 433c0e652f

Change-Id: Ic05e362af58d667b5be84c3bd421c9250927abe2
2018-03-23 08:12:51 +00:00
Chalard Jean
90988528c3 Merge "Have the status bar listen to all macro-users VPN changes." 2018-03-23 07:33:02 +00:00