Content description for usage will be added later.
Bug: 318780411
Test: manual - on AppDataUsage
Test: unit test
Change-Id: I3990218395dfd7553554346ea8ef00368ba57589
Renamed checkIfMeteredDataRestricted() to
checkIfMeteredDataUsageUserControllerDisabled() to relect its actual
usage.
Test: built successfully
Bug: 317265503
Change-Id: I76189da1da510067d5a715c5a34b6a18e53544fc
- Initiate and sync existing network policy when creating the instance
- Imple a method to suggest list of packages to set as POLICY_REJECT
- Reset/clear the policy settings once clear storage or reset
preference
Bug: 306329984
Test: make SettingsRoboTests
Change-Id: I10ba28fee08c29bc2092820fbc8d8ac0e61d30e7
We only need aggregated summary, but NetworkCycleDataForUidLoader loads
usage for all cycles.
Create AppDataUsageSummaryRepository to reduce the system api call to
only once.
Fix: 304421722
Test: manual - on AppInfoSettings
Test: unit test
Change-Id: I115dfb51dbf77ed3fdde985aa1a968ff7462bebc
On AppDataUsage page, using single source of truth to calculate the
default template, and set title base on the current template.
Fix: 213266028
Fix: 234104784
Test: visual - on AppDataUsage
Test: unit test
Change-Id: I80facca0b000964e901905af51a344a4bc9f498b
To improve performance and better organization and testings.
Fix: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: I277133b55378a3445aceb826d771b14c0fc91e4a
For better organization and testings.
Bug: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: Ie3d35f5d112cf06cca585c9859624d705fbe2655
For better organization and testings.
Bug: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: I77ceeccc7055fcd948fe40d5dfb9cc4a9b9ad2ee
Up to 30x faster.
Currently it load the usage detail for every day at the beginning, so
it's quite slow.
To fix,
- Not load the usage detail for every day at the beginning
- Load only the cycles first
- And only load the daily detail for the selected month
Fix: 290856342
Test: manual - on DataUsageList (cell & wifi)
Test: unit tests
Change-Id: Ie18fa68f801743389bd6b6a28e236dcf1fea00e4
Move spinner and config button to DataUsageListHeaderController.
Bug: 290856342
Test: manual - on DataUsageList and AppDataUsage
Test: unit test
Change-Id: I655bd3441b2305708c0052f1203538bb07eef2af
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
RecyclerView has item animation by default. In this bug, RV animation
seems to be interrupted by the page transitions(Shared Axis), and so
items could not finish sliding to its position.
Hence, disable RV animation to fix it.
Fixes: 189720797
Test: Navigate to Mobile & Wifi usage page and see the normal UI.
Change-Id: I52920715ae4b63ef78a73fcb9c76c6d20f80e012
Change wordings in data usage part into inclusive language.
Bug: 160707804
Test: make RunSettingsRoboTests
Change-Id: I713e52df8201413b884257a51bc1f71a0d43179d
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