Commit Graph

3527 Commits

Author SHA1 Message Date
Nathan Harold
37baab43f7 Merge "Rework Exception Handling for IpSecManager" into pi-dev am: 16c671dc9a
am: 23d8eed9de

Change-Id: Ic1f560070d12f3bdeb5c07316aad7ebed9719f6f
2018-04-25 12:01:34 -07:00
Nathan Harold
23d8eed9de Merge "Rework Exception Handling for IpSecManager" into pi-dev
am: 16c671dc9a

Change-Id: I9c1acdc79053c70a8484935f61a537379b9be927
2018-04-25 11:51:00 -07:00
Nathan Harold
16c671dc9a Merge "Rework Exception Handling for IpSecManager" into pi-dev 2018-04-25 18:34:10 +00:00
Nathan Harold
ddeb90aa9d Rework Exception Handling for IpSecManager
In order to properly support EOPNOTSUPP this CL
applies a consistent approach to handling Exceptions.
Hereafter, all exceptions that aren't of a special
method-specific type (such as SpiUnavailableException)
will all be returned to the calling process unchanged.
At the API call site, the ServiceSpecificException,
which is really an Errno, will be inspected and either
converted to an unchecked exception for types we know,
or it will be converted to an IOException in cases where
that method can return a checked exception. In cases
where we do not expect an errno, we will simply throw
a generic RuntimeException. This means all API calls
will now properly throw UnsupportedOperationException
and may be CTS tested accordingly.

Bug: 72420898
Test: runtest frameworks-net
Change-Id: I4a00e221618896223fcdb4b4279fb14cd14e34d8
2018-04-24 19:04:08 -07:00
Lorenzo Colitti
4d121ff87f Merge "Actually @hide unwanted capability methods." into pi-dev am: a09c06a6c1
am: dc86aaa112

Change-Id: I923e5377a1abe761217612452cbfdba752e53de2
2018-04-24 14:50:14 -07:00
Lorenzo Colitti
dc86aaa112 Merge "Actually @hide unwanted capability methods." into pi-dev
am: a09c06a6c1

Change-Id: I80a88123b16c54734306da7e5dc0670972041648
2018-04-24 14:43:06 -07:00
Lorenzo Colitti
a09c06a6c1 Merge "Actually @hide unwanted capability methods." into pi-dev 2018-04-24 21:20:25 +00:00
Lorenzo Colitti
19c0ccaa8c Actually @hide unwanted capability methods.
Bug: 77601789
Test: builds, boots
Test: make doc-comment-check-docs
Change-Id: I7a913b83ab5110047d187564b3a1b0bbe1631942
2018-04-24 13:12:56 +09:00
Chalard Jean
1df73dd267 Merge "Add the list of private DNS addresses to LinkProperties" into pi-dev am: f12a2130a4
am: 1bb54ae872

Change-Id: I6bdbef78d078d68534c8e07e9af031ce374560ef
2018-04-20 04:59:52 -07:00
Chalard Jean
1bb54ae872 Merge "Add the list of private DNS addresses to LinkProperties" into pi-dev
am: f12a2130a4

Change-Id: I4b739c56e658690532ae9deb0b9a3bc9b2adf8b0
2018-04-20 04:49:43 -07:00
Chalard Jean
9419b11458 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
Jeff Sharkey
5ee9434e9c Merge "Return "null" cycles for deprecated callers." into pi-dev am: 9eb0a655cc
am: fcbbe0f9c7

Change-Id: Ie4d4431a56dc4b7062d547b9e6b7828c13a64cb5
2018-04-14 19:03:49 -07:00
Jeff Sharkey
fcbbe0f9c7 Merge "Return "null" cycles for deprecated callers." into pi-dev
am: 9eb0a655cc

Change-Id: Ibe9928effca29598c59f440018977474debbee4b
2018-04-14 18:39:00 -07:00
Jeff Sharkey
e67463db5f Return "null" cycles for deprecated callers.
Callers using the deprecated Pair<ZonedDateTime, ZonedDateTime>
interface don't always check hasNext() before calling next(), so
give them (null, null) results instead of throwing.

Bug: 78020489
Test: builds, boots
Change-Id: Ibaeac646fa4e12e3e748cd7c706524d51dbeaafe
2018-04-13 14:38:04 -06:00
Chalard Jean
53b2e589cd Merge "Add a new ssid field in NetworkCapabilities." into pi-dev am: 878d0e90b5
am: 8edf6543d2

Change-Id: I6dd1aba6fde5a502b4a9145cf16393d8ce623c89
2018-04-13 02:23:18 -07:00
Chalard Jean
8edf6543d2 Merge "Add a new ssid field in NetworkCapabilities." into pi-dev
am: 878d0e90b5

