Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0013740c authored by Vova Sharaienko's avatar Vova Sharaienko
Browse files

[StatsAtomPullService] Network_stats_manager_init_order_fix flag cleanup

Flag: NONE flag clean up after testing on Trunkfood
Bug: 331989853
Test: adb shell cmd stats print-stats | grep 10001
Change-Id: I39bb299198f62c55de5f2018f53c62354fdcd66c
parent 4eaa6e2e
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ import static com.android.internal.util.FrameworkStatsLog.TIME_ZONE_DETECTOR_STA
import static com.android.internal.util.FrameworkStatsLog.TIME_ZONE_DETECTOR_STATE__DETECTION_MODE__UNKNOWN;
import static com.android.server.am.MemoryStatUtil.readMemoryStatFromFilesystem;
import static com.android.server.stats.Flags.addMobileBytesTransferByProcStatePuller;
import static com.android.server.stats.Flags.statsPullNetworkStatsManagerInitOrderFix;
import static com.android.server.stats.pull.IonMemoryUtil.readProcessSystemIonHeapSizesFromDebugfs;
import static com.android.server.stats.pull.IonMemoryUtil.readSystemIonHeapSizeFromDebugfs;
import static com.android.server.stats.pull.ProcfsMemoryUtil.getProcessCmdlines;
@@ -431,12 +430,6 @@ public class StatsPullAtomService extends SystemService {
    public static final boolean ENABLE_MOBILE_DATA_STATS_AGGREGATED_PULLER =
                addMobileBytesTransferByProcStatePuller();

    /**
     * Whether or not to enable the mNetworkStatsManager initialization order fix
     */
    private static final boolean ENABLE_NETWORK_STATS_MANAGER_INIT_ORDER_FIX =
                statsPullNetworkStatsManagerInitOrderFix();

    // Puller locks
    private final Object mDataBytesTransferLock = new Object();
    private final Object mBluetoothBytesTransferLock = new Object();
@@ -840,7 +833,7 @@ public class StatsPullAtomService extends SystemService {
                registerEventListeners();
            });
        } else if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
            if (ENABLE_NETWORK_STATS_MANAGER_INIT_ORDER_FIX) {
            if (true) {
                initNetworkStatsManager();
            }
            BackgroundThread.getHandler().post(() -> {
@@ -863,7 +856,7 @@ public class StatsPullAtomService extends SystemService {
                mContext.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
        mStatsSubscriptionsListener = new StatsSubscriptionsListener(mSubscriptionManager);
        mStorageManager = (StorageManager) mContext.getSystemService(StorageManager.class);
        if (!ENABLE_NETWORK_STATS_MANAGER_INIT_ORDER_FIX) {
        if (false) {
            initNetworkStatsManager();
        }

@@ -1047,7 +1040,7 @@ public class StatsPullAtomService extends SystemService {
     */
    @NonNull
    private NetworkStatsManager getNetworkStatsManager() {
        if (ENABLE_NETWORK_STATS_MANAGER_INIT_ORDER_FIX) {
        if (true) {
            if (mNetworkStatsManager == null) {
                throw new IllegalStateException("NetworkStatsManager is not ready");
            }
+0 −8
Original line number Diff line number Diff line
@@ -8,11 +8,3 @@ flag {
    bug: "309512867"
    is_fixed_read_only: true
}

flag {
    name: "stats_pull_network_stats_manager_init_order_fix"
    namespace: "statsd"
    description: "Fix the mNetworkStatsManager initialization order"
    bug: "331989853"
    is_fixed_read_only: true
}