Updates to use flash notification settings keys in settings provider
Previously we hard-coded the settings key in FlashNotificationUtils. Change to use internal system settings key for retrieving flash notification settings from the database. Bug: 266775683 Test: make RunSettingsRoboTests ROBOTEST_FILTER=CameraFlashNotificationPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=ScreenFlashNotificationPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=FlashNotificationsPreviewPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=FlashNotificationsUtilTest Change-Id: I1e7a0c4ed58505cfb3c06e43af866744fa1b2d41
This commit is contained in:
@@ -18,7 +18,6 @@ package com.android.settings.accessibility;
|
||||
|
||||
import static com.android.settings.accessibility.AccessibilityUtil.State.OFF;
|
||||
import static com.android.settings.accessibility.AccessibilityUtil.State.ON;
|
||||
import static com.android.settings.accessibility.FlashNotificationsUtil.SETTING_KEY_CAMERA_FLASH_NOTIFICATION;
|
||||
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
@@ -45,13 +44,13 @@ public class CameraFlashNotificationPreferenceController extends TogglePreferenc
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
return Settings.System.getInt(mContext.getContentResolver(),
|
||||
SETTING_KEY_CAMERA_FLASH_NOTIFICATION, OFF) != OFF;
|
||||
Settings.System.CAMERA_FLASH_NOTIFICATION, OFF) != OFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setChecked(boolean isChecked) {
|
||||
return Settings.System.putInt(mContext.getContentResolver(),
|
||||
SETTING_KEY_CAMERA_FLASH_NOTIFICATION, (isChecked ? ON : OFF));
|
||||
Settings.System.CAMERA_FLASH_NOTIFICATION, (isChecked ? ON : OFF));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user