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

Commit faa577b2 authored by Junyu Lai's avatar Junyu Lai Committed by Automerger Merge Worker
Browse files

Merge "[MS43] Remove EventLogTags depdendency" am: ea6321a1 am: 1529463a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938798

Change-Id: Idcb86db0f3bdd298dbba16781e300b48ee30e94b
parents 9101f315 1529463a
Loading
Loading
Loading
Loading
+10 −3
Original line number Original line Diff line number Diff line
@@ -155,7 +155,6 @@ import com.android.net.module.util.BinderUtils;
import com.android.net.module.util.CollectionUtils;
import com.android.net.module.util.CollectionUtils;
import com.android.net.module.util.NetworkStatsUtils;
import com.android.net.module.util.NetworkStatsUtils;
import com.android.net.module.util.PermissionUtils;
import com.android.net.module.util.PermissionUtils;
import com.android.server.EventLogTags;
import com.android.server.LocalServices;
import com.android.server.LocalServices;


import java.io.File;
import java.io.File;
@@ -209,6 +208,14 @@ public class NetworkStatsService extends INetworkStatsService.Stub {


    private static final String TAG_NETSTATS_ERROR = "netstats_error";
    private static final String TAG_NETSTATS_ERROR = "netstats_error";


    /**
     * EventLog tags used when logging into the event log. Note the values must be sync with
     * frameworks/base/services/core/java/com/android/server/EventLogTags.logtags to get correct
     * name translation.
      */
    private static final int LOG_TAG_NETSTATS_MOBILE_SAMPLE = 51100;
    private static final int LOG_TAG_NETSTATS_WIFI_SAMPLE = 51101;

    private final Context mContext;
    private final Context mContext;
    private final NetworkStatsFactory mStatsFactory;
    private final NetworkStatsFactory mStatsFactory;
    private final AlarmManager mAlarmManager;
    private final AlarmManager mAlarmManager;
@@ -1624,7 +1631,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
        xtTotal = mXtRecorder.getTotalSinceBootLocked(template);
        xtTotal = mXtRecorder.getTotalSinceBootLocked(template);
        uidTotal = mUidRecorder.getTotalSinceBootLocked(template);
        uidTotal = mUidRecorder.getTotalSinceBootLocked(template);


        EventLogTags.writeNetstatsMobileSample(
        EventLog.writeEvent(LOG_TAG_NETSTATS_MOBILE_SAMPLE,
                devTotal.rxBytes, devTotal.rxPackets, devTotal.txBytes, devTotal.txPackets,
                devTotal.rxBytes, devTotal.rxPackets, devTotal.txBytes, devTotal.txPackets,
                xtTotal.rxBytes, xtTotal.rxPackets, xtTotal.txBytes, xtTotal.txPackets,
                xtTotal.rxBytes, xtTotal.rxPackets, xtTotal.txBytes, xtTotal.txPackets,
                uidTotal.rxBytes, uidTotal.rxPackets, uidTotal.txBytes, uidTotal.txPackets,
                uidTotal.rxBytes, uidTotal.rxPackets, uidTotal.txBytes, uidTotal.txPackets,
@@ -1636,7 +1643,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
        xtTotal = mXtRecorder.getTotalSinceBootLocked(template);
        xtTotal = mXtRecorder.getTotalSinceBootLocked(template);
        uidTotal = mUidRecorder.getTotalSinceBootLocked(template);
        uidTotal = mUidRecorder.getTotalSinceBootLocked(template);


        EventLogTags.writeNetstatsWifiSample(
        EventLog.writeEvent(LOG_TAG_NETSTATS_WIFI_SAMPLE,
                devTotal.rxBytes, devTotal.rxPackets, devTotal.txBytes, devTotal.txPackets,
                devTotal.rxBytes, devTotal.rxPackets, devTotal.txBytes, devTotal.txPackets,
                xtTotal.rxBytes, xtTotal.rxPackets, xtTotal.txBytes, xtTotal.txPackets,
                xtTotal.rxBytes, xtTotal.rxPackets, xtTotal.txBytes, xtTotal.txPackets,
                uidTotal.rxBytes, uidTotal.rxPackets, uidTotal.txBytes, uidTotal.txPackets,
                uidTotal.rxBytes, uidTotal.rxPackets, uidTotal.txBytes, uidTotal.txPackets,