Commit graph android_packages_modules_Co.../tests/net/java
Message SHA1
Merge "Replace InterfaceConfiguration usage with stable aidl" am: c0c71a50d6 am: 75cd8abbc7 am: 4ff4b9910f am: 50e11a6414
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1488356

Change-Id: I60b7d3c863121e4f766913c4b536795f6cc3b758

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-11-18 10:47:38 +00:00
bb26bd6f94
Merge "Replace InterfaceConfiguration usage with stable aidl"
Chiachang Wang   authored and   Gerrit Code Review   commited 2020-11-18 09:05:59 +00:00
c0c71a50d6
Replace InterfaceConfiguration usage with stable aidl
Replace InterfaceConfiguration with InterfaceConfigurationParcel
for the incoming ConnectivityService mainline since mainline
modules could not use @hide API.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I17ce8741e985fd30e3c8f0c34e79564a82890dc6

Chiachang Wang   commited 2020-11-18 14:46:13 +08:00
db04f067b0
Merge changes I6a48d4db,I6741c41c,Ifec6bde5,Icd0717c5 am: 38ec07ff9e am: 63fbab6e6a am: 99b7bcd09c am: 62229d3d33
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1490617

Change-Id: I2c5895c223a5843cfe11a1736a243b6847ad1b9a

Junyu Lai   authored and   Automerger Merge Worker   commited 2020-11-12 10:19:29 +00:00
e0873a4c09
Add hardware tethering traffic in testTethering test
Test: atest com.android.server.net.NetworkStatsServiceTest#testTethering
Bug: 162292214
Change-Id: Ifec6bde5fd3231f2135f12536c42e42ec6b707de

junyulai   commited 2020-11-12 14:22:31 +08:00
2fae9c3667
Remove unused getTetherStats
Before Android R, getTetherStats were used to collect tethering
iface stats of all clients who extends ITetheringStatsProvider,
which typically contains NetdTetheringStatsProvider and
OffloadController.

However, this always returns 0 since Android R, because:
  1. OffloadController implemented NetworkStatsProvider and no
     longer reports stats through getTetherStats.
  2. NetdTetheringStatsProvider always return 0 by design since
     non-offloaded iface tethering stats are already included
     in native iface stats.

This change is a no-op refactoring to remove unused
getTetherStats and update test which is not pratical.
Fix for offloaded tethering stats will be in follow-up CLs.

Test: atest FrameworksNetTests TetheringTests
Bug: 162292214
Change-Id: Icd0717c5c2807ae3bd98626b897e4b148f142815

junyulai   commited 2020-11-06 19:02:44 +08:00
10b443adbb
Merge "Replace Context @hide APIs" am: f021a81854 am: 8fabfb25c3 am: fe50f2ab24 am: bbc5a2473f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458063

Change-Id: I5241814fffc4ef794c07abca748d650c720576eb

Paul Hu   authored and   Automerger Merge Worker   commited 2020-11-05 09:51:13 +00:00
5202e6b0c3
Merge "Replace AppOpsManager @hide APIs" am: 12e9b2ecb5 am: 0631c7bc98 am: 35e3902531 am: c34ced274a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1469126

Change-Id: I3edb79a9e05efb0c898a393a7ab98cd9d3305466

Paul Hu   authored and   Automerger Merge Worker   commited 2020-11-05 09:50:51 +00:00
3a7da1101b
Merge "Replace Context @hide APIs"
Paul Hu   authored and   Gerrit Code Review   commited 2020-11-05 08:05:09 +00:00
f021a81854
Merge "Replace AppOpsManager @hide APIs"
Paul Hu   authored and   Gerrit Code Review   commited 2020-11-05 08:03:55 +00:00
12e9b2ecb5
DO NOT MERGE: Introduce DPMS shim for active DO/PO check
Introduce a shim into DevicePolicyManagerInternal &
DevicePolicyManagerService so that NetworkStatsAccessTest would not
diverge from internal development branches.

