Log change in autolock settings
Bug: 327181532 Test: statsd_testdrive https://paste.googleplex.com/4866138112000000 Change-Id: I4133e35ff343e32261cb0fc190af4a32474b69e3
This commit is contained in:
@@ -38,6 +38,8 @@ import java.util.List;
|
|||||||
|
|
||||||
public class AutoLockSettingsFragment extends RadioButtonPickerFragment {
|
public class AutoLockSettingsFragment extends RadioButtonPickerFragment {
|
||||||
private static final String TAG = "PSAutoLockSetting";
|
private static final String TAG = "PSAutoLockSetting";
|
||||||
|
|
||||||
|
private static final String AUTOLOCK_METRIC_KEY = "private_space_autolock_mode";
|
||||||
private PrivateSpaceMaintainer mPrivateSpaceMaintainer;
|
private PrivateSpaceMaintainer mPrivateSpaceMaintainer;
|
||||||
private CharSequence[] mAutoLockRadioOptions;
|
private CharSequence[] mAutoLockRadioOptions;
|
||||||
private CharSequence[] mAutoLockRadioValues;
|
private CharSequence[] mAutoLockRadioValues;
|
||||||
@@ -111,6 +113,12 @@ public class AutoLockSettingsFragment extends RadioButtonPickerFragment {
|
|||||||
try {
|
try {
|
||||||
@Settings.Secure.PrivateSpaceAutoLockOption final int value = Integer.parseInt(key);
|
@Settings.Secure.PrivateSpaceAutoLockOption final int value = Integer.parseInt(key);
|
||||||
mPrivateSpaceMaintainer.setPrivateSpaceAutoLockSetting(value);
|
mPrivateSpaceMaintainer.setPrivateSpaceAutoLockSetting(value);
|
||||||
|
mMetricsFeatureProvider.action(
|
||||||
|
mMetricsFeatureProvider.getAttribution(getActivity()),
|
||||||
|
SettingsEnums.ACTION_SET_PRIVATE_SPACE_AUTOLOCK,
|
||||||
|
getMetricsCategory(),
|
||||||
|
AUTOLOCK_METRIC_KEY,
|
||||||
|
value /* value */);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
Log.e(TAG, "could not persist screen timeout setting", e);
|
Log.e(TAG, "could not persist screen timeout setting", e);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user