Log change in autolock settings

Bug: 327181532
Test: statsd_testdrive https://paste.googleplex.com/4866138112000000
Change-Id: I4133e35ff343e32261cb0fc190af4a32474b69e3
This commit is contained in:
Anna Zhuravleva
2024-03-04 13:08:21 +00:00
parent 1922746789
commit cbc0ec7111

View File

@@ -38,6 +38,8 @@ import java.util.List;
public class AutoLockSettingsFragment extends RadioButtonPickerFragment {
private static final String TAG = "PSAutoLockSetting";
private static final String AUTOLOCK_METRIC_KEY = "private_space_autolock_mode";
private PrivateSpaceMaintainer mPrivateSpaceMaintainer;
private CharSequence[] mAutoLockRadioOptions;
private CharSequence[] mAutoLockRadioValues;
@@ -111,6 +113,12 @@ public class AutoLockSettingsFragment extends RadioButtonPickerFragment {
try {
@Settings.Secure.PrivateSpaceAutoLockOption final int value = Integer.parseInt(key);
mPrivateSpaceMaintainer.setPrivateSpaceAutoLockSetting(value);
mMetricsFeatureProvider.action(
mMetricsFeatureProvider.getAttribution(getActivity()),
SettingsEnums.ACTION_SET_PRIVATE_SPACE_AUTOLOCK,
getMetricsCategory(),
AUTOLOCK_METRIC_KEY,
value /* value */);
} catch (NumberFormatException e) {
Log.e(TAG, "could not persist screen timeout setting", e);
}