This test seems to be flaky for quite a while. The method tested runs
the check using a FutureTask which may sometimes hit the timeout issue,
so it seems not that suitable to do the test.
Fixes: 176274700
Test: robotest
Change-Id: I1bf979f4a792d76da01bfa82355ccf8f659dc6f8
Zen mode change will call displayPreference() and create a new SettingsObserver, then the old Observer object will have no opportunity to be unregistered. After too much new SettingsObserver creatd in Monkey test, memory might leak.
Bug 176206489
Change-Id: I3bccec281da492299bbf755f86df7844a31223c5
Implement a slice which can show/update carrier networks.
Before and after: go/b173971144screenshot
Bug: 173971144
Test: atest NetworkProviderWorkerTest (PASS)
atest ProviderModelSliceTest (PASS)
Change-Id: I3f0dab364c88723ef3185a2ff040b1fbd1b099f4
Use ENABLE_NAS_FEEDBACK flag to decide if showing feedback UI setting
Bug: 175363481
Test: make RunSettingsRoboTests7
Change-Id: I969f9ca0b5d681345c022816e104926953f855dc
Settings is a platform app so the role APIs for it wasn't system APIs,
but just @hide. Now that we are moving role into module, we need to
create system APIs for them.
RoleControllerManager is an implementation detail and may change in
soon when we move role logic into system server and leave only UI in
PermissionController, so we shouldn't expose it. Instead, we can
expose the new system APIs on RoleManager, and delegate to
RoleControllerManager internally.
Bug: 158736025
Test: presubmit
Test: atest DefaultSmsShortcutPreferenceControllerTest
Change-Id: Iafe1d24601a32799e04d9aa385ec2fbce833a02e
ConnectivityService is going to become mainline and can not
access hidden APIs. The mobile provisioning url is used by
telephony and it will use the hidden xml parsing APIs. It also
would make more sense to have the parsing inside telephony code.
Thus, move getMobileProvisioningUrl parsing to telephony surface
from ConnectivitySerivce and update the corresponding callers.
Bug: 175177794
Test: m and verify the url could be read successfully from the
telephony surface
Change-Id: Ie8b46bc9b652f926277b10e36a86adba4dbd0121
Rather than mocking the PreferenceScreen's getPreference function,
a PreferenceManager has been created, which instantiates the Screen.
The desired Preference is added to the Screen with the testing key.
Rather than using a shadow XML, contexts' resources are mocked.
A mock WifiManager is used instead of a shadow
Duplicate test case removed, and test which succeeds locally but
not on cuttlefish marked as ignored for now.
Bug: 175389659
Test: atest -c DeviceNamePreferenceControllerTest
Change-Id: I643b22993a1d102614fed1883af7f4925947be20
There are couple of newly explored concepts in this CL, which will
hopefully be useful for migrating other tests in the future as well. In
broad strokes, the changes to this file cover:
Android build file species the preferences library, in order to access
PreferenceViewHolder.createInstanceForTests.
Resource ids in JUnit tests differ from the Settings apk. This is true
not only of strings but also views and layouts. Helper functions added
to main class to access the layouts needed by the test.
Shadow activities are not needed to view layouts, the context can be
used.
Context startActivity can be mocked and verified in order to capture and
examine the intent created by the library under test.
Bug: 175389659
Test: atest -c DataUsageSummaryPreferenceTest
Change-Id: Ib8cb87f0299c47a32c3f5d3af7edb20592b727ec