The DevicePolicyManagerService refactoring on the internal branch
removed isActiveAdminWithPolicy in favour of isActiveDeviceOwner and
isActiveProfileOwner.

These methods are being made available in AOSP for
NetworkStatsAccessTest.

Bug: 170459325
Test: atest NetworkStatsAccessTest
Change-Id: Ic7e0898989fb8222aaba2b35436765c04eb3250c

Eran Messeri   commited 2020-11-04 10:07:06 +00:00
5c91bdecce
Replace Context @hide APIs
Connectivity service module is using some Context @hide APIs but
they are not able to call after CS becomes a mainline module.
Thus, replace them with similar System APIs.

Bug: 170593746
Test: atest FrameworksNetTests
Test: Manully check that receiving intent and starting activity
      can work normally.
Change-Id: I0f5b53ce0da4e3fc0f927896e9a9e444048401bd

paulhu   commited 2020-11-04 00:02:42 +08:00
fa229ae8a5
Replace AppOpsManager @hide APIs
Connectivity service module is using some AppOpsManager @hide
APIs but they are not able to call after CS become a
mainline module. Thus, replace them with similar System APIs.

Bug: 170593746
Test: atest FrameworksNetTests
Change-Id: I51f66b64fcc3ebdbc2fddff8371eb8d9ff134137

paulhu   commited 2020-11-03 22:27:16 +08:00
1c15b17d78
Move module utils to the module package.
Test: FrameworksWifiTest FrameworksNetTest
Change-Id: I067eeecd458c34b7f2fbfa439072682661ac750c

Chalard Jean   commited 2020-11-02 10:01:30 +09:00
863fb9b9d9
Merge "NetworkNotificationManager gets NotificationManager locally" am: a13966feea am: d0034c56c1 am: 0776d454a2 am: 29001506d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459882

Change-Id: Ib82fdb4eb61b7d52e0011271da81c30606dbe3c3

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-10-30 11:54:12 +00:00
2e6e66df94
Merge "Replace NotificationManager @hide APIs" am: 39516dec37 am: 9fead7cb6e am: 91bf3e71e3 am: 6818725de8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1452435

Change-Id: Iaf9363492fb24714750314765439a4edec7d948c

Paul Hu   authored and   Automerger Merge Worker   commited 2020-10-30 05:04:17 +00:00
e5fcad7f3b
NetworkNotificationManager gets NotificationManager locally
It's confusing that NetworkNotificationManager uses
NotificationManager to put up notifcation which is passed from
ConnectivityService. And that NotificationManager should be
gotten from a context with UserHandle.ALL because the
notification should notify to all users. But the future developer
may not know this and pass incorrect NotificationManager
probably. Therefore, adjust the design that
NetworkNotificationManager will get NotificationManager locally.

Bug: 170593746
Test: atest FrameworksNetTests
Change-Id: Id65c998052b7b223171c5194ea46b49d7e84729d

paulhu   authored and   Paul Hu   commited 2020-10-30 03:37:50 +00:00
13cafd92b9
Merge "Replace NotificationManager @hide APIs"
Paul Hu   authored and   Gerrit Code Review   commited 2020-10-30 03:36:40 +00:00
39516dec37
Merge changes from topic "revert-1353490-revert-1323251-ipv6_prov_loss_quirk_parcelable-DVBHZDYMHA-MDHWFKJABZ" am: 780d3d2115 am: ee3d2e049d am: f7808179b4 am: c95be48120
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460265

Change-Id: I5c6bf738b8fc24c65e0ac256ed4b595cfb8a34fe

Xiao Ma   authored and   Automerger Merge Worker   commited 2020-10-29 07:28:15 +00:00
e75400be3d
Revert "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttributes""" am: ef20ba23a4 am: 8323b72ef0 am: c1d48c0444 am: 9180884b13
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460264

Change-Id: I0c28f689e056dc4ac5d6750c9f5c74ce49c8a103

Xiao Ma   authored and   Automerger Merge Worker   commited 2020-10-29 07:27:51 +00:00
eeafbc5738
Merge changes I6a51d803,I162fae5c am: b75c584971 am: 18013cefe3 am: 2d6e0ab8e7 am: fa1fc27d9b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473228

