So virtual carrier can get correct data with merged subscriberIds
Bug: 120566366
Test: RunSettingsLibRoboTests
Change-Id: I02abed77dffb55ef49fe0c4142f6f5b4a42ebe52
- 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
- remove all v1 code and the corresponding feature flag switch.
Bug: 117420679
Test: make RunSettingsRoboTests
Change-Id: Ib062c03c671b0f860698f5e5e153ab46d963175a
- AppDataUsage assign preferences to Applist in loaderCallback.
When device rotate we will assign preference to Applist second
time which throw IllegalStateException Exception. We will use
restartLoader which create new loader rather than use existed
loader.
Change-Id: I540d645e930a29f989c4fe374e2103ca201da198
Fixes: 118195540
Test: manual
Settings have new filter component with settings style.
This CL replaced Spinner to SettingsSpinner in data usage page.
Change-Id: I212b6b6ed203f8bffd094c0180873060b93c39cb
Fixes: 117568930
Test: robotests, visual
- and update all its subclass to extend DataUsageBaseFragment instead.
Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: Ic5720af43082d8b39642b6a539515f3f20d32694
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
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
Replace all SettingsLib/PackageManagerWrapper in Settings,
by PackageManager,
Remove ShadowPackageManagerWrapper.
Bug: 62067063
Test: make RunSettingsRoboTests
Change-Id: I6d1af55c13d80c1907b98b21e0207cc903cd9b1f
- Created a new helper method DataUsageUtils.formatDataUsage() to
format data usage bytes using IEC formatting.
- Switch from Formatter.formatFileSize() to DataUsageUtils.formatDataUsage()
everywhere in datausage package.
Change-Id: I9323beed8bf5126b153fc9a3cdd9591c97ca6fd2
Bug: 76159924
Test: robotests
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
Move public static methods from DataUsageSummary to DataUsageBase.
Bug: 62349208
Test: make RunSettingsRoboTests -j40
Change-Id: I632f75f4c4f370fb225a9787267043fec20994e5
- 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
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
Showing the wifi data usage results in reaching the max number of
threads in the pool executor. Switching the loader implementation
from Async task to AsynLoader and use a single loader to get the
whole list of preferences instead of using a new task to create each
list element.
Change-Id: I0da19ca09031a7fa178970c192e12a99ab489145
Fix: 33820327
Test: make RunSettingsRoboTests
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
- Update background color of actionbar
- Remove elevation of actionbar so it appears to be the same entity as
app header.
- Add a shadow below app header view. We can't set elevation on app
header unfortunately because that will add shadow all round the view,
but we only want shadow below it.
- Updated app icon size/text size per to match UI spec.
Change-Id: I63d7fa42b859a008fa662aaf19848cd40529c2ff
Fix: 37207527
Fix: 37079248
Test: visual && make RunSettingsRoboTests
The class UidDetailProvider providers details about a specific UID,
we can directly apply it here.
Optimize: https://code.google.com/p/android/issues/detail?id=237810
Test: for case TrafficStats.UID_REMOVED
1.add an new User
2.generate some data traffic under the new user
3.switch to the phone owner
4.delete the User added just now
5.go to Data usage and open the item "Removed apps and users"
for case TrafficStats.UID_TETHERING
1.open tethering and generate some data traffic
2.go to Data usage and open the item "Tethering & portable hotspot"
Change-Id: I05aa522728b296d6c06580adf809f274491cdcea
Signed-off-by: tiansiming <tiansiming@xiaomi.com>
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.
Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
- This covers app data usage settings, power usage details
- Addded helper method on AppHeaderController to build the header as
Preference because every fragment needs to do this anyway.
Bug: 32442716
Test: RunSettingsRoboTests
Change-Id: I6d38321b867154f8fb5194b993d118bcdbbfedc9
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
users.
Ensure that the user info is not null before using it to retrieve user
icon and label. If the user info is null, use the default label.
Change-Id: If402844d472a15f04c812f20c1c761b3a189a638
Fixes: 29619032
Default thread pool from AsyncTask can queue up to a certain number of
tasks. We will use a custom pool with enough queue size to load app
data.
Fixes: 30355247
Change-Id: I5ad4c340191c785463011c1698d1d4625aba44ec