Enable the UI control through configuration.
Bug: 240515161
Test: local, auto test
Merged-In: I5e49a2b0f2b563b426354f4d2e6e650dcc02c98b
Merged-In: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
Change-Id: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
When the page is entered from the AppInfoDashboardFragment, there is no
way to know whether the cycle data is available before finished the
async loading. If it's zero usage, the cycle spinner will be removed,
which cause a flicker.
Temporarily disable the preference list's animator before initial
page updates can solve this issue.
This also fix another flicker on this page when the background data is
off.
Fix: 233963355
Test: manual visual test
Change-Id: I795ed95e15bb3216fa17adfd4f57faf5fd92fa00
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
Both "Mobile data usage" & "Non-carrier data usage".
By,
1. Add header in onCreate() instead of onViewCreated()
2. Keep the space for Spinner, and preload initial cycles
3. Keep the space for 3 usage summaries
Bug: 191730864
Test: manual
Change-Id: I8c309c5f51ce6290383a2d10f75e41d0f207d61a
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
Fragment.oncreate() causes an IllegalStateException. We use a
ShadowFragment to stop the calling sequence.
Fixes: 135086559
Test: robotest
Change-Id: I601e0f2513f826b0b7749cb2c013b7e4c0a94a33
- when launching the app data usage from the data usage list, pass the
info about the current cycle that the user is looking at, and select
the same cycle by default when the page is first launched to match the
data on the previous page.
Change-Id: Ic91bd8ee78db4d76551dff4b132c1b74d4b3c19d
Fixes: 123192721
Test: make RunSettingsRoboTests
Prior to this CL, Process.OTA_UPDATE_UID was included with SYSTEM_UID
for the purposes of per-app data usage in the DataUsageList. With this
change, it is now separated into its own category.
This change also deletes the duplicate ic_system_update* icons and
moves the one implementation into SettingsLib.
Fixes: 70640191
Test: manually verified locally that there is an item in the list
with the proper title. Required setting up a custom OTA for my
test device.
Change-Id: Iecc45648f68a12c9f8e2370577ab017863e7fcb2
- when launching the app info page and no network template is defined in
the launch arguments, use the correct default data subscription id to
check whether mobile network template should be used or not.
Change-Id: If9341abf3416c775a2b7407c1d6d0b33f4aad67f
Fixes: 120098637
Test: make RunSettingsRoboTests
- 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
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
- remove all v1 code and the corresponding feature flag switch.
Bug: 117420679
Test: make RunSettingsRoboTests
Change-Id: Ib062c03c671b0f860698f5e5e153ab46d963175a
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.
This causes a lot of trivial code changes.
I also updated the ordering of the imports in all affected files.
Bug: 110953302
Test: Built
make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Replace all SettingsLib/PackageManagerWrapper in Settings,
by PackageManager,
Remove ShadowPackageManagerWrapper.
Bug: 62067063
Test: make RunSettingsRoboTests
Change-Id: I6d1af55c13d80c1907b98b21e0207cc903cd9b1f
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
With API Dpm.setMeteredDataDisabled, admins can restrict some
packages from accessing metered data and when admin does restrict
packages, user settings to enable usage of mobile data in background or
allow unrestricted access during data saver mode are not relevant. Add
policy transparency to these settings so that user knows that admin
disabled them.
Bug: 63700027
Test: make RunSettingsRoboTests
Test: manual
Change-Id: I450f7a91356ed8fb33f464620c73fa9407a1ff83
- Add the wrapper package and move all wrappers to the wrapper package.
- Get rid of some wrapper interface/impl implementation and have a
wrapper class directly.
Bug: 65634579
Test: make RunSettingsRoboTests
Change-Id: Ic757d8f7bacfa7a034c7e692205bc1dc4b0e1de1
- Refactor the entity header layout to use LinearLayout and add id to
content area
- Remove now unused AppHeader class
- Make entire icon+text area clickable and link to app info page
Refactor the binding logic from bindButton to its own method.
- Remove unused MultiLinePreference
Fix: 62705377
Test: make RunSettingsRoboTests
Change-Id: I6db554695410e71b669f6fdba29d98fedc3364b9
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.
Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
work profile apps belongs to a different user. Set the correct uid when
loading the icon so the work profile badge is displayed.
Change-Id: I2ed27d6b83c1b42961500dc8d63475bf1f7eabcd
Fix: 38372681
Test: make RunSettingsRoboTests
- Add a controller to manage add/remove onScrollChangedListener to
recyclerviews.
- When recyclerview on each screen is scrolled to top, set actionbar
elevation to 0, otherwise set it to non-zero.
- When screen is moved to background, detach the listener.
- Use the controller in entity header.
Change-Id: Iecf194d885098c98c392810f62893ae9189f3936
Fix: 37670670
Test: make RunSettingsRoboTests
update layout view IDs, and controller variable names to be more
generic.
Fix: 36734470
Bug: 37669238
Test: make RunSettingsRoboTests
Change-Id: Ib80827ae3eae6d01a600068b4a8a44b239c32511
We should hide the link because "All work apps" is a meta app, it
doesn't point to any specific app, so app info link does not make sense.
Change-Id: I768786f2df5d05bbde0723e5585abcdbe875c652
Fix: 36542896
Test: make RunSettingsRoboTests