Change-Id: Ia1f4e51b7c2e9118789242cf6d9e7576c4167cda
2018-04-13 02:14:02 -07:00
TreeHugger Robot
878d0e90b5 Merge "Add a new ssid field in NetworkCapabilities." into pi-dev 2018-04-13 08:59:23 +00:00
Chalard Jean
b03a6229b8 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
dcc615a028 Merge "APIs to disable data usage notifications." into pi-dev am: f0b9fbebc0
am: 568a972669

Change-Id: I8bfcf47c10e5f43f963fe012e98d0afd83630e64
2018-04-11 16:51:25 -07:00
Jeff Sharkey
568a972669 Merge "APIs to disable data usage notifications." into pi-dev
am: f0b9fbebc0

Change-Id: I7b5bd380f00b6e94da79f43b354ecfc52df3f8e4
2018-04-11 16:14:26 -07:00
TreeHugger Robot
f0b9fbebc0 Merge "APIs to disable data usage notifications." into pi-dev 2018-04-11 23:05:03 +00:00
Jeff Sharkey
0a5570d49d 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
Nathan Harold
adff790058 Merge "[DO NOT MERGE] - Hide Tunnel Mode IpSec API" into pi-dev
am: 68e5f0f242

Change-Id: I2542b4dcb94b306e3fe2e3e87051f1bd6a481561
2018-04-11 11:39:56 -07:00
Nathan Harold
68e5f0f242 Merge "[DO NOT MERGE] - Hide Tunnel Mode IpSec API" into pi-dev 2018-04-11 17:09:07 +00:00
Pavel Maltsev
1b8c42d15f Merge "Remove unwanted capabilitiy from the java-doc" into pi-dev
am: 1856d61f9a

Change-Id: I7fef43cce3cfe17dae6a5e4f564ad8857371502a
2018-04-10 20:58:01 -07:00
TreeHugger Robot
1856d61f9a Merge "Remove unwanted capabilitiy from the java-doc" into pi-dev 2018-04-11 03:26:22 +00:00
Nathan Harold
0486b927b3 [DO NOT MERGE] - Hide Tunnel Mode IpSec API
Hide the tunnel mode of the IpSec API because
there is a disincentive to launch it without
a supported customer use case. That use case,
IWLAN is having its APIs hidden, so we should
hide these as well to avoid constraining future
implementation.

Also, due to issues with the lifetime of the NATT
management object, this API needs to be hidden
until such time as the lifetime of the Keepalive
can be handled independently of the lifetime of
a Transform.

Bug: 72523623
Test: compilation (api removal)
Change-Id: I076030bdbab1cd7d69f6a034577d529970b050dc
2018-04-10 19:24:07 -07:00
Jeff Sharkey
4862a62845 Merge "Disable roaming sanity checking." into pi-dev
am: 75f9459c21

Change-Id: I93bb07583ef90fb8c31c5c9a0c3e2c6e4968f975
2018-04-09 18:15:36 -07:00
Chad Brubaker
1c0e63f2fd Merge "Make isSameTrustConfiguration public API" into pi-dev
am: eed55b3b15

Change-Id: I0cfc2eda840f58194d7054930a3111a15a8b8e4b
2018-04-09 18:07:59 -07:00
Jeff Sharkey
4cd485f8e5 Merge "API council requested tweaks to SubscriptionPlan." into pi-dev
am: 5e0d360411

Change-Id: I447d4041d1dd0751147d13792b07d6617b27978a
2018-04-09 17:09:34 -07:00
Jeff Sharkey
75f9459c21 Merge "Disable roaming sanity checking." into pi-dev 2018-04-09 23:57:28 +00:00
TreeHugger Robot
eed55b3b15 Merge "Make isSameTrustConfiguration public API" into pi-dev 2018-04-09 23:53:18 +00:00
Jeff Sharkey
5e0d360411 Merge "API council requested tweaks to SubscriptionPlan." into pi-dev 2018-04-09 23:20:43 +00:00
Jeff Sharkey
2b3f6d5c4c 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
Benedict Wong
d74a971fc2 Merge "Force creation of Socket upon Transform application" into pi-dev 2018-04-09 20:55:30 +00:00
Pavel Maltsev
bb5b3af85f 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
Erik Kline
d7375ac9d7 Support bluetooth not using MultinetworkPolicyTracker
This required advancing the IpManager to IpClient refactoring
(Bluetooth used IpManager and friends). Most importantly, the
Bluetooth code used WaitForProvisioningCallback, so this is
moved into IpClient proper now. Also: some more renaming
cleanup.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 62476366
Bug: 72663849

