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

Commit 6f207105 authored by Muhammad Qureshi's avatar Muhammad Qureshi
Browse files

Use FrameworkStatsLog instead of StatsLog

As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by
*StatsLog.java
that is autogenerated for each module.
This CL replaces some usages of StatsLog with
FrameworkStatsLog.

Bug: 145952197
Test: m
Change-Id: I74f9614fc8866dd1c5875ee1b240c808613b8625
parent 47c9ac72
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -23,7 +23,8 @@ import android.telephony.CarrierConfigManager;
import android.telephony.SubscriptionManager;
import android.text.TextUtils;
import android.util.Log;
import android.util.StatsLog;

import com.android.internal.util.FrameworkStatsLog;

import libcore.io.IoUtils;

@@ -283,7 +284,7 @@ class GnssConfiguration {
    }

    private void logConfigurations() {
        StatsLog.write(StatsLog.GNSS_CONFIGURATION_REPORTED,
        FrameworkStatsLog.write(FrameworkStatsLog.GNSS_CONFIGURATION_REPORTED,
                getSuplHost(),
                getSuplPort(0),
                getC2KHost(),
+5 −5
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ import android.telephony.TelephonyManager;
import android.telephony.gsm.GsmCellLocation;
import android.text.TextUtils;
import android.util.Log;
import android.util.StatsLog;
import android.util.TimeUtils;

import com.android.internal.annotations.GuardedBy;
@@ -75,6 +74,7 @@ import com.android.internal.location.GpsNetInitiatedHandler.GpsNiNotification;
import com.android.internal.location.ProviderProperties;
import com.android.internal.location.ProviderRequest;
import com.android.internal.location.gnssmetrics.GnssMetrics;
import com.android.internal.util.FrameworkStatsLog;
import com.android.server.DeviceIdleInternal;
import com.android.server.LocalServices;
import com.android.server.location.GnssSatelliteBlacklistHelper.GnssSatelliteBlacklistCallback;
@@ -1825,8 +1825,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
            }
            native_send_ni_response(notificationId, userResponse);

            StatsLog.write(StatsLog.GNSS_NI_EVENT_REPORTED,
                    StatsLog.GNSS_NI_EVENT_REPORTED__EVENT_TYPE__NI_RESPONSE,
            FrameworkStatsLog.write(FrameworkStatsLog.GNSS_NI_EVENT_REPORTED,
                    FrameworkStatsLog.GNSS_NI_EVENT_REPORTED__EVENT_TYPE__NI_RESPONSE,
                    notificationId,
                    /* niType= */ 0,
                    /* needNotify= */ false,
@@ -1891,8 +1891,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
        notification.textEncoding = textEncoding;

        mNIHandler.handleNiNotification(notification);
        StatsLog.write(StatsLog.GNSS_NI_EVENT_REPORTED,
                StatsLog.GNSS_NI_EVENT_REPORTED__EVENT_TYPE__NI_REQUEST,
        FrameworkStatsLog.write(FrameworkStatsLog.GNSS_NI_EVENT_REPORTED,
                FrameworkStatsLog.GNSS_NI_EVENT_REPORTED__EVENT_TYPE__NI_REQUEST,
                notification.notificationId,
                notification.niType,
                notification.needNotify,
+2 −2
Original line number Diff line number Diff line
@@ -36,11 +36,11 @@ import android.os.UserHandle;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
import android.util.StatsLog;

import com.android.internal.R;
import com.android.internal.location.GpsNetInitiatedHandler;
import com.android.internal.notification.SystemNotificationChannels;
import com.android.internal.util.FrameworkStatsLog;

import java.util.Arrays;
import java.util.List;
@@ -650,7 +650,7 @@ class GnssVisibilityControl {
    }

    private void logEvent(NfwNotification notification, boolean isPermissionMismatched) {
        StatsLog.write(StatsLog.GNSS_NFW_NOTIFICATION_REPORTED,
        FrameworkStatsLog.write(FrameworkStatsLog.GNSS_NFW_NOTIFICATION_REPORTED,
                notification.mProxyAppPackageName,
                notification.mProtocolStack,
                notification.mOtherProtocolStackName,
+5 −4
Original line number Diff line number Diff line
@@ -24,9 +24,9 @@ import android.location.LocationManager;
import android.location.LocationRequest;
import android.stats.location.LocationStatsEnums;
import android.util.Log;
import android.util.StatsLog;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.FrameworkStatsLog;

import java.time.Instant;

@@ -61,8 +61,8 @@ public class LocationUsageLogger {
            boolean isLocationRequestNull = locationRequest == null;
            boolean isGeofenceNull = geofence == null;

            StatsLog.write(StatsLog.LOCATION_MANAGER_API_USAGE_REPORTED, usageType,
                    apiInUse, packageName,
            FrameworkStatsLog.write(FrameworkStatsLog.LOCATION_MANAGER_API_USAGE_REPORTED,
                    usageType, apiInUse, packageName,
                    isLocationRequestNull
                        ? LocationStatsEnums.PROVIDER_UNKNOWN
                        : bucketizeProvider(locationRequest.getProvider()),
@@ -101,7 +101,8 @@ public class LocationUsageLogger {
                return;
            }

            StatsLog.write(StatsLog.LOCATION_MANAGER_API_USAGE_REPORTED, usageType, apiInUse,
            FrameworkStatsLog.write(FrameworkStatsLog.LOCATION_MANAGER_API_USAGE_REPORTED,
                    usageType, apiInUse,
                    /* package_name= */ null,
                    bucketizeProvider(providerName),
                    LocationStatsEnums.QUALITY_UNKNOWN,