Helper function composed to return thread future, to guarantee
concurrent function finishes before test condition is checked.
Additionally a @VisibleForTesting helper function is used rather than
robolectric reflection helpers to set a class variable.
Fixes: 187249674
Test: atest -c TopLevelStoragePreferenceControllerTest
Change-Id: Ia22ebac4baec60f72b8516e9e79998cd788266ab
Merged-In: Ia22ebac4baec60f72b8516e9e79998cd788266ab
(cherry picked from commit 899eb7282d)
Currently the Settings VPN library doesn't including much testing
support, so this is intended as a start, in order to improve reliability
and stability of the area.
Test: atest -c VpnInfoPreferenceTest
Bug: 187245804
Change-Id: Id5acb699e0a68f479f3b0b6e6614c2e4e43b163b
For wifi, a old API: buildTemplateWifiWildcard will includes the merged
wifi which is included to mobile usage. It should not double count
again. Call new API: buildTemplateWifi with
NetworkId: NetworkTemplate.WIFI_NETWORKID_ALL
and null subscriberId to get non-merged wifi usage.
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppDataUsageTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageUtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageInfoControllerTest
Test: Manual Test, wifi data usage count correctly.
Bug: 176396812
Change-Id: Ia4d8fa67ea3cb75c2d35be9ab60e5c5ffa391ffb
There is AOSP built in file browser for image/video/audio
file category, this change cleanup APP based category
for image/video/audio.
Bug: 183078080
Test: atest com.android.settings.deviceinfo
atest com.android.settings.deviceinfo.storage
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo.storage
Change-Id: I925fc9296b8c2df5bd793668f66a12beb7744469
There is AOSP built in file browser for image/video/audio
file category, all APPs except games should be included in
Apps category.
- Shows image/video/audio APPs in APPs category.
- Count Image/Video/Audio APPs storage size to Apps storage size.
- Remove APP size & cache size for Images/Videos/Audios category.
Bug: 170918505
Test: atest StorageAsyncLoaderTest.java
Change-Id: I07e0a3a66a13f36b9e0cbde289d8ba90df4ae295
- When device out of service, show "No connection" on preference summary.
- Modify the logic of icon and summary.
Bug: 183944316
Test: atest SubscriptionsPreferenceControllerTest passed
Change-Id: I179632918a9145f27cec7d9c08e1c0b675fd1ef6
Implements improved handling of invalid subIds in the
"Allow 2G" controller + unit tests.
Bug: 185264531
Test: m & atest -c Enable2gPreferenceControllerTest
Change-Id: I7587f1a2a8150bbc6cc0864c9a13d0d910a26682
- Do not set Carrier Network together when setting Mobile Data, if
carrner network provision enabled.
Bug: 182324921
Test: manual test
atest -c ProviderModelSliceTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiScanWorkerTest
Change-Id: Ic8b77fd7b43372f077ba1c8be8fd9a7c3bcff197
- Remove the Advanced expandable list pattern and expose the items
- Add Carrie Wi-Fi offload toggle preference
- Add Carrier Wi-Fi network preference
- Do not set Carrier Network together when setting Mobile Data, if
carrner network provision enabled.
- Screenshot:
https://screenshot.googleplex.com/8vMow53cvGfUAoj
Bug: 182324921
Test: manual test
atest -c CarrierWifiTogglePreferenceControllerTest \
MobileDataPreferenceControllerTest \
WifiPickerTrackerHelperTest
Change-Id: I5a7f4cc6850fe76c0efee392c0c0c23cb41f5e1e
This is to provide users with control over whether to disable
transcoding cache or not.
By default we keep the transcoding cache enabled.
The controller resides within the Media transcoding settings under
Developer Options.
Test: Manual. Unit tests added.
Bug: 185246580
Change-Id: I5cc85e4a254c87b5c84c32a303e8294c918748c2
Some of connectivity related files are going to be a part of
mainline module, so the external callers cannot call its hidden
API.
Replace the hidden API to public API or other alternatives from
the callers side.
Bug: 182859030
Test: 1. Remove "framework-connectivity.impl"
2. atest SettingsUnitTests:InternetUpdaterTest
3. atest SettingsUnitTests:ProviderModelSliceHelperTest
4. atest SettingsUnitTests:MobileNetworkUtilsTest
5. make RunSettingsRoboTests \
ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest
6. make RunSettingsRoboTests \
ROBOTEST_FILTER=TetherPreferenceControllerTest
7. make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiDetailPreferenceController2Test
8. make RunSettingsRoboTests \
ROBOTEST_FILTER=ContextualWifiSliceTest
Change-Id: Idd1ca57d8f2790070e9c401936c5af2a05bcfe9d
- Move junit test into unit test folder
- Settings resources ids are different from the junit test ids
so we need to find the correct resource id
- ColorDisplayManager will not update in time before the controller
is checked, and it can't be mocked since it's a final class
Bug: 170970675
Test: manual, atest ReduceBrightColorsPreferenceControllerTest
Change-Id: I57bfdd8294c5b6e147b4e11ae97b6b56f6121343
It get the empty subscriptionInfoList from
SubscriptionManager#getAccessibleSubscriptionInfoList, so the UI
shows default subId's operator.
Since this item appears, when sim is active, using
getActiveSubscriptionInfoList is enough.
- https://screenshot.googleplex.com/9aHtDVpnYQBsiQr
Bug: 182020952
Test: atest MobileNetworkUtilsTest
atest OpenNetworkSelectPagePreferenceControllerTest
Change-Id: I0d86ec41236a0d1be657ccd57fd0cf90f96b8b89
Calling AlarmManager to know the state of the permission, which is now
the source of truth, as the logic deciding the state of the permission
may change.
Also killing the app when the permission changes to denied, this avoids
the app maintaining stale state about this permission.
Test: make -j RunSettingsRoboTests
atest SettingsUnitTests:AppStateAlarmsAndRemindersBridgeTest
Manually: Toggle the state of an app to "Not allowed" and check the logs
for activity manager kill messages.
Bug: 181152252
Bug: 183136253
Change-Id: I438782eaef4caae50fd76685c675a3e45ee28d9f
For example, if a subscription has the name "subsc" and another has
"subsc " the extra unique information will be added to the
subscriptions.
Test: atest -c SubscriptionUtilTest
Bug: 183664625
Change-Id: Ia137169f6cdd9804ab04126e5045c9fb61556d54
Previously OHM did not support for multile user switch.
We get current user id in settings and get/put settings value
with currentUserId.
Test: manual switch user and check Settings > System > Gesture > One-Handed
Test: make RunSettingsRoboTests -j40
Bug: 182278800
Change-Id: I12dcc7b634ae19375358733357dc95197e81067c
StorageEntry#isStub() is unused and not built in apk.
Remove the method to fix test fail.
Bug: 184045592
Test: atest com.android.settings.deviceinfo.storage
Change-Id: I89d73c45111918c2ff01174d6fbb47f8c59f6968
Users can click this preference to see public storage files
in external file browsers.
Bug: 170918505
Test: make RunSettingsRoboTests ROBOTEST_FILTER=StorageItemPreferenceControllerTest
manual
Select private storage and public storage and observe UI
Change-Id: If3f0d59b2ebf941d70e81e60c4c2015b80e7cf33