BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
MobileRadioPowerCalculatorTest
CTS-Coverage-Bug: 213437796
(cherry-picked from ag/16548638)
Change-Id: I584897ff8ba303c717a9df3756c9f6778c1cfb10
Merged-In: I584897ff8ba303c717a9df3756c9f6778c1cfb10
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
MobileRadioPowerCalculatorTest
CTS-Coverage-Bug: 213437796
(cherry-picked from ag/16548638)
Change-Id: I584897ff8ba303c717a9df3756c9f6778c1cfb10
Merged-In: I584897ff8ba303c717a9df3756c9f6778c1cfb10
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
MobileRadioPowerCalculatorTest
CTS-Coverage-Bug: 213437796
Change-Id: I584897ff8ba303c717a9df3756c9f6778c1cfb10
This change also remove getWifiNetworkKey which should not be exposed
as system API.
Test: atest NetworkTemplateTest
Bug: 204830222
Change-Id: I924f62025a8672167f778ff790cd208c74eed878
This change also remove getWifiNetworkKey which should not be exposed
as system API.
Test: atest NetworkTemplateTest
Bug: 204830222
Change-Id: I924f62025a8672167f778ff790cd208c74eed878
Use public resource since IpSec is planed to be moved into
Connectivity mainline module.
Bug: 204153604
Test: build
Change-Id: I0aafef6b9b08307c3aebce597a2dd24925c6b09a
1. Used SSID to be a wifi network identity can't separate wifi
data usage when there are two different network with same SSID.
Use a new usage key from WifiInfo to replace wifi SSID to solve
this issue.
2. To support to query wifi usage per configured Wifi network.
Adding matchWifiNetworkKeys in NetworkTemplate to support querying
multi networkKeys wifi data usage since each configured Wifi
network configuration might be used to connect different Wifi
network. (Replace mNetworkId with mMatchWifiNetworkKeys)
3. Updated callers who were using NetworkTemplate constructor.
4. Fixed SortedSet null order case. The null subscriberId is a
valid input for matchSubscriberIds.
5. Replaced ArrayUtils with CollectionUtils.
Bug: 197520752
Bug: 126299427
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c NetworkPolicyManagerServiceTest
Test: atest -c NetworkPolicyTest
Change-Id: Ie20e7fb56597817901be4ce1d2a7afcbc9ded0c6
1. Used SSID to be a wifi network identity can't separate wifi
data usage when there are two different network with same SSID.
Use a new usage key from WifiInfo to replace wifi SSID to solve
this issue.
2. To support to query wifi usage per configured Wifi network.
Adding matchWifiNetworkKeys in NetworkTemplate to support querying
multi networkKeys wifi data usage since each configured Wifi
network configuration might be used to connect different Wifi
network. (Replace mNetworkId with mMatchWifiNetworkKeys)
3. Updated callers who were using NetworkTemplate constructor.
4. Fixed SortedSet null order case. The null subscriberId is a
valid input for matchSubscriberIds.
5. Replaced ArrayUtils with CollectionUtils.
Bug: 197520752
Bug: 126299427
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c NetworkPolicyManagerServiceTest
Test: atest -c NetworkPolicyTest
Change-Id: Ie20e7fb56597817901be4ce1d2a7afcbc9ded0c6
DataUnit is a hidden class, remove the references to
it from files that about to be moved into the module.
Test: TH
Bug: 204830222
Change-Id: Ibfb82ab74f283686fb2af6c3a550d541440c890d
DataUnit is a hidden class, remove the references to
it from files that about to be moved into the module.
Test: TH
Bug: 204830222
Change-Id: Ibfb82ab74f283686fb2af6c3a550d541440c890d
This includes:
1. Use android.util.IndentingPrintWriter instead of the
deprecated internal one.
2. Replace usages of IntArray with CollectionUtils and ArrayList.
3. Replace usages of ArrayUtils with CollectionUtils.
4. Refactor MathUtils.constrain functions into NetworkStatsUtils.
5. Replace Maps.newHashMap and Lists.newArrayList with public
class constructors.
6. Replace Slog with Log.
Test: FrameworksNetTests NetworkStaticLibTests
Bug: 204830222
Change-Id: If009194ad5668a6d48dd341ea6d325028ce56d42
This includes:
1. Use android.util.IndentingPrintWriter instead of the
deprecated internal one.
2. Replace usages of IntArray with CollectionUtils and ArrayList.
3. Replace usages of ArrayUtils with CollectionUtils.
4. Refactor MathUtils.constrain functions into NetworkStatsUtils.
5. Replace Maps.newHashMap and Lists.newArrayList with public
class constructors.
6. Replace Slog with Log.
Test: FrameworksNetTests NetworkStaticLibTests
Bug: 204830222
Change-Id: If009194ad5668a6d48dd341ea6d325028ce56d42
Remove ServiceManager hidden API dependency because this class
is going to be moved into mainline module. Thus have IpSecTransform
calls createTransform and deleteTransform through IpSecManager to
remove the ServiceManager usage.
Bug: 204153604
Test: FrameworksNetTests
Change-Id: Iba48da4aecac1080684d5a7e7e7ca2e31219591a
Remove ServiceManager hidden API dependency because this class
is going to be moved into mainline module. Thus have IpSecTransform
calls createTransform and deleteTransform through IpSecManager to
remove the ServiceManager usage.
Bug: 204153604
Test: FrameworksNetTests
Change-Id: Iba48da4aecac1080684d5a7e7e7ca2e31219591a
Follow-up from ag/2815797, callers who uses the hidden API
will have their data augmented by default, and the public
API offers a way to opt-into augmentation.
However, since the data usage is going to the module.
All the hidden API usage must be eliminated. Also, from user
perspective, it is better for UI and API to have aligned
behavior.
Thus, enable augment data usage for public API callers.
Test: atest FrameworksNetTests \
android.app.usage.cts.NetworkUsageStatsTest
Bug: 204830222
Change-Id: Ida254fac8d44c32d388f1886a866f7324a41ce75
Follow-up from ag/2815797, callers who uses the hidden API
will have their data augmented by default, and the public
API offers a way to opt-into augmentation.
However, since the data usage is going to the module.
All the hidden API usage must be eliminated. Also, from user
perspective, it is better for UI and API to have aligned
behavior.
Thus, enable augment data usage for public API callers.
Test: atest FrameworksNetTests \
android.app.usage.cts.NetworkUsageStatsTest
Bug: 204830222
Change-Id: Ida254fac8d44c32d388f1886a866f7324a41ce75
These internal methods are used in MultipathPolicyTracker and
NetworkPolicyManagementService. getNetworkTotalBytes is used
to query total bytes regarding to the specified NetworkPolicy,
to see how much data quota is used. getNetworkUidBytes is used
to find the app to blame for rapid data usage.
These methods needs to be replaced by public APIs in follow-up
patches.
Test: TH
Bug: 204830222
Change-Id: Iec9cc7a07397ec2bbc6c3d2559fc3680b149cb8a
These internal methods are used in MultipathPolicyTracker and
NetworkPolicyManagementService. getNetworkTotalBytes is used
to query total bytes regarding to the specified NetworkPolicy,
to see how much data quota is used. getNetworkUidBytes is used
to find the app to blame for rapid data usage.
These methods needs to be replaced by public APIs in follow-up
patches.
Test: TH
Bug: 204830222
Change-Id: Iec9cc7a07397ec2bbc6c3d2559fc3680b149cb8a