Loading res/xml/accessibility_vibration_settings.xml +4 −3 Original line number Diff line number Diff line Loading @@ -46,16 +46,17 @@ <PreferenceCategory android:key="vibration_category_notification_alarm" android:title="@string/accessibility_notification_alarm_vibration_category_title"> android:title="@string/accessibility_notification_alarm_vibration_category_title" android:persistent="false"> <SwitchPreferenceCompat android:key="vibration_preference_notification" android:key="notification_vibration_intensity" android:title="@string/accessibility_notification_vibration_title" app:keywords="@string/keywords_notification_vibration" app:controller="com.android.settings.accessibility.NotificationVibrationTogglePreferenceController" /> <SwitchPreferenceCompat android:key="vibration_preference_alarm" android:key="alarm_vibration_intensity" android:title="@string/accessibility_alarm_vibration_title" app:keywords="@string/keywords_alarm_vibration" app:controller="com.android.settings.accessibility.AlarmVibrationTogglePreferenceController" /> Loading src/com/android/settings/accessibility/AlarmVibrationIntensitySwitchPreference.kt 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.settings.accessibility import android.os.VibrationAttributes import android.provider.Settings import com.android.settings.R /** Accessibility settings for alarm vibration. */ // LINT.IfChange class AlarmVibrationIntensitySwitchPreference : VibrationIntensitySwitchPreference( key = KEY, vibrationUsage = VibrationAttributes.USAGE_ALARM, title = R.string.accessibility_alarm_vibration_title, ) { override val keywords: Int get() = R.string.keywords_alarm_vibration companion object { const val KEY = Settings.System.ALARM_VIBRATION_INTENSITY } } // LINT.ThenChange(AlarmVibrationTogglePreferenceController.java) src/com/android/settings/accessibility/AlarmVibrationTogglePreferenceController.java +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import com.android.settings.accessibility.AlarmVibrationIntensityPreferenceController.AlarmVibrationPreferenceConfig; /** Preference controller for alarm vibration with only a toggle for on/off states. */ // LINT.IfChange public class AlarmVibrationTogglePreferenceController extends VibrationTogglePreferenceController { public AlarmVibrationTogglePreferenceController(Context context, String preferenceKey) { Loading @@ -32,3 +33,4 @@ public class AlarmVibrationTogglePreferenceController extends VibrationTogglePre return AVAILABLE; } } // LINT.ThenChange(AlarmVibrationIntensitySwitchPreference.java) src/com/android/settings/accessibility/NotificationVibrationIntensitySwitchPreference.kt 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.settings.accessibility import android.os.VibrationAttributes import android.provider.Settings import com.android.settings.R /** Accessibility settings for notification vibration. */ // LINT.IfChange class NotificationVibrationIntensitySwitchPreference : VibrationIntensitySwitchPreference( key = KEY, vibrationUsage = VibrationAttributes.USAGE_NOTIFICATION, title = R.string.accessibility_notification_vibration_title, ) { override val keywords: Int get() = R.string.keywords_notification_vibration companion object { const val KEY = Settings.System.NOTIFICATION_VIBRATION_INTENSITY } } // LINT.ThenChange(NotificationVibrationTogglePreferenceController.java) src/com/android/settings/accessibility/NotificationVibrationTogglePreferenceController.java +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import com.android.settings.accessibility.NotificationVibrationIntensityPreferenceController.NotificationVibrationPreferenceConfig; /** Preference controller for notification vibration with only a toggle for on/off states. */ // LINT.IfChange public class NotificationVibrationTogglePreferenceController extends VibrationTogglePreferenceController { Loading @@ -33,3 +34,4 @@ public class NotificationVibrationTogglePreferenceController return AVAILABLE; } } // LINT.ThenChange(NotificationVibrationIntensitySwitchPreference.java) Loading
res/xml/accessibility_vibration_settings.xml +4 −3 Original line number Diff line number Diff line Loading @@ -46,16 +46,17 @@ <PreferenceCategory android:key="vibration_category_notification_alarm" android:title="@string/accessibility_notification_alarm_vibration_category_title"> android:title="@string/accessibility_notification_alarm_vibration_category_title" android:persistent="false"> <SwitchPreferenceCompat android:key="vibration_preference_notification" android:key="notification_vibration_intensity" android:title="@string/accessibility_notification_vibration_title" app:keywords="@string/keywords_notification_vibration" app:controller="com.android.settings.accessibility.NotificationVibrationTogglePreferenceController" /> <SwitchPreferenceCompat android:key="vibration_preference_alarm" android:key="alarm_vibration_intensity" android:title="@string/accessibility_alarm_vibration_title" app:keywords="@string/keywords_alarm_vibration" app:controller="com.android.settings.accessibility.AlarmVibrationTogglePreferenceController" /> Loading
src/com/android/settings/accessibility/AlarmVibrationIntensitySwitchPreference.kt 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.settings.accessibility import android.os.VibrationAttributes import android.provider.Settings import com.android.settings.R /** Accessibility settings for alarm vibration. */ // LINT.IfChange class AlarmVibrationIntensitySwitchPreference : VibrationIntensitySwitchPreference( key = KEY, vibrationUsage = VibrationAttributes.USAGE_ALARM, title = R.string.accessibility_alarm_vibration_title, ) { override val keywords: Int get() = R.string.keywords_alarm_vibration companion object { const val KEY = Settings.System.ALARM_VIBRATION_INTENSITY } } // LINT.ThenChange(AlarmVibrationTogglePreferenceController.java)
src/com/android/settings/accessibility/AlarmVibrationTogglePreferenceController.java +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import com.android.settings.accessibility.AlarmVibrationIntensityPreferenceController.AlarmVibrationPreferenceConfig; /** Preference controller for alarm vibration with only a toggle for on/off states. */ // LINT.IfChange public class AlarmVibrationTogglePreferenceController extends VibrationTogglePreferenceController { public AlarmVibrationTogglePreferenceController(Context context, String preferenceKey) { Loading @@ -32,3 +33,4 @@ public class AlarmVibrationTogglePreferenceController extends VibrationTogglePre return AVAILABLE; } } // LINT.ThenChange(AlarmVibrationIntensitySwitchPreference.java)
src/com/android/settings/accessibility/NotificationVibrationIntensitySwitchPreference.kt 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.settings.accessibility import android.os.VibrationAttributes import android.provider.Settings import com.android.settings.R /** Accessibility settings for notification vibration. */ // LINT.IfChange class NotificationVibrationIntensitySwitchPreference : VibrationIntensitySwitchPreference( key = KEY, vibrationUsage = VibrationAttributes.USAGE_NOTIFICATION, title = R.string.accessibility_notification_vibration_title, ) { override val keywords: Int get() = R.string.keywords_notification_vibration companion object { const val KEY = Settings.System.NOTIFICATION_VIBRATION_INTENSITY } } // LINT.ThenChange(NotificationVibrationTogglePreferenceController.java)
src/com/android/settings/accessibility/NotificationVibrationTogglePreferenceController.java +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import com.android.settings.accessibility.NotificationVibrationIntensityPreferenceController.NotificationVibrationPreferenceConfig; /** Preference controller for notification vibration with only a toggle for on/off states. */ // LINT.IfChange public class NotificationVibrationTogglePreferenceController extends VibrationTogglePreferenceController { Loading @@ -33,3 +34,4 @@ public class NotificationVibrationTogglePreferenceController return AVAILABLE; } } // LINT.ThenChange(NotificationVibrationIntensitySwitchPreference.java)