Commit graph android_packages_modules_Co.../tests/unit/AndroidManifest.xml
Message SHA1
Add QUERY_ALL_PACKAGES to FrameworksNetTestsLib
Although the launcher should be visible due to the <queries> declaration
in the manifest, there are sometimes flakes indicating that the access
to the package was blocked due to visibility rules.

Try adding QUERY_ALL_PACKAGES to see whether it resolves the flakes.

Bug: 286550950
Test: atest
Change-Id: I24dcf19c040b63fea55f82db412ffcd40670e6fc

Remi NGUYEN VAN   commited 2023-09-19 15:32:21 +09:00
a52bd9f46d
Allow jarjar com.android.server*
Jarjar com.android.server* and adjust the test by jarjar
FrameworksNetTestsLib to make sure the test cases still can access
package sope fields. Don't auto-jarjar non-connectivity module tests
in FrameworksNetTests because some non-connectivity module test cases
rely on service.core and service.net. The reason why not auto-jarjar
whole ConnectivityCoverageTests because tethering doesn't adopt
auto-jarjar-gen yet. The coverage test must jarjar the same as module so
that test coverage can calculate correctly.

Remove com.android.server* from proguard becasue it already be covered
by android.net* after jarjar'ed.

Move MetricsTestUtil to non connectivity module test group because it
only be used for IpConnectivityEventBuilderTest which is non connectivity
module test. Only jarjar the util without jarjar the caller make the test
failure.

Bug: 248001529
Test: atest ConnectivityCoverageTests FrameworksNetTests

Change-Id: I8439341ef4c03f29697fdf34557ea8ef2825d691

Mark   commited 2023-02-14 15:43:43 +00:00
53e71c3f3f
Wait for launcher is shown after calling pressHome
In current code, the test will call pressHome before show
network notification but it does not verify the home screen
is shown. The test might be failed due to the notification
shade is still opened. Thus adding an assertion to verify
the launcher is shown.

Bug: 255643296
Test: FrameworksNetTest:NetworkNotificationManagerTest
Change-Id: Iee3476a26030b9ba72994dee624e0e6974c9369f

Aaron Huang   commited 2022-11-21 10:47:58 +00:00
2c07b827e7
[SettingsProvider] fix connectivity test
TestOnly flag allows the test to read restricted @Readable setting
ALWAYS_ON_VPN_LOCKDOWN_WHITELIST.

BUG: 177239688
Test: atest com.android.server.ConnectivityServiceTest
Change-Id: If41708ad31de9cec3a102b4de4d237e96a448ef1

Songchun Fan   commited 2022-04-20 09:29:40 -07:00
0cb706a0f4
Add overlay options for no internet notifications
Add an option to display the no internet dialog directly instead of
showing a notification when the notification would have been high
priority (typically when the network was explicitly selected). This is
disabled by default, but allows device manufacturers to use a slightly
more disruptive UX to ensure that the user is aware that the network has
no connectivity, and can take action.

Also add an option to show the same notification as "no internet"
instead of the "partial connectivity" notification. This is also
disabled by default, but allows device manufacturers to use the "no
internet" text if they feel that "partial connectivity" text is hard
to understand for the user.

Bug: 193847396
Test: atest NetworkNotificationManagerTest
Change-Id: Ib5bd74d8cf973bf70d373dd63648c178fae0ebae

Remi NGUYEN VAN   commited 2021-08-04 11:23:03 +09:00
5dc6ca0318
Merge "Revert "Use mockito-extended in FrameworksNetTests""
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-06-11 01:26:44 +00:00
a6c06af0fa
Revert "Use mockito-extended in FrameworksNetTests"
This reverts commit 98b76cc2ec.

Reason for revert: <INSERT REASONING HERE>

b/190622577

Change-Id: Ief39f82875e6fa885829aea62eed00f2f2e6774e

xingdai   commited 2021-06-10 21:41:54 +00:00
892a0ef152
Deprecate MANAGE_ACTIVITY_STACKS permission
This is a partial cherry-pick of change:
I894ee66e058b1024a731d3be4b33b69626451f08

The permission is actually not used, but this change aligns the manifest
with contents in downstream branches, so it can be modified (including
removing the permission) without conflicts.

Bug: 157876448
Test: atest FrameworksNetTests
Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Change-Id: Id50e41a0ea970350eae0a2afab303c022b452bf9

Remi NGUYEN VAN   commited 2021-06-09 19:28:10 +09:00
f900c45afa
Use mockito-extended in FrameworksNetTests
This is necessary to mock classes like BatteryStatsManager, which cannot
be used without signature permissions, and to merge the test with other
test suites that use mockito extended.

Bug: 187935317
Test: atest FrameworksNetTests
Change-Id: I5dba65d806c5d06b3ff8f633846edb911a7a44ec

Remi NGUYEN VAN   commited 2021-06-08 19:12:09 +09:00
98b76cc2ec
Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Remi NGUYEN VAN   commited 2021-05-13 08:30:33 +00:00
5ed250d90a