Loading core/java/com/android/internal/compat/ChangeReporter.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -77,10 +77,10 @@ public final class ChangeReporter { * @param state of the reported change - enabled/disabled/only logged * @param state of the reported change - enabled/disabled/only logged */ */ public void reportChange(int uid, long changeId, int state) { public void reportChange(int uid, long changeId, int state) { debugLog(uid, changeId, state); ChangeReport report = new ChangeReport(uid, changeId, state); ChangeReport report = new ChangeReport(uid, changeId, state); synchronized (mReportedChanges) { synchronized (mReportedChanges) { if (!mReportedChanges.contains(report)) { if (!mReportedChanges.contains(report)) { debugLog(uid, changeId, state); StatsLog.write(StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED, uid, changeId, StatsLog.write(StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED, uid, changeId, state, mSource); state, mSource); mReportedChanges.add(report); mReportedChanges.add(report); Loading @@ -89,7 +89,6 @@ public final class ChangeReporter { } } private void debugLog(int uid, long changeId, int state) { private void debugLog(int uid, long changeId, int state) { //TODO(b/138374585): Implement rate limiting for the logs. String message = String.format("Compat change id reported: %d; UID %d; state: %s", changeId, String message = String.format("Compat change id reported: %d; UID %d; state: %s", changeId, uid, stateToString(state)); uid, stateToString(state)); if (mSource == StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER) { if (mSource == StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER) { Loading Loading
core/java/com/android/internal/compat/ChangeReporter.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -77,10 +77,10 @@ public final class ChangeReporter { * @param state of the reported change - enabled/disabled/only logged * @param state of the reported change - enabled/disabled/only logged */ */ public void reportChange(int uid, long changeId, int state) { public void reportChange(int uid, long changeId, int state) { debugLog(uid, changeId, state); ChangeReport report = new ChangeReport(uid, changeId, state); ChangeReport report = new ChangeReport(uid, changeId, state); synchronized (mReportedChanges) { synchronized (mReportedChanges) { if (!mReportedChanges.contains(report)) { if (!mReportedChanges.contains(report)) { debugLog(uid, changeId, state); StatsLog.write(StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED, uid, changeId, StatsLog.write(StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED, uid, changeId, state, mSource); state, mSource); mReportedChanges.add(report); mReportedChanges.add(report); Loading @@ -89,7 +89,6 @@ public final class ChangeReporter { } } private void debugLog(int uid, long changeId, int state) { private void debugLog(int uid, long changeId, int state) { //TODO(b/138374585): Implement rate limiting for the logs. String message = String.format("Compat change id reported: %d; UID %d; state: %s", changeId, String message = String.format("Compat change id reported: %d; UID %d; state: %s", changeId, uid, stateToString(state)); uid, stateToString(state)); if (mSource == StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER) { if (mSource == StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER) { Loading