diff --git a/res/values/strings.xml b/res/values/strings.xml index 3e96e1de6e5..4a02ffb425c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -132,6 +132,8 @@ Hearing device shortcut, hearing aid compatibility Audio output + + About audio output Route sounds to your hearing device or phone speaker @@ -4630,6 +4632,8 @@ %1$s +1 more Pair new device + + About Pair new device Hearing devices @@ -4642,6 +4646,8 @@ Hearing aid compatibility Improves compatibility with telecoils and reduces unwanted noise + + About hearing devices Make sure your hearing device is turned on and ready to pair @@ -11914,8 +11920,10 @@ Fingerprint sensor - + Flash notifications + + About flash notifications Off diff --git a/res/xml/accessibility_hearing_aids.xml b/res/xml/accessibility_hearing_aids.xml index 7ff571d7fe9..e813cf2b47d 100644 --- a/res/xml/accessibility_hearing_aids.xml +++ b/res/xml/accessibility_hearing_aids.xml @@ -57,5 +57,6 @@ android:key="hearing_device_footer" android:title="@string/accessibility_hearing_device_footer_summary" android:selectable="false" - settings:searchable="false" /> + settings:searchable="false" + settings:controller="com.android.settings.accessibility.HearingDeviceFooterPreferenceController"/> \ No newline at end of file diff --git a/res/xml/bluetooth_audio_routing_fragment.xml b/res/xml/bluetooth_audio_routing_fragment.xml index 854ab3f2b41..5edf6cdca41 100644 --- a/res/xml/bluetooth_audio_routing_fragment.xml +++ b/res/xml/bluetooth_audio_routing_fragment.xml @@ -64,6 +64,7 @@ android:key="hearing_device_footer" android:title="@string/bluetooth_audio_routing_footer_summary" android:selectable="false" - settings:searchable="false" /> + settings:searchable="false" + settings:controller="com.android.settings.bluetooth.BluetoothDetailsAudioRoutingFooterPreferenceController"/> diff --git a/res/xml/flash_notifications_settings.xml b/res/xml/flash_notifications_settings.xml index 52f0b103031..749648614ae 100644 --- a/res/xml/flash_notifications_settings.xml +++ b/res/xml/flash_notifications_settings.xml @@ -46,10 +46,11 @@ android:title="@string/flash_notifications_preview" settings:controller="com.android.settings.accessibility.FlashNotificationsPreviewPreferenceController" /> - + android:selectable="false" + settings:searchable="false" + settings:controller="com.android.settings.accessibility.FlashNotificationsFooterPreferenceController"/> diff --git a/res/xml/hearing_device_pairing_detail.xml b/res/xml/hearing_device_pairing_detail.xml index 65cc6c72a13..29a611879a7 100644 --- a/res/xml/hearing_device_pairing_detail.xml +++ b/res/xml/hearing_device_pairing_detail.xml @@ -37,6 +37,7 @@ android:key="hearing_device_footer" android:title="@string/accessibility_hearing_device_footer_summary" android:selectable="false" - settings:searchable="false" /> + settings:searchable="false" + settings:controller="com.android.settings.accessibility.PairHearingDeviceFooterPreferenceController"/> \ No newline at end of file diff --git a/src/com/android/settings/accessibility/FlashNotificationsFooterPreferenceController.java b/src/com/android/settings/accessibility/FlashNotificationsFooterPreferenceController.java new file mode 100644 index 00000000000..0847c37aa1a --- /dev/null +++ b/src/com/android/settings/accessibility/FlashNotificationsFooterPreferenceController.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2023 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.content.Context; + +import com.android.settings.R; + +/** Preference controller for footer in flash notifications page. */ +public class FlashNotificationsFooterPreferenceController extends + AccessibilityFooterPreferenceController { + public FlashNotificationsFooterPreferenceController(Context context, + String key) { + super(context, key); + } + + @Override + protected String getIntroductionTitle() { + return mContext.getString(R.string.flash_notifications_about_title); + } +} diff --git a/src/com/android/settings/accessibility/HearingDeviceFooterPreferenceController.java b/src/com/android/settings/accessibility/HearingDeviceFooterPreferenceController.java new file mode 100644 index 00000000000..cd92448392a --- /dev/null +++ b/src/com/android/settings/accessibility/HearingDeviceFooterPreferenceController.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2023 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.content.Context; + +import com.android.settings.R; + +/** Preference controller for footer in hearing device page. */ +public class HearingDeviceFooterPreferenceController extends + AccessibilityFooterPreferenceController { + public HearingDeviceFooterPreferenceController(Context context, + String key) { + super(context, key); + } + + @Override + protected String getIntroductionTitle() { + return mContext.getString(R.string.accessibility_hearing_device_about_title); + } +} diff --git a/src/com/android/settings/accessibility/PairHearingDeviceFooterPreferenceController.java b/src/com/android/settings/accessibility/PairHearingDeviceFooterPreferenceController.java new file mode 100644 index 00000000000..09396ffd50d --- /dev/null +++ b/src/com/android/settings/accessibility/PairHearingDeviceFooterPreferenceController.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2023 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.content.Context; + +import com.android.settings.R; + +/** Preference controller for footer in pair hearing device page. */ +public class PairHearingDeviceFooterPreferenceController extends + AccessibilityFooterPreferenceController { + public PairHearingDeviceFooterPreferenceController(Context context, + String key) { + super(context, key); + } + + @Override + protected String getIntroductionTitle() { + return mContext.getString(R.string.accessibility_pair_hearing_device_about_title); + } +} diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsAudioRoutingFooterPreferenceController.java b/src/com/android/settings/bluetooth/BluetoothDetailsAudioRoutingFooterPreferenceController.java new file mode 100644 index 00000000000..d6bd0da43ff --- /dev/null +++ b/src/com/android/settings/bluetooth/BluetoothDetailsAudioRoutingFooterPreferenceController.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2023 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.bluetooth; + +import android.content.Context; + +import com.android.settings.R; +import com.android.settings.accessibility.AccessibilityFooterPreferenceController; + +/** Preference controller for footer in bluetooth details audio routing page. */ +public class BluetoothDetailsAudioRoutingFooterPreferenceController extends + AccessibilityFooterPreferenceController { + public BluetoothDetailsAudioRoutingFooterPreferenceController(Context context, + String key) { + super(context, key); + } + + @Override + protected String getIntroductionTitle() { + return mContext.getString(R.string.bluetooth_audio_routing_about_title); + } +}