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

Commit 9dcaef68 authored by Fan Zhang's avatar Fan Zhang
Browse files

Clean up SharedPreferencesLogger.

We no longer need to log this as logging framework has evolved.

And expose a generic action logging method to leverage StatsLog stuff
later.

Bug: 117860032
Test: manual
Change-Id: Ic5586e5cd6cae8c13fb5420c44ed5b6d857857ff
parent f517f971
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -65,6 +65,15 @@ public class MetricsFeatureProvider {
        }
    }

    /**
     * Logs a generic Settings event.
     */
    public void action(int attribution, int action, int pageId, String key, int value) {
        for (LogWriter writer : mLoggerWriters) {
            writer.action(attribution, action, pageId, key, value);
        }
    }

    public void action(Context context, int category, int value) {
        for (LogWriter writer : mLoggerWriters) {
            writer.action(context, category, value);
+0 −2
Original line number Diff line number Diff line
@@ -116,8 +116,6 @@ public class SharedPreferencesLogger implements SharedPreferences {
            mPreferenceKeySet.add(prefKey);
            return;
        }
        // TODO: Remove count logging to save some resource.
        mMetricsFeature.count(mContext, buildCountName(prefKey, value), 1);

        final Pair<Integer, Object> valueData;
        if (value instanceof Long) {