Loading AndroidManifest.xml +11 −0 Original line number Diff line number Diff line Loading @@ -3393,6 +3393,17 @@ android:value="true" /> </activity> <activity android:name="Settings$MediaControlsSettingsActivity" android:exported="true" android:label="@strings/media_controls_title"> <intent-filter> <action android:name="android.settings.ACTION_MEDIA_CONTROLS_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.sound.MediaControlsSettings" /> </activity> <!-- This is the longest AndroidManifest.xml ever. --> </application> </manifest> res/values/strings.xml +15 −0 Original line number Diff line number Diff line Loading @@ -12132,4 +12132,19 @@ <string name="overlay_settings_title">Allow screen overlays on Settings</string> <!-- Summary for allowing screen overlays on Settings app. [CHAR LIMIT=NONE]--> <string name="overlay_settings_summary">Allow apps that can display over other apps to overlay Settings screens</string> <!-- Title for media control settings [CHAR LIMIT=50]--> <string name="media_controls_title">Media</string> <!-- Summary for media control settings [CHAR LIMIT=50]--> <string name="media_controls_summary">Hide player when the media session has ended</string> <!-- Description of toggle to enable or disable the media resumption feature in quick settings [CHAR LIMIT=NONE]--> <string name="media_controls_resume_description">The player allows you to resume a session from the expanded Quick Settings panel.</string> <!-- Subtext for media settings when the player will be hidden [CHAR LIMIT=50] --> <string name="media_controls_hide_player">Hide player</string> <!-- Subtext for media settings when the player will be shown [CHAR LIMIT=50] --> <string name="media_controls_show_player">Show player</string> <!-- Subtext for media settings when no players can be shown [CHAR LIMIT=50] --> <string name="media_controls_no_players">No players available</string> <!-- Keywords for the media controls setting [CHAR LIMIT=NONE]--> <string name="keywords_media_controls">media</string> </resources> res/xml/media_controls_settings.xml 0 → 100644 +31 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2020 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. --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:title="@string/media_controls_title"> <SwitchPreference android:key="media_controls_resume_switch" android:title="@string/media_controls_summary" android:summary="@string/media_controls_resume_description" app:keywords="@string/keywords_media_controls" app:controller="com.android.settings.sound.MediaControlsPreferenceController" app:allowDividerAbove="true" /> </PreferenceScreen> res/xml/sound_settings.xml +8 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,14 @@ settings:allowDividerAbove="true" settings:controller="com.android.settings.notification.zen.ZenModePreferenceController"/> <Preference android:key="media_controls_summary" android:title="@string/media_controls_title" android:fragment="com.android.settings.sound.MediaControlsSettings" android:order="-110" settings:controller="com.android.settings.sound.MediaControlsParentPreferenceController" settings:keywords="@string/keywords_media_controls"/> <Preference android:key="gesture_prevent_ringing_sound" android:title="@string/gesture_prevent_ringing_sound_title" Loading src/com/android/settings/Settings.java +5 −0 Original line number Diff line number Diff line Loading @@ -235,4 +235,9 @@ public class Settings extends SettingsActivity { public static class AccountDashboardActivity extends SettingsActivity {} public static class SystemDashboardActivity extends SettingsActivity {} /** * Activity for MediaControlsSettings */ public static class MediaControlsSettingsActivity extends SettingsActivity {} } Loading
AndroidManifest.xml +11 −0 Original line number Diff line number Diff line Loading @@ -3393,6 +3393,17 @@ android:value="true" /> </activity> <activity android:name="Settings$MediaControlsSettingsActivity" android:exported="true" android:label="@strings/media_controls_title"> <intent-filter> <action android:name="android.settings.ACTION_MEDIA_CONTROLS_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.sound.MediaControlsSettings" /> </activity> <!-- This is the longest AndroidManifest.xml ever. --> </application> </manifest>
res/values/strings.xml +15 −0 Original line number Diff line number Diff line Loading @@ -12132,4 +12132,19 @@ <string name="overlay_settings_title">Allow screen overlays on Settings</string> <!-- Summary for allowing screen overlays on Settings app. [CHAR LIMIT=NONE]--> <string name="overlay_settings_summary">Allow apps that can display over other apps to overlay Settings screens</string> <!-- Title for media control settings [CHAR LIMIT=50]--> <string name="media_controls_title">Media</string> <!-- Summary for media control settings [CHAR LIMIT=50]--> <string name="media_controls_summary">Hide player when the media session has ended</string> <!-- Description of toggle to enable or disable the media resumption feature in quick settings [CHAR LIMIT=NONE]--> <string name="media_controls_resume_description">The player allows you to resume a session from the expanded Quick Settings panel.</string> <!-- Subtext for media settings when the player will be hidden [CHAR LIMIT=50] --> <string name="media_controls_hide_player">Hide player</string> <!-- Subtext for media settings when the player will be shown [CHAR LIMIT=50] --> <string name="media_controls_show_player">Show player</string> <!-- Subtext for media settings when no players can be shown [CHAR LIMIT=50] --> <string name="media_controls_no_players">No players available</string> <!-- Keywords for the media controls setting [CHAR LIMIT=NONE]--> <string name="keywords_media_controls">media</string> </resources>
res/xml/media_controls_settings.xml 0 → 100644 +31 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2020 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. --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:title="@string/media_controls_title"> <SwitchPreference android:key="media_controls_resume_switch" android:title="@string/media_controls_summary" android:summary="@string/media_controls_resume_description" app:keywords="@string/keywords_media_controls" app:controller="com.android.settings.sound.MediaControlsPreferenceController" app:allowDividerAbove="true" /> </PreferenceScreen>
res/xml/sound_settings.xml +8 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,14 @@ settings:allowDividerAbove="true" settings:controller="com.android.settings.notification.zen.ZenModePreferenceController"/> <Preference android:key="media_controls_summary" android:title="@string/media_controls_title" android:fragment="com.android.settings.sound.MediaControlsSettings" android:order="-110" settings:controller="com.android.settings.sound.MediaControlsParentPreferenceController" settings:keywords="@string/keywords_media_controls"/> <Preference android:key="gesture_prevent_ringing_sound" android:title="@string/gesture_prevent_ringing_sound_title" Loading
src/com/android/settings/Settings.java +5 −0 Original line number Diff line number Diff line Loading @@ -235,4 +235,9 @@ public class Settings extends SettingsActivity { public static class AccountDashboardActivity extends SettingsActivity {} public static class SystemDashboardActivity extends SettingsActivity {} /** * Activity for MediaControlsSettings */ public static class MediaControlsSettingsActivity extends SettingsActivity {} }