summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-03-23Merge "Use setServiceForTest instead of static mocking" into rvc-devRemi NGUYEN VAN
2020-03-19Merge "Detect upstream hotspot device type by checking the vendor specific ↵TreeHugger Robot
IE." into rvc-dev
2020-03-19Update the title & description of notificationLucas Lin
Refer to the UX design doc to fix the title & description. Bug: 150903640 Test: 1. Build pass 2. atest NetworkStackTests 3. Manual test to see if the title & description are shown as expected Change-Id: I5ab49a3b5b220e144c69627eb9d02c6ddc438716 Merged-In: I354f9f19aa4d8057b49833107c8bd4d9c67d5525 (cherry picked from commit 07c905836d8a0d153ad3f02421b9776a0cee1108)
2020-03-19Use setServiceForTest instead of static mockingRemi NGUYEN VAN
setServiceForTest makes the mocking more straightforward. Test: atest NetworkStackTests NetworkStackNextTests Bug: 151243982 Change-Id: Iada89e246faaeb13dc724c9b7591350bbad2b177
2020-03-19Merge "Use NetworkStack.getService in NetworkStackClient" into rvc-devRemi NGUYEN VAN
2020-03-18Detect upstream hotspot device type by checking the vendor specific IE.Xiao Ma
Checking a particular IE (vendor specific) in the wifi scan results to identify upstream hotspot device type, meanwhile also checking if the ssid matches with the network which the downstream device is attaching to. Bug: 137835398 Test: atest FrameworksNetTests NetworkStackTests NetworkStackIntegrationTests Test: 1.attach to upstream hotspot device by selecting the sanned ssid from wifi settings, then check the OUI, vendor specific type fileds of IEs from the logcat. 2. build network stack module and install on Q device, verify wifi works normally. Merged-In: I8a3212fa066bdc8bf889768f92569891a3cb2408 Merged-In: I57c709c5da984accbbb389ab8d1295eae01328c6 Change-Id: I8b0ea9542775aecc13ed8ceede80abd693002825
2020-03-18Use NetworkStack.getService in NetworkStackClientRemi NGUYEN VAN
This avoids returning IBinder in Context.getSystemService, having a dedicated getter for the NetworkStack AIDL interface instead. Test: atest FrameworksNetTests NetworkStackTests Bug: 151243982 Change-Id: Ibeaeff5890631e14581a084863d9aeb3178c5d5c
2020-03-17Merge "[SP21.2] Address comments for API council review about aosp/1172143" ↵Junyu Lai
into rvc-dev
2020-03-17[SP21.2] Address comments for API council review about aosp/1172143junyulai
This is modified since the shape of API is changed in the counter-part CL. Test: atest FrameworksNetTests FrameworksTelephonyTests Test: atest TetheringTests NetworkStackTests Fix: 148552904 Change-Id: Idaeb921f6f87c507766566e145838647d47284bd Merged-In: I1d377ee277e9c21e398d7446b1db28c877cbe6b2 (cherry picked from aosp/1253986)
2020-03-17Provide RRO to configure neighbor unreachable probes parameters.Automerger Merge Worker
Bug: 130871097 Test: atest FrameworksNetTests NetworkStackTests Merged-In: Idc2c4303640d4fd3fc29dd0957771088820030ff (cherry picked from commit f540206076ca0e55d685ef81e3e04da3e9a654cf) Change-Id: Icd69008635461aa24d976f9b9d2d0ef1d60e23d5
2020-03-16Merge "Address aosp/1199568 leftover comments" into rvc-devPaul Hu
2020-03-15Let testable callbacks use Network directlyAutomerger Merge Worker
In retrospect it's surprising we didn't have this already but the need didn't arise. Bug: 139268426 Test: NetworkStackTests Change-Id: If0616c60bac301c7d983d94474cd4264bf7df214 (cherry picked from commit 85a253dccab12e9c6b5b83ee5bec264a2c9ec173)
2020-03-10Address aosp/1199568 leftover commentsAutomerger Merge Worker
Bug: 139269711 Test: atest NetworkStackTests NetworkStackNextTests Change-Id: I6e4f16e70b290ce6a3566b92e5946c65075971a1 Merged-In: I6e4f16e70b290ce6a3566b92e5946c65075971a1 (cherry picked from aosp/1240746)
2020-03-10Use redirect URL to start webviewAutomerger Merge Worker
NetworkMonitor will detect captive portal and may get a redirect URL from WiFi AP. Redirect URL should able to send to captive portal app to open the webview instead of detecting again by captive portal app. Bug: 134892996 Test: Manually test with captive portal AP Test: atest NetworkStackTests NetworkStackNextTests Change-Id: Idf363c79b7243a899121be8a68b32d0541dff14f Merged-In: Idf363c79b7243a899121be8a68b32d0541dff14f
2020-03-09Add an annotation for ignoring tests by dev SDKAutomerger Merge Worker
Contrary to androidx.test.filters.SdkSuppress, this annotation considers the SDK to be higher than the Build.VERSION.SDK_INT reported by the device when the device is not using a release SDK. For example, an aosp/master build based on SDK 29 is considered to have a development SDK that is strictly higher than 29. Test: atest CtsNetTestCasesLatestSdk:android.net.CaptivePortalTest using the change on a Q build and an AOSP build. Bug: 150918852 Merged-In: Ibaea05565bd8a362e829cdd1e5420aa2881b0889 (cherry picked from commit f30540f24e1713fe2d29f2e313b7522b4e7de089) Change-Id: I57f95d4673031a1ff58218bf4c79bb26b7eaa16d
2020-03-04Merge "Update Constructor of CellIdentityLte" into rvc-devNathan Harold
2020-03-03Update Constructor of CellIdentityLteNathan Harold
As part of updating the constructor for CellIdentityLte to make an API guideline compliance change, the constructor needs to be updated to take an int[] instead of Collection<>. Need to make this change to fix a unit test breakage. Bug: 150399894 Test: atest NetworkMonitorTest Change-Id: Ib985daa4374a92e973948056727a42c993ca8eab
2020-03-03Remove unused NetworkInfoAutomerger Merge Worker
Bug: 127603877 Test: atest NetworkStackTests Change-Id: Iec1150e1166c7e8cf92de9b1e6d4874f5f5bd431 Merged-In: Iec1150e1166c7e8cf92de9b1e6d4874f5f5bd431 (cherry picked from commit a4c99e4a7076832744ba23868b05d3a775b5ad60) (Original aosp commit aosp/1247410)
2020-02-24Added bands from HAL 1.5Jack Yu
Test: Manual + NetworkStackTests Change-Id: I77071b2edad98c632563d28827085cfcdcbed2f3 Fix: 149475773
2020-02-20Add ModuleNetworkStackClientRemi NGUYEN VAN
NetworkStackClientBase / ModuleNetworkStackClient extract functionality from NetworkStackClient in services.jar, only keeping what is needed for modules to communicate with the NetworkStack, and not the framework code that starts the NetworkStack (and uses hidden APIs). As the NetworkStack is started asynchronously, it is possible for it not to be registered yet right after boot, so some polling is implemented to queue requests until it is ready. NetworkStackClient will inherit from NetworkStackClientBase so that components in services.jar can access the NetworkStack, using the same asynchronous mechanism as before (execute pending requests once the service is connected). Bug: 147255753 Test: atest NetworkStackTests NetworkStackNextTests FrameworksNetTests Change-Id: I130aabb3992280d875e0d20b16bc09a9e0261fda
2020-02-20Merge "Add captive portal info to DhcpClient output"Xiao Ma
2020-02-20Merge "Show notifications after capport login"Chalard Jean
2020-02-19Add captive portal info to DhcpClient outputRemi NGUYEN VAN
Requesting the captive portal option is flagged off by default. The URL it provides will be used to support the captive portal API; see RFC7710bis. Bug: 139269711 Test: atest NetworkStackTests NetworkStackNextTests Test: atest NetworkStackIntegrationTests NetworkStackNextIntegrationTests Change-Id: I783466e0e60f364e79cd76af3fe43a7862d35cf2
2020-02-19Show notifications after capport loginRemi NGUYEN VAN
Add NetworkStackNotifier to manage notifications created by NetworkStack. NetworkStackNotifier handles the "connected" notifications shown after connecting to a captive portal, which may contain information sourced from the captive portal API. Test: atest NetworkStackTests Bug: 139269711 Change-Id: Iaf96f7e5f02be04b098230316595ad4c0777a9d8
2020-02-19Add a hasMacAddress member to InterfaceParams.Lorenzo Colitti
This is a convenience function for callers who would like to know whether the interface has a MAC address. It is needed because the constructed object will have a MAC address of 02:00:00:00:00:00 if the interface did not have a MAC address. Test: added minimal unit test coverage Change-Id: I422422d032afbbabcf8594def76702bb053f0a96
2020-02-19Merge "Send the capport fields to the system server."Chalard Jean
2020-02-19Merge "[SP13.1] Add assert equals function for NetworkStats"Junyu Lai
2020-02-18Merge "Update version check for notifyNetworkTested() call."Cody Kesting
2020-02-18Send the capport fields to the system server.Chalard Jean
The fields are behind a protection method to avoid inadvertently sending private data to apps. This is going to the system server which needs those fields. Test: NetworkStackTests Change-Id: I7c9a7a82efa364835164622d2e93977e0bcd3d8c
2020-02-18Never register a null lease callback.Lorenzo Colitti
Bug: 149458372 Test: new unit test Test: tethering no longer crashes Change-Id: Ic5f709c1ce50d3bb7af26a698dd32adb87012316
2020-02-18Revert "Revert "Add DhcpLeaseCallbacks""Lorenzo Colitti
This reverts commit e8fff42022f8c22e84d51bc093189d469bdd9af1. Bug: 135411507 Test: atest NetworkStackTests Change-Id: I0609301d7b37309a35c764a7551b0ca93b3faeee
2020-02-15Add CaptivePortalData fetching to NetworkMonitorRemi NGUYEN VAN
When a capport API URL is sent through notifyNetworkConnected or notifyLinkPropertiesChanged, NetworkMonitor will (re)evaluate to fetch the data, and report it back via notifyCaptivePortalDataChanged. Test: atest NetworkStackTests NetworkStackNextTests Bug: 139269711 Change-Id: I101e2b2799d399fa7b560bf5ea3d86dac7ba1be9
2020-02-14[SP13.1] Add assert equals function for NetworkStatsjunyulai
Test: atest ImsPhoneCallTrackerTest FrameworksNetTests Fix: 143923500 Change-Id: I673a8ebcf081efe17e266e5ae6ec417a0a9c57f8
2020-02-14Merge "Add NetworkStack utilities for reading text"Remi NGUYEN VAN
2020-02-14Add NetworkStack utilities for reading textRemi NGUYEN VAN
The utilities will be useful for: - Implementing the captive portal API - Implementing generic probes based on regular expressions Test: atest NetworkStackTests Bug: 139269711 Change-Id: I17a9564033f985af9061534f5cffcc8a0e70f9ed
2020-02-13Merge "Revert "Add DhcpLeaseCallbacks""Treehugger Robot
2020-02-13Revert "Add DhcpLeaseCallbacks"Remi NGUYEN VAN
This reverts commit dc018dd943f0c11e0b9172dee0db0966871af20d. Reason for revert: crashes tethering: b/149458372 Bug: 149458372 Change-Id: I1fad8528443d8cc133f719aad042cb22d3a8e2a0
2020-02-13Merge "Add ScanResultInfo object in ProvisioningConfiguration parcel."Xiao Ma
2020-02-12Merge "update structure of TcpInfo"Chiachang Wang
2020-02-12Merge "Add DhcpLeaseCallbacks"Remi NGUYEN VAN
2020-02-12update structure of TcpInfoChiachang Wang
The TCP infoamtion will be kept for evaluating data stall. The memoery usage inside TST will increase based on the number of TCP sockets exist in the device. For the evaluation, TST needs only 4 fields from TcpInfo. The others are redundant currently. Thus, keep only necessary field inside TcpInfo to reduce the memory usgae. Bug: 148115807 Test: atest NetworkStackTests NetworkStackNextTests Test: manual test to check memory change Change-Id: I35275f3d77bbf1e076f2fd327a961278fe038b63
2020-02-12Add DhcpLeaseCallbacksRemi NGUYEN VAN
The callbacks will be used by Tethering to provide callbacks when DHCP leases are updated. The current design only supports one client as Tethering may want to send callbacks to multiple callers, but DhcpServer is only owned by Tethering. Bug: 135411507 Test: atest NetworkStackTests Change-Id: I1e44221d6fbd1b1f2d0d0057a29c7445af1cdbcf
2020-02-11Merge "Add AndroidTest_Coverage.xml"Remi NGUYEN VAN
2020-02-10Update version check for notifyNetworkTested() call.Cody Kesting
NetworkMonitor checks the version of INetworkMonitorCallbacks used by the platform before invoking notifyNetworkTested() or notifyNetworkTestedWithExtras(). The version number used for checking is currently 5. However, this should be changed to 4, as the functionality for notifyNetworkTestedWithExtras() is actually being added in version 5 of the callback. Bug: 148032944 Test: atest NetworkStackTests Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest Change-Id: I2337120fe70f75c072a9286038e66065fddcf857
2020-02-10Add ScanResultInfo object in ProvisioningConfiguration parcel.Xiao Ma
Since wifi.ScanResult doesn't implement specific equals() yet, for comparing the ProvisioningConfiguration object better, this change encapuslates ScanResult#SSID and ScanResult#InformationElement member into a new class: ScanResultInfo inside ProvisioningConfiguration. Adding ScanResultInfo object in ProvisioningConfiguration parcelable is to check the InformationElement filed when starting IpClient and detect whether or not the specific OUI is included in the IEs. Bug: 137835398 Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests Change-Id: I247ac7f343ef3e99b64b93b45549e2a25980a407
2020-02-07Merge "Improve NetworkMonitor testing for ConnectivityDiagnostics."Cody Kesting
2020-02-07Merge "Skip getConnectionOwnerUid tests on Q"Remi NGUYEN VAN
2020-02-07Skip getConnectionOwnerUid tests on QRemi NGUYEN VAN
The tests verify platform behavior of getConnectionOwnerUid for a bug fixed in Q-QPR2, so cannot be run on all Q images. Bug: 149063891 Test: atest NetworkStackTests Change-Id: I7ffc1afbe80e8f8076be78bd74d7cc8f1e47dad2
2020-02-06rm libbinderthreadstateSteven Moreland
This library is empty, and its functionality has moved into libbinder/libhwbinder. Bug: 148692216 Test: N/A Change-Id: I37092edfc4576af57d6c35974d7cb00153065f80
2020-02-06Improve NetworkMonitor testing for ConnectivityDiagnostics.Cody Kesting
This change improves testing for changes made to NetworkMonitor for passing data through to ConnectivityDiagnostics inside ConnectivityService. Specifically, this test adds stronger assertions on the contents of the PersistableBundles passed in notifyNetworkTestedWithExtras and notifyDataStallSuspected. This change also reorganizes how ArgumentMatchers are utilized in verifying the contents of the PersistableBundles. Bug: 147249364 Bug: 143187964 Test: atest NetworkStackTests Change-Id: Iead78a102e26b43f1b7329166a83bf34a6a52b0f