Move the implement of getAllCollapsedRatTypes to StatsPullAtomService
To make data usage as a mainline module, move getAllCollapsedRatTypes to StatsPullAtomService since currently it is the only user. Also, the method needs to call getCollapsedRatType, thus move getCollapsedRatType to NetworkStatsManager and expose it as module API. Bug: 210073043 Test: builds, FrameworksNetTests Change-Id: Ibe41b50f173464694c21dd22841552bdb69a6a14
This commit is contained in:
@@ -244,7 +244,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
/**
|
||||
* When enabled, all mobile data is reported under {@link NetworkTemplate#NETWORK_TYPE_ALL}.
|
||||
* When disabled, mobile data is broken down by a granular ratType representative of the
|
||||
* actual ratType. {@see NetworkTemplate#getCollapsedRatType}.
|
||||
* actual ratType. {@see android.app.usage.NetworkStatsManager#getCollapsedRatType}.
|
||||
* Enabling this decreases the level of detail but saves performance, disk space and
|
||||
* amount of data logged.
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package com.android.server.net;
|
||||
|
||||
import static android.app.usage.NetworkStatsManager.NETWORK_TYPE_5G_NSA;
|
||||
import static android.net.NetworkTemplate.getCollapsedRatType;
|
||||
import static android.app.usage.NetworkStatsManager.getCollapsedRatType;
|
||||
import static android.telephony.TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_ADVANCED;
|
||||
import static android.telephony.TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA;
|
||||
import static android.telephony.TelephonyManager.NETWORK_TYPE_LTE;
|
||||
@@ -57,7 +57,7 @@ public class NetworkStatsSubscriptionsMonitor extends
|
||||
*
|
||||
* @param subscriberId IMSI of the subscription.
|
||||
* @param collapsedRatType collapsed RAT type.
|
||||
* @see android.net.NetworkTemplate#getCollapsedRatType(int).
|
||||
* @see android.app.usage.NetworkStatsManager#getCollapsedRatType(int).
|
||||
*/
|
||||
void onCollapsedRatTypeChanged(@NonNull String subscriberId,
|
||||
@Annotation.NetworkType int collapsedRatType);
|
||||
|
||||
Reference in New Issue
Block a user