diff options
| -rw-r--r-- | core/java/com/android/internal/compat/ChangeReporter.java | 16 | ||||
| -rw-r--r-- | services/core/java/com/android/server/compat/PlatformCompat.java | 15 |
2 files changed, 15 insertions, 16 deletions
diff --git a/core/java/com/android/internal/compat/ChangeReporter.java b/core/java/com/android/internal/compat/ChangeReporter.java index c50ff356f935..e0eb9af8b228 100644 --- a/core/java/com/android/internal/compat/ChangeReporter.java +++ b/core/java/com/android/internal/compat/ChangeReporter.java @@ -18,10 +18,10 @@ package com.android.internal.compat; import android.util.Log; import android.util.Slog; +import android.util.StatsLog; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; -import com.android.internal.util.FrameworkStatsLog; import java.util.HashMap; import java.util.HashSet; @@ -85,8 +85,8 @@ public final class ChangeReporter { */ public void reportChange(int uid, long changeId, int state) { if (shouldWriteToStatsLog(uid, changeId, state)) { - FrameworkStatsLog.write(FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED, uid, - changeId, state, mSource); + StatsLog.write(StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED, uid, changeId, + state, mSource); } if (shouldWriteToDebug(uid, changeId, state)) { debugLog(uid, changeId, state); @@ -174,7 +174,7 @@ public final class ChangeReporter { private void debugLog(int uid, long changeId, int state) { String message = String.format("Compat change id reported: %d; UID %d; state: %s", changeId, uid, stateToString(state)); - if (mSource == FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER) { + if (mSource == StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER) { Slog.d(TAG, message); } else { Log.d(TAG, message); @@ -183,18 +183,18 @@ public final class ChangeReporter { } /** - * Transforms FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE enum to a string. + * Transforms StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE enum to a string. * * @param state to transform * @return a string representing the state */ private static String stateToString(int state) { switch (state) { - case FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__LOGGED: + case StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__LOGGED: return "LOGGED"; - case FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__ENABLED: + case StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__ENABLED: return "ENABLED"; - case FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__DISABLED: + case StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__DISABLED: return "DISABLED"; default: return "UNKNOWN"; diff --git a/services/core/java/com/android/server/compat/PlatformCompat.java b/services/core/java/com/android/server/compat/PlatformCompat.java index 47bb5f397aaa..4d5af9ac5d5c 100644 --- a/services/core/java/com/android/server/compat/PlatformCompat.java +++ b/services/core/java/com/android/server/compat/PlatformCompat.java @@ -30,6 +30,7 @@ import android.os.Binder; import android.os.RemoteException; import android.os.UserHandle; import android.util.Slog; +import android.util.StatsLog; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.compat.AndroidBuildClassifier; @@ -39,7 +40,6 @@ import com.android.internal.compat.CompatibilityChangeInfo; import com.android.internal.compat.IOverrideValidator; import com.android.internal.compat.IPlatformCompat; import com.android.internal.util.DumpUtils; -import com.android.internal.util.FrameworkStatsLog; import com.android.server.LocalServices; import java.io.FileDescriptor; @@ -59,7 +59,7 @@ public class PlatformCompat extends IPlatformCompat.Stub { public PlatformCompat(Context context) { mContext = context; mChangeReporter = new ChangeReporter( - FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER); + StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER); mCompatConfig = CompatConfig.create(new AndroidBuildClassifier(), mContext); } @@ -67,7 +67,7 @@ public class PlatformCompat extends IPlatformCompat.Stub { PlatformCompat(Context context, CompatConfig compatConfig) { mContext = context; mChangeReporter = new ChangeReporter( - FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER); + StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER); mCompatConfig = compatConfig; } @@ -75,7 +75,7 @@ public class PlatformCompat extends IPlatformCompat.Stub { public void reportChange(long changeId, ApplicationInfo appInfo) { checkCompatChangeLogPermission(); reportChange(changeId, appInfo.uid, - FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__LOGGED); + StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__LOGGED); } @Override @@ -91,8 +91,7 @@ public class PlatformCompat extends IPlatformCompat.Stub { @Override public void reportChangeByUid(long changeId, int uid) { checkCompatChangeLogPermission(); - reportChange(changeId, uid, - FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__LOGGED); + reportChange(changeId, uid, StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__LOGGED); } @Override @@ -100,11 +99,11 @@ public class PlatformCompat extends IPlatformCompat.Stub { checkCompatChangeReadPermission(); if (mCompatConfig.isChangeEnabled(changeId, appInfo)) { reportChange(changeId, appInfo.uid, - FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__ENABLED); + StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__ENABLED); return true; } reportChange(changeId, appInfo.uid, - FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__DISABLED); + StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__STATE__DISABLED); return false; } |