Commit Graph

43 Commits

Author SHA1 Message Date
Junyu Lai
123f2e1581 [MS50] Remove NetworkTemplate#buildTemplate* usages
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
2022-01-11 02:53:03 +00:00
TreeHugger Robot
bbb6562684 Merge "Fix inconsist color filling on collapsing toolbar" into sc-dev 2021-05-06 11:04:31 +00:00
Mill Chen
efbcc69cc4 Fix inconsist color filling on collapsing toolbar
Some pages are updating the background color for action bar after action
bar is created, which will break the animation of collapsing toolbar. It
also causes the different color filled in the status bar and collapsing
toolbar area separately. Removing the styleActionbar method from
EntityHeaderController can fix this issue.

Fix: 187019164
Test: robotests && visual verified
1) Settings -> Apps -> See all apps -> pick up either app -> Mobile data
& Wi-Fi
2) Scrolling the content and see if the toolbar has the different color
between status bar and toolbar

Change-Id: Ic0842b9e6c48662872694534a3696c4b8900481f
2021-05-06 14:46:30 +08:00
lesl
26128e8722 wifi: Use new API for wifi data usage function
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
2021-05-05 10:33:34 +08:00
TreeHugger Robot
9c989442d1 Merge "Hide 'View plan' button in data usage settings" into rvc-qpr-dev am: 1a09d244d4 am: 09a906b972
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12755868

Change-Id: I8101838915bb821e9ce6483ba2c7d21ad894a0e5
2020-10-16 22:58:21 +00:00
Sarah Chin
f3d7860c70 Hide 'View plan' button in data usage settings
There are currently no callers of the setSubscriptionPlan() API that
have a MDP app set up. Remove the button when SubscriptionPlans are
defined, since it does nothing and causes confusion for users.

Test: manually verify button does not exist when a plan is defined
Test: make RunSettingsRoboTests
Bug: 169806315
Change-Id: Ieda020bfa692e9465d6297e50cf338deff91a8a9
2020-10-08 21:03:39 -07:00
govenliu
fec71036f7 [Wi-Fi] WiFi Settings inclusive language fix plan phase 2
Replace WiFi related terms which contain Blacklist,Dummy,Sane or Sanity Check wordings.
Goal: Create a fixit for Android Platform to reduce the use of non-inclusive language for all code.

Bug: 161425297
Test: make RunSettingsRoboTests -j
Change-Id: I1ff89bd2a6636ada1e0f5b9879aecbbd5dab4012
2020-07-22 12:41:01 +08:00
Bonian Chen
d40f7f707e [Settings] Move mobile data template out of framework
Move mobile data template out of framework

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageLibTest
Change-Id: I5072cd1e673194d00b3ce82242bf5fbad88d23cd
2020-06-02 17:16:53 +08:00
Bonian Chen
3d62032fed [Settings] Query historical data in background
Move the query of historical data into background thread to avoid from
blocking other query operation in UI thread,

Bug: 141833767
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsagePreferenceControllerTest
Change-Id: I61e414d70136a0025ddd7373a4f34a99acb89510
2020-05-04 11:57:44 +08:00
Bonian Chen
38b0d3091d Merge "[Settings] Avoid mobile data usage init in WiFi usage" into rvc-dev 2020-04-28 12:50:18 +00:00
Bonian Chen
225db346b6 [Settings] Avoid mobile data usage init in WiFi usage
Avoid from initial in WiFi usage and update into mobile data usage after
refresh.

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: Ic6176952953ded9d47f1fc52c3f311e6568a5b90
2020-04-28 15:47:30 +08:00
Bonian Chen
260ad5c523 [Settings] Align data usage calculation
Align the calculation of data usage between
DataUsageSummaryPreferenceController and DataUsagePrefereneController.

Bug: 143996139
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: I73de79b5cc298bf949827eda0a8bb0274089c016
2020-04-27 19:39:01 +08:00
Bonian Chen
87a4577472 [Settings] Support re-init DataUsageSummaryPreferenceController
Support re-init DataUsageSummaryPreferenceController without
re-constructing it.

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: If72a521c5fbaec8b8902fb80b13d9d0f07c716af
2020-04-24 11:35:44 +08:00
Bonian Chen
bc10c00149 [Settings] Support the display of data usage when SIM inactive
SIM can be inactive but remain existed within slot.
Therefore, change the design here.