Change-Id: I40ff3cfcb4dbe7dc036eaa87df2fa192aee3f016

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-10-29 06:19:52 +00:00
1d6fc4f622
Merge "Replace hidden NMS interface to network API" am: 689399aa75 am: 667b09128d am: cf129dae9f am: 054053a6ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473224

Change-Id: Id97da9dda9bed8c182ea2fcd92c79d94bc619d52

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-10-29 06:19:30 +00:00
671a480929
Revert "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttributes""" am: ef20ba23a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460264

Change-Id: Ie13b2bb8037d85ab4782e06cfc31e108397fc78b

Xiao Ma   authored and   Automerger Merge Worker   commited 2020-10-29 06:09:44 +00:00
8323b72ef0
Merge changes from topic "revert-1353490-revert-1323251-ipv6_prov_loss_quirk_parcelable-DVBHZDYMHA-MDHWFKJABZ"
* changes:
  Add jarjar rule for IPv6ProvisioningLossQuirk.
  Revert "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttributes"""

Xiao Ma   authored and   Gerrit Code Review   commited 2020-10-29 05:39:16 +00:00
780d3d2115
Merge changes I6a51d803,I162fae5c
* changes:
  Replace hidden NMS API for setting MTU
  Replace hidden NMS default network configuration API

Chiachang Wang   authored and   Gerrit Code Review   commited 2020-10-29 05:03:43 +00:00
b75c584971
Merge "Replace hidden NMS interface to network API"
Chiachang Wang   authored and   Gerrit Code Review   commited 2020-10-29 05:02:21 +00:00
689399aa75
Replace NotificationManager @hide APIs
Connectivity service module is using some NotificationManager
@hide APIs but they are not able to call after CS become a
mainline module. Thus, replace them with similar System APIs.

Bug: 170593746
Test: atest FrameworksNetTests
Change-Id: I2644867cfc01d8d651c7029134294a9d44fdb471

paulhu   commited 2020-10-28 16:24:37 +08:00
e7a50004d8
Replace hidden NMS interface to network API
Replace the hidden NMS addInterfaceToNetwork and
removeInterfaceFromNetwork with calling INetd directly for
incoming ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Test: manually connect and disconnect network
Change-Id: I0f1f866be2f8084b992b340aeabfb5d62420686b

Chiachang Wang   commited 2020-10-28 14:38:18 +08:00
a93ddb250b
Replace hidden NMS default network configuration API
Replace the hidden setDefaultNetId and clearDefaultNetId NMS
APIs with accessing INetd directly for the incoming
ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Test: manually connect and disconnect wifi
Change-Id: I162fae5ca444207a037e5ac4bf8fa0a77a648ca1

Chiachang Wang   commited 2020-10-28 14:38:18 +08:00
c1fe7a0a37
Add jarjar rule for IPv6ProvisioningLossQuirk.
A new stable parcelable IPv6ProvisioningLossQuirk added in network
stack module, which is used to record the network quirk info which
causes IPv6 provisioning loss, e.g. the router lifetime in RA is 0
and the default route will be removed from LinkProperties.

Previously this change breaks CtsStrictJavaPackagesTestCases due to
a jarjar rule is missed. Also rename the package name based on the
revert change.

Also include slight stable AIDL package and variable rename.

Bug: 157534516
Test: atest CtsStrictJavaPackagesTestCases FrameworksNetTests
Change-Id: Ic2f6b75beefb574f7e2fb4c157667e7734eccd05

Xiao Ma   commited 2020-10-27 08:04:29 +00:00
1cd2532d26
Revert "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttributes"""
Test IPv6ProvisioningLossParcelable in the NetworkAttributes.

Bug: 157534516
Test: atest NetworkStackTests

This reverts commit_3740bfadadaaf268f92aaf35dd92e4ce432b39cb

