Commit Graph

14 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
Les Lee
204f0215da Usage Settings: Fix NPE when subscriberId is Null.
For mobile, a old API: buildTemplateMobileAll doesn't includes the
merged wifi network, call the new API: buildTemplateCarrierMetered
to replace the old one.

But new API: buildTemplateCarrierMetered requires non-null subscriberId.
Call old API: buildTemplateMobileAll when subscriberId is NULL since
the matched result is always empty when subscriberId is NULL. No any different
between buildTemplateCarrierMetered and buildTemplateMobileAll.

Bug: 190233044
Bug: 190135429
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageLibTest

Change-Id: Ic6dada8260029e47e044d016ebc701c25dbf9b2a
2021-06-05 03:14:18 +00:00
lesl
5012cef58f wifi: Use new API for data usage function
For mobile, a old API: buildTemplateMobileAll doesn't includes the
merged wifi network, call the new API: buildTemplateCarrierMetered
to replace the old one.

PS: Not only usage functionality but also apply to network policy
control since the default policy is changing to use
new API: buildTemplateCarrier now.

Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageLibTest
Test: Manual Test, modify the mobile usage warming and limit bytes and
      check the data via adb shell dumpsys netpolicy

Bug: 176396812
Merged-In: I6fbec14e7be4dc4b5c2fd3659a801521c81b233c
Change-Id: I6fbec14e7be4dc4b5c2fd3659a801521c81b233c
2021-06-01 10:34:10 +00: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
Chiachang Wang
ffbe4e9b1e Replace hidden CM#isNetworkSupported() usage
It's a refactor work for connectivity mainline module. The
hidden methods access is no longer allowed, so the usage for
isNetworkSupported() should be replaced. Settings use it to
check if device support telephony, wifi or ethernet service.
There are alternative methods to check if device supports such
features. Replace as it is.

Bug: 172183305
Test: m ; make RunSettingsRoboTests
Change-Id: I8f1d11558b1be575a0777ed195abe027e838cb74
2021-03-17 15:21:43 +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
zoey chen
353926a446 [Settings] Replace #getSubscriberId(I) with #getSubscriberId()
Bug: 146823314
Test: make
Change-Id: Idec4b7ed362a3be0693fa9670ecb2aba7c7fd1d1
2019-12-25 15:04:20 +08:00
Bonian Chen
228dd34a8a [Settings] Replace TelephonyManager#from()
Replacing TelephonyManager#from() by public API.

Bug: 146752167
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageUtilsTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=CdmaListPreferenceTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=CdmaSubscriptionPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=CdmaSystemSelectPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AutoSelectPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=OpenNetworkSelectPagePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataServiceSetupPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=EnabledNetworkModePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=MmsMessagePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=PreferredNetworkModePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=SettingsDumpServiceTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=MobileDataPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=MobileNetworkSettingsTest
Change-Id: If78ad37d4795d615b6f8db2f5687a28792a6764f
2019-12-23 01:00:38 +00: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
176ccd0c35 Clean up: fix incorrect @VisibleForTesting imports
Test: rebuild and robotests
Change-Id: I33d7ee1c0622c01f592920baaf01d44ad19d9a13
2018-07-13 13:08:53 -07:00
Lei Yu
4daf2dc7bc Add anomaly log to dumpsys
Log the anomaly config version in settings dump

Bug: 77490545
Test: RunSettingsRoboTests
Change-Id: I9cddcb0c0c8adcf0901dae6a31a3a0e84e48077a
2018-04-03 17:08:47 -07:00
jackqdyulei
a9eb4a0ee2 Dump the default broswer in SettingsDumpService
In SettingsDumpService, add the feature to dump the default
broswer. When there is no default broswer, dump nothing.

Bug: 27043208
Test: make -j40 RunSettingsRoboTests
Change-Id: I5ce8180d419f8a0e921da72da28eccb36a523668
2016-12-28 11:19:47 -08:00
Jason Monk
f3f6bd47fe Make cell data usage an array
Change-Id: I39ad23882ec30c733281f87ce3c8056bc8ef4bde
2016-02-03 13:13:15 -05:00
Jason Monk
dc252eb7b1 Metrics more of the things
Add a dump for some of the state of the device.

Bug: 26687707
Change-Id: Icf517912b3006cc84c26863eb1b93d586a55464a
2016-01-30 11:38:49 -05:00