Bug: 143996139
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: I24ec529b120b2801f7b9089b07d32bdd1038883f
2020-04-23 19:53:46 +08:00
Bonian Chen
761a13700f [Settings] Code refactor for data usage
Code refactor

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: I22b323bae0b18cca26c62d047fdb504c012518b5
2020-04-23 11:01:34 +08:00
Bonian Chen
1a8d501d7d [Settings] Adopt TelephonyBasePreferenceController to data usage
Adopt TelephonyBasePreferenceController in order to better support DSDS.

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: I502b93f01b289b72989ad3167131cc0c598b1583
2020-04-22 12:38:11 +08:00
Bonian Chen
61b9714a34 [Settings] Fix DataUsageSummaryPreferenceControllerTest
Fix test case of DataUsageSummaryPreferenceControllerTest

Bug: 154562264
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: I0b3366c86b0a621b9dda88bbcde6e118d37995b7
2020-04-22 10:39:42 +08:00
Bonian Chen
dcef423720 [Settings] Refactor test case DataUsageSummaryPreferenceControllerTest
Refactor test case of DataUsageSummaryPreferenceControllerTest

Bug: 141833767
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: Ieb551a32d87c53cbd0765e19e710f1f0469da9d5
2020-04-21 15:08:27 +08:00
Bonian Chen
dcd92af0a1 [Settings] Access ProxySubscriptionManager within DataUsage
Redirect some SubscriptionManager access to ProxySubscriptionManager.
This will reduce some access latency.

Bug: 141833767
Test: manual
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: I2cb30dd0570a09543a13ca01cf054ba2d18d70d4
2020-02-10 23:49:53 +08:00
changbetty
50d7506103 [Mainline] Removed non-formal API getAllSubscriptionInfoList to used in Settings
Bug: 147206736
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageUtilsTest
      make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest
Change-Id: Ie9c01afa2b128f8d296b160d3628ea1fb7176e59
2020-01-20 18:42:22 +08:00
Bonian Chen
31e07211d9 [Settings] Avoid from accessing createManageSubscriptionIntent(int)
Avoid from accessing
SubscriptionManager#createManageSubscriptionIntent(int).
Create a copy of source code into Settings.

Bug: 147334060
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: Id44a6b214a8f5d378d7a536fbf984a0512e6a92d
2020-01-08 23:32:30 +08:00
Fan Zhang
71d793cc2a Format app data usage using IEC unit, not SI unit.
Fixes: 131924586
Test: visual
Change-Id: Iedbd15fb9c98a5c93089708e40175cbf5572eeda
2019-05-03 16:53:11 -07:00
cosmohsieh
976995fa36 [Passpointv2] Implement DataUsage header for Wi-Fi detail fragment
Change header to a data usage chart of the specified Wi-Fi network.

Bug: 124700353
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings
Change-Id: Ide08ffd5e97ced5fe54707562690155414598dac
2019-03-14 16:41:08 +08:00
Antony Sargent
625787b391 Add data usage header to mobile network details page
As a part of the work for subscriptions UI improvements, we want to show
data usage information at the top of the mobile network details page,
and those details need to be specific to the particular subscription
we're showing details for, even if that SIM isn't the current default
one. This is useful for seeing data usage across your SIMs in dual-SIM
devices.

This CL adapts our already existing DataUsageSummaryPreferenceController
class so that if can be used on any fragment instead of just the
DataUsageSummary one, and changes it to take an explicit subscription
id instead of assuming it should use the default one.

Bug: 122670283
Test: make RunSettingsRoboTests
Change-Id: I41e307b0f32580c73b08adec7cabf01c96d7e835
2019-01-17 21:50:27 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Matthew Fritze
f87a1f3f41 Establish permanently unavailable settings
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
2018-05-09 08:36:59 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Fan Zhang
289677f97f Switch from SI to IEC unit when formatting data usage bytes
- 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
2018-04-12 09:52:35 -07:00
Jan Nordqvist
0c36260db1 Merge "Do not use warning or limit to display "X B left" above usage bar" into pi-dev am: 3f59ce67b6
am: eff9d43739