Merged-In: I5e5b2c59ad3ea9ad574e8e683bcab3b09cfe0791
Merged-In: I89b45310181d952129fb2294db63654da9b4057f
Change-Id: I9eee2a9d5c31cdd48a054a7edc3403584efb1864
(cherry picked from commit 8d1fe54be1)
2018-04-09 03:05:37 -07:00
Erik Kline
08eab46ef9 Merge "Support bluetooth not using MultinetworkPolicyTracker" am: ed631bf5aa
am: bfcbe96fd0

Change-Id: I5e5b2c59ad3ea9ad574e8e683bcab3b09cfe0791
2018-04-09 02:47:01 -07:00
Erik Kline
bfcbe96fd0 Merge "Support bluetooth not using MultinetworkPolicyTracker"
am: ed631bf5aa

Change-Id: I889e58c1e102f6b0cddebed4454f30fad701b025
2018-04-09 01:51:34 -07:00
Erik Kline
8d1fe54be1 Support bluetooth not using MultinetworkPolicyTracker
This required advancing the IpManager to IpClient refactoring
(Bluetooth used IpManager and friends). Most importantly, the
Bluetooth code used WaitForProvisioningCallback, so this is
moved into IpClient proper now. Also: some more renaming
cleanup.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 62476366
Bug: 72663849

Change-Id: I9eee2a9d5c31cdd48a054a7edc3403584efb1864
2018-04-08 23:09:36 -07:00
Lorenzo Colitti
142f57e261 Remove unwanted capability code per API council feedback.
am: 4c6f4a65b6

Change-Id: I359aad5d7dceb2b188544db18424598decf14c08
2018-04-06 19:56:30 -07:00
Chad Brubaker
b8e1c6ec69 Make isSameTrustConfiguration public API
Test: make update-api
Bug: 77690898
Change-Id: Ie802287344faa1ed240f982efcc58e6fd671c3f2
2018-04-06 14:15:56 -07:00
Lorenzo Colitti
4c6f4a65b6 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
Benedict Wong
c96c65c6ca Merge "Update IpSecManager to use InetAddress and prefixLen" into pi-dev
am: b172d5b437

Change-Id: I03c0745662ab8868f719dc65c9ff8502e2ff817c
2018-04-05 17:34:11 -07:00
Benedict Wong
3f2c54b782 Update IpSecManager to use InetAddress and prefixLen
LinkAddress constructors are currently @hide; this change updates
IpSecManager to use InetAddress and prefixLen, and then construct a
LinkAddress internally. LinkAddress is used over the binder interface to
IpSecService to ensure validity.

Bug: 77528639
Test: CTS, Java unit tests ran on walleye
Change-Id: I19e124adef6d9f4992d8293db3190bcf74c95848
2018-04-05 17:41:11 +00:00
Jeff Sharkey
0fc6d03b62 API council requested tweaks to SubscriptionPlan.
Return new shiny Range<> object instead of Pair<>.  Tell developers
what permission to check on refresh broadcast.  Describe what
exceptions might be thrown, and that an empty list is okay.

Allow creation of plans with richer Period object, instead of forcing
them into rigid week or day options.

Protect SubscriptionPlan broadcast.

Test: atest android.util.RecurrenceRuleTest
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Bug: 74945820
Change-Id: I7e555798e0cfaa214ca93d9df627c6443fc5d986
2018-04-04 16:06:27 -06:00
Benedict Wong
16cec63d28 Merge "Force creation of Socket upon Transform application" am: 119cf2bc61
am: abcf07af81

Change-Id: I2034448a22461d51728e66bcc0e965821aa4a42f
2018-04-04 12:52:00 -07:00
Benedict Wong
abcf07af81 Merge "Force creation of Socket upon Transform application"
am: 119cf2bc61

Change-Id: Ia19da86a3fa40e309ff7a079307a8a63de8ba796
2018-04-04 12:43:36 -07:00
Benedict Wong
5e9b4c7c33 Force creation of Socket upon Transform application
This change forces Socket and DatagramSocket to populate the
SocketImpl, ensuring that the socket file descriptor can be
retrieved when applying Transport mode Transforms

This is done by calling getSoLinger(), triggering a getImpl(), which
triggers setImpl() if needed.

Bug: 77491294
Test: Added tests in IpSecManagerTest, ran on walleye
Merged-In: I40da08b031357710eb794e0f866aec5660c79594
Change-Id: I40da08b031357710eb794e0f866aec5660c79594
(cherry picked from commit d175a3d3a0)
2018-04-04 10:33:49 -07:00
Pavel Maltsev
88c39a1810 Merge "Add hasUnwantedCapability method" into pi-dev
am: c5138d2697

Change-Id: I7feec81a3f1525055030ee16f34b8e7251e79b9b
2018-04-04 10:15:10 -07:00