Reason for revert:
Roll forward the previous change, as the CtsStrictJavaPackagesTestCases
breakage has been addressed by adding the jarjar rule in wifi module.

Change-Id: Ib4d70ce557cad98643c811b219f51e9b68179ee8

Xiao Ma   commited 2020-10-27 07:49:05 +00:00
ef20ba23a4
Merge "Using Context#getSystemService instead of ServiceManager#checkService" am: d769b3863e am: bb6fc081c2 am: 884546597e am: c93771dde5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1463902

Change-Id: If50e3be30fa1ba34c945736ed9a8a83fbe122b48

Lucas Lin   authored and   Automerger Merge Worker   commited 2020-10-23 05:01:48 +00:00
752bba2382
Using Context#getSystemService instead of ServiceManager#checkService
ConnectivityService is going to be a mainline module, it can only
use formal APIs or @SystemApi. So use public API -
Context#getSystemService() instead of hidden API -
ServiceManager#checkService().

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I9824caa7aec57e70f0ba405fcce39f9bc068732d

lucaslin   authored and   Lucas Lin   commited 2020-10-23 03:07:07 +00:00
f0d393d530
Merge "Do not use hidden SystemProperties.set" am: 93961f7b21 am: d7146b6742 am: b2d82398a6 am: 84ea88acb2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460971

Change-Id: Ie125f2d0d5605180189fa1dfbef70286ad79c23e

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-10-21 08:31:09 +00:00
4dae969c59
Merge "Do not use hidden SystemProperties.set"
Chiachang Wang   authored and   Gerrit Code Review   commited 2020-10-21 07:00:56 +00:00
93961f7b21
Merge "Remove unused MockableSystemProperties from DnsManager constructor" am: 3e23d7271b am: 250a9d3d20 am: 672ee3eef5 am: 67fcddf4f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466231

Change-Id: Id0b0b33e8156831222968ca68f289d206787d635

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-10-20 21:22:27 +00:00
a6d08e9723
Do not use hidden SystemProperties.set
ConnectivityService is going to become a mainline module, and
it will not able to use hidden method anymore. Thus, use
alternative new sysprop as API to control the tcp init rwnd
value.

Bug: 170917042
Test: adb shell getprop net.tcp_def_init_rwnd and check if
      value is set correctly
Test: atest FrameworksNetTests
Change-Id: If9e99c88de50b6829721b0dfacc430a3b53c7728

Chiachang Wang   commited 2020-10-20 19:35:01 +08:00
c43d68f0d0
Remove unused MockableSystemProperties from DnsManager constructor
DnsManager does not use MockableSystemProperties to communicate
with netd to configure the dns server anymore. ConnectivityService
does not need to take it into DnsManager as a parameter. Thus,
clean up the unused code.

Bug: 33308258
Test: atest FrameworksNetTests
Change-Id: I2ac89944391f7d1fd5d67f26cf7f2b11a4a4cf84

Chiachang Wang   commited 2020-10-20 15:46:30 +08:00
6710686910
Merge "Create service-connectivity.jar"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-10-20 06:09:41 +00:00
4a19a57729
Merge changes from topic "new-ipsec-api" am: 644a034eed am: e0dd7159d5 am: 24c72089d7 am: a818c55e65
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1398433

Change-Id: I18748127d0c97d9473c96678d556b03ad6048808

Yan Yan   authored and   Automerger Merge Worker   commited 2020-10-17 00:09:20 +00:00
85c79d51d4
Merge changes from topic "new-ipsec-api"
* changes:
  Expose new algorithms as public API
  Add new mandatory IPsec algorithms

Yan Yan   authored and   Gerrit Code Review   commited 2020-10-16 22:30:37 +00:00
644a034eed
Merge "Stop setting the legacy net.dnsX system properties" am: 61da71aa03 am: ab60aa4add am: 5e29d0c679 am: d8422c8eb4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1229561

Change-Id: I78ef627fdf0312cf84de53aa8da5f0bca466a6f3