Change-Id: I8af506c4d7be28f8b5a966f2d4f38aeb13994b85
2018-04-05 15:18:18 -07:00
Jan Nordqvist
bdd559a181 Do not use warning or limit to display "X B left" above usage bar
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I46f4f5f1cf6092038e49beaafe5aa6a19ffb0aa1
2018-04-05 13:22:06 -07:00
Jan Nordqvist
9eb43ddddf Fall back to Wi-Fi data display in data usage screen with no SIM.
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I06bf78e54119819be87e15baca7e5b6a241958cb
2018-04-05 07:58:23 -07:00
Jan Nordqvist
cd3f9e2a5e Fall back to Wi-Fi data display in data usage screen with no SIM.
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I06bf78e54119819be87e15baca7e5b6a241958cb
Merged-In: I06bf78e54119819be87e15baca7e5b6a241958cb
2018-04-04 15:58:53 -07:00
vincentpeng
665b16bbfc Change DataUsageSummaryPreference.setLimitInfo(String text) to take CharSequence
"CharSequence is more correct" than String.
Change method to take in CharSequence parameter and modify callers/tests.

Bug: b/74960034

Test: RunSettingsRoboTests:DataUsageSummaryPreferenceTest and RunSettingsRoboTests:DataUsageSummaryPreferenceControllerTest
Change-Id: Ic83bde57bafff8416c0bd86b1ff2beb44ea12d0e
2018-03-29 07:48:10 +08:00
Jan Nordqvist
4092b2193c Entity header: When screen scrolls, there should be shadow under the header.
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests

Change-Id: I5c1d9f463a57d48e258d67602fc4d1fbbdfaad60
2018-03-28 11:17:23 -07:00
Jan Nordqvist
ba1c53455a Fix entity header to "Hide" shadow of app bar unless scrolled.
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I3d23ac49365873361f23b0c7ab105f208d6a7ed7
2018-03-21 15:15:10 -07:00
Jan Nordqvist
19375adb5a Only show mobile data usage information when mobile data is enabled.
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I4eb774120cbcf50f40d22c7c8c3caeb0eacbbed3
2018-03-21 09:13:02 -07:00
Sundeep Ghuman
b673aaadc9 Merge "Change text for data warning and data limit." into pi-dev 2018-03-15 17:08:34 +00:00
Jan Nordqvist
7b352d271e Change text for data warning and data limit.
This change modifies the "data warning" text to show either nothing, only
warning, only limit, or warning and limit, based on which of the values are
set. It also remove the capitalization of the first letter of the texts.

Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Change-Id: Ifebb411b906719c6e2f343f48d825f7b6f17af53
2018-03-15 09:49:32 -07:00
Jan Nordqvist
9a65e5fec7 Set color of update line to red if update is older than six hours.
In Data Usage screen, out-of-date state

Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: Icf6fafe9ab61a2c1ac3fba2bebf3bd4407c0ecfe
2018-03-15 00:20:39 -07:00
Jan Nordqvist
8a241f642e Change text layout of data usage string.
In Data Usage screen, Above the data bar, Change font size of number
In Data Usage screen, Above the data bar, Update text style of “GB used”
In Data Usage screen, Above the data bar, Add “GB left” aligned right of bar (not always shown)

Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I8accb16425283cf148ddb6b6646f92ff51a74b7c
2018-03-14 22:48:46 -07:00
Sundeep Ghuman
ea8d866337 Fix the ProgressBar in DataUsageSummaryV2 page.
Bug: 70950124
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceTest
Change-Id: I83f268c0824d9e3520899725fa572753e1de0814
2018-03-14 16:21:46 -07:00
Jan Nordqvist
4fbe0f8354 Update DataUsageSummary to include carrier provided information.
This CL augments the existing data usage display with carrier provided
information about data usage and plans when available from the new
frameworks API.

Test: manual
Test: make RunSettingsRoboTests
Bug: 70950124

Change-Id: Idde1ff786e8c5dbc04e58ffbcc0fd18789682699
2018-02-08 10:13:42 -08:00