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

Commit 2aa423dd authored by Daniel Nishi's avatar Daniel Nishi
Browse files

Log when the storage manager is toggled on and off.

Bug: 30095915
Change-Id: I9fe16f842f2c2944582ec231803aa957573abead
parent f7e45339
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.support.v7.preference.Preference;
import android.support.v7.preference.Preference.OnPreferenceChangeListener;
import android.support.v7.preference.PreferenceScreen;

import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
@@ -120,6 +121,8 @@ public class AutomaticStorageManagerSettings extends SettingsPreferenceFragment
        switch (preference.getKey()) {
            case KEY_STORAGE_MANAGER_SWITCH:
                boolean checked = (boolean) newValue;
                MetricsLogger.action(getContext(), MetricsEvent.ACTION_TOGGLE_STORAGE_MANAGER,
                        checked);
                mDaysToRetain.setEnabled(checked);
                Settings.Secure.putInt(getContentResolver(),
                        Settings.Secure.AUTOMATIC_STORAGE_MANAGER_ENABLED, checked ? 1 : 0);