Bernie Innocenti   authored and   Automerger Merge Worker   commited 2020-10-16 15:23:18 +00:00
26b8ea83f0
Create service-connectivity.jar
Create a new target service-connectivity to split
ConnectivityService from services.core.

Add ConnectivityServiceInitializer for initializing
ConnectivityService and add systemReady() in
ConnectivityManager so that SystemServer can call systemReady()
through ConnectivityManager which won't change current behavior.

Bug: 158268939
Test: make target-java, make host-java
      atest FrameworksNetIntegrationTests
      atest FrameworksNetTests
      make, device can boot,
      atest CtsStrictJavaPackagesTestCases
      wifi and mobile data work.
Change-Id: I99401772ba9c1c34adca20040da3c7c72d86ddd9
Merged-In: Ie732bfaf381404af0bb599ca2f421a96e7aa4257

Aaron Huang   commited 2020-10-16 22:46:14 +08:00
925d09b779
Stop setting the legacy net.dnsX system properties
These have been locked down via SELinux for a while and thus
they should be safe to delete at this point.

Test: atest FrameworksNetTest
Bug: 33308258
Bug: 148724751
Change-Id: I3a1e9c6ad92c8d2367e0048e5d6cd7d06bbc6e80

Chiachang Wang   commited 2020-10-16 08:19:25 +00:00
e62f378b9c
Add new mandatory IPsec algorithms
This CL adds new mandatory IPsec algorithms and allows
OEM to enable them on old devices using resource overlay

Bug: 161716062
Test: FrameworksNetTests:IpSecAlgorithmTest
Change-Id: Ib827b05ea27dbe61b14ad236e858f825293ed994

Yan Yan   commited 2020-10-15 17:35:17 -07:00
2274995a29
Create service-connectivity.jar
Create a new target service-connectivity to split
ConnectivityService from services.core.

Add ConnectivityServiceInitializer for initializing
ConnectivityService and add systemReady() in
ConnectivityManager so that SystemServer can call systemReady()
through ConnectivityManager which won't change current behavior.

Bug: 158268939
Test: make target-java, make host-java
      atest FrameworksNetIntegrationTests
      atest FrameworksNetTests
      make, device can boot,
      atest CtsStrictJavaPackagesTestCases
      wifi and mobile data work.
Change-Id: Ie732bfaf381404af0bb599ca2f421a96e7aa4257

Aaron Huang   commited 2020-10-16 02:29:04 +08:00
dfba5d17fe
Merge "Support dynamically update IMSI" am: 2d74c2e267 am: e981a87c00 am: 36b8c1d919 am: a33114824f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1418348

Change-Id: I5e5fc106aaab1b55302c38717cad9dbf1281baec

Junyu Lai   authored and   Automerger Merge Worker   commited 2020-10-13 04:46:38 +00:00
4475546bb0
Merge "Support dynamically update IMSI"
Junyu Lai   authored and   Gerrit Code Review   commited 2020-10-13 02:41:47 +00:00
2d74c2e267
Support dynamically update IMSI
Currently, NetworkStatsSubscriptionsMonitor will skip the
listener registration until the IMSI is available to deal
with SIM PIN locked case. However, this solution can only
handle the case that IMSI changes from/to null. And it also
relies on the assumption that IMSI never changes for a subId.

Thus, support dynamically update IMSI to handle IMSI changes
more robustly.

This patch also address leftover comments at ag/12400327.

Test: enable SIM PIN and manually test
Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdUnavailable
Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdChanged
Test: ./out/host/linux-x86/bin/statsd_testdrive 10082
Bug: 160941101

Change-Id: I625a5b10ee4806f6fee99c2d9d6c5e7977ff785e

junyulai   commited 2020-10-12 15:31:02 +08:00
c822fe5e07
Merge "Speculatively fix L2TP keepalive issues by reducing mtu" am: f67e00b803 am: d3bf9a15a0 am: 23a036cd42 am: e9e92b80ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399646

Change-Id: Iba6098badc018fa64b1c5fc20177b97a81a2e685

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2020-10-12 01:48:18 +00:00
052fe66496