Prior to this cl, we allow user to tap on those
setting items which belong to another user profile app.
However, we already observed some functional broken cases now.
Such as, device can't get the storage data/screen time/mobile data
battery, notification for those apps from another user profile.
Therefore, we decide to grey out those setting items,
and we don't allow user to tap on unsupported setting items.
Test: Download apk in different user profile, and see setting items
is disabled/enabled correctly. and run robo test.
Fix: 230303570
Change-Id: I1bb6b1d8b52f6a00088b2f0e4279b896d568f8a6
SDK sandboxes run in a separate UID range. Their network usage should be
attributed to the corresponding app.
Make sure we collapse the usage collection of sandboxes to the
corresponding app UID in DataUsageList.
For AppDataUsage, make sure we add in the sandbox UID when being asked
to calculate data usage for a regular app UID. Invoke
DataUsageCycleLoader with all UIDs in AppItem, because there can now be
multiple UIDs associated with a regular app, too. Also make sure that
all new instances of AppItem for regular applications have their own
application UID.
Bug: 225319220
Test: manual
Change-Id: Id101a96ee4e3ba02376fa2ac64a9f9c2581acb61
This is a no-op refactoring.
These functions are deprecated and replaced by
NetworkTemplate#Builder, use public API instead.
Test: make RunSettingsLibRoboTests
Bug: 204830222
Change-Id: Idc2a09d8e3789ca2c7a97691cfad4b2e2b417f0d
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
Merged-In: Ia4d8fa67ea3cb75c2d35be9ab60e5c5ffa391ffb
Change-Id: Ia4d8fa67ea3cb75c2d35be9ab60e5c5ffa391ffb
Settings > Apps & notifications > select some app that has done
some internet traffic.
Observe "Mobile data & Wi-Fi" summary data and take note of the
numbers. Then tap on it and observe that the numbers on the
details page don't match the one in the summary. This is because
the details use IEC units while the summary uses SI units.
This fix changes the summary to use IEC units too, removing
the discrepancy.
Bug: 137917003
Test: manually cause some traffic, see that the numbers are now
consistent between the app info and usage details page
Change-Id: I4be5830d4e98a1c4739001c812e59d82415bf24a
So virtual carrier can get correct data with merged subscriberIds
Bug: 120566366
Test: RunSettingsLibRoboTests
Change-Id: I02abed77dffb55ef49fe0c4142f6f5b4a42ebe52
- the data usage list shows usage data for each app, and also the
aggregated data for work apps and other user. When user clicks on the
app item, we will shows the detail usage data for that item using the
app item key. However, if the app item is not for app but for user, the
key will not be the app uid, but a key built from the user id. So,
querying using the key will not get any data.
- for app item corresponding for user, need to sum up all usage data
for the uids associated with the user.
Change-Id: I1a185ee6b4d59e477f3a03cade97d85d6982e416
Fixes: 122200400
Test: make RunSettingsRoboTests
- remove all v1 code and the corresponding feature flag switch.
Bug: 117420679
Test: make RunSettingsRoboTests
Change-Id: Ib062c03c671b0f860698f5e5e153ab46d963175a
- this is for getting the summary text for Apps & notifications ->
(select an app) -> Mobile data & Wi-Fi
Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: Ib4d8e7308ea8a782b9af3bbb99db2b1235e0aca2
- a simple copy of AppDataUsagePreferenceController to
AppDataUsagePreferenceControllerV2, so that future modification can
be compared more easily.
Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: Ibeed7775a223794bf50f36b3b933e270a55e3b39
- move the method from DataUsageList to DataUsageUtils where other
utility methods are.
Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: If7176cb4278d568f890a0c94437c4483bbd472f9
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
This patch focused on fixing compile errors and some runtime errors.
Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.
The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.
Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.
Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
- update all references to AppInfoDashboardFragment
- removed PackageUtil inner class and change the corresponding function
to be a simple method.
Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: Ief067e25a303ef16db20b2ca1d8840cb06eff5f9
- first round for changing AppInfoDashboardFragment to inherits from
DashboardFragment instead.
- add controller for Battery, DataUsage, Memory, Notification, Storage,
Permission, Version, and Open by Default settings.
Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: I60079e5442b4eef46a178e27de96a8635e15ebde