diff options
author | Philip P. Moltmann <moltmann@google.com> | 2019-04-05 18:13:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-04-05 18:13:15 +0000 |
commit | 0eeb058b4bbd6d306a35d784141f684f60bb5bb8 (patch) | |
tree | f9154941736ebbfd2ca15af91ad854d221e99937 | |
parent | b4aa3a63d96826f07907661711e8c3c4e94b4f41 (diff) | |
parent | dc950f1608a850e6224dc8c2a2f113eb9a50c8fc (diff) | |
download | android_packages_apps_PackageInstaller-0eeb058b4bbd6d306a35d784141f684f60bb5bb8.tar.gz android_packages_apps_PackageInstaller-0eeb058b4bbd6d306a35d784141f684f60bb5bb8.tar.bz2 android_packages_apps_PackageInstaller-0eeb058b4bbd6d306a35d784141f684f60bb5bb8.zip |
Merge "Remove Gallery and Music role" into qt-dev
-rw-r--r-- | res/values/strings.xml | 22 | ||||
-rw-r--r-- | res/xml/roles.xml | 79 | ||||
-rw-r--r-- | src/com/android/packageinstaller/role/model/GalleryRoleBehavior.java | 36 | ||||
-rw-r--r-- | src/com/android/packageinstaller/role/model/MusicRoleBehavior.java | 35 |
4 files changed, 0 insertions, 172 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 5de33119..485a315f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -619,28 +619,6 @@ <!-- Description when an app requests to become the default home app. [CHAR LIMIT=60] --> <string name="role_home_request_description">No permissions needed</string> - <!-- Label for the music player role. [CHAR LIMIT=30] --> - <string name="role_music_label">Default music app</string> - <!-- Short label for the music player role. [CHAR LIMIT=30] --> - <string name="role_music_short_label">Music app</string> - <!-- Description for the music role. [CHAR LIMIT=NONE] --> - <string name="role_music_description">Apps that allow you to play songs, podcasts, and other audio</string> - <!-- Template for the title when an app requests to become the default music app. [CHAR LIMIT=100] --> - <string name="role_music_request_title">Set <xliff:g id="app_name" example="Super Music">%1$s</xliff:g> as your default music app?</string> - <!-- Description when an app requests to become the default music app. [CHAR LIMIT=60] --> - <string name="role_music_request_description">Gets access to audio</string> - - <!-- Label for the gallery role. [CHAR LIMIT=30] --> - <string name="role_gallery_label">Default gallery app</string> - <!-- Short label for the gallery role. [CHAR LIMIT=30] --> - <string name="role_gallery_short_label">Gallery app</string> - <!-- Description for the gallery role. [CHAR LIMIT=NONE] --> - <string name="role_gallery_description">Apps that allow you to view, organize, protect, and share your photos and videos</string> - <!-- Template for the title when an app requests to become the default gallery app. [CHAR LIMIT=100] --> - <string name="role_gallery_request_title">Set <xliff:g id="app_name" example="Super Gallery">%1$s</xliff:g> as your default gallery app?</string> - <!-- Description when an app requests to become the default gallery app. [CHAR LIMIT=60] --> - <string name="role_gallery_request_description">Gets access to photos and videos</string> - <!-- Label for the automotive dialer role. [CHAR LIMIT=30] --> <string name="role_car_mode_dialer_label">Default car mode phone app</string> <!-- Short label for the automotive dialer role. [CHAR LIMIT=30] --> diff --git a/res/xml/roles.xml b/res/xml/roles.xml index d703e5a1..82cc9823 100644 --- a/res/xml/roles.xml +++ b/res/xml/roles.xml @@ -364,85 +364,6 @@ </preferred-activities> </role> - <role - name="android.app.role.MUSIC" - behavior="MusicRoleBehavior" - description="@string/role_music_description" - exclusive="true" - label="@string/role_music_label" - requestDescription="@string/role_music_request_description" - requestTitle="@string/role_music_request_title" - shortLabel="@string/role_music_short_label"> - <required-components> - <activity> - <intent-filter> - <action name="android.intent.action.MAIN" /> - <category name="android.intent.category.APP_MUSIC" /> - </intent-filter> - </activity> - </required-components> - <permissions> - <permission-set name="storage" /> - </permissions> - <app-ops> - <app-op name="android:write_media_audio" mode="allowed" /> - </app-ops> - <preferred-activities> - <preferred-activity> - <activity> - <intent-filter> - <action name="android.intent.action.MAIN" /> - <category name="android.intent.category.APP_MUSIC" /> - </intent-filter> - </activity> - <intent-filter> - <action name="android.intent.action.MAIN" /> - <category name="android.intent.category.APP_MUSIC" /> - </intent-filter> - </preferred-activity> - </preferred-activities> - </role> - - <role - name="android.app.role.GALLERY" - behavior="GalleryRoleBehavior" - description="@string/role_gallery_description" - exclusive="true" - label="@string/role_gallery_label" - requestDescription="@string/role_gallery_request_description" - requestTitle="@string/role_gallery_request_title" - shortLabel="@string/role_gallery_short_label"> - <required-components> - <activity> - <intent-filter> - <action name="android.intent.action.MAIN" /> - <category name="android.intent.category.APP_GALLERY" /> - </intent-filter> - </activity> - </required-components> - <permissions> - <permission-set name="storage" /> - </permissions> - <app-ops> - <app-op name="android:write_media_video" mode="allowed" /> - <app-op name="android:write_media_images" mode="allowed" /> - </app-ops> - <preferred-activities> - <preferred-activity> - <activity> - <intent-filter> - <action name="android.intent.action.MAIN" /> - <category name="android.intent.category.APP_GALLERY" /> - </intent-filter> - </activity> - <intent-filter> - <action name="android.intent.action.MAIN" /> - <category name="android.intent.category.APP_GALLERY" /> - </intent-filter> - </preferred-activity> - </preferred-activities> - </role> - <!--- @see android.telecom.InCallService --> <role name="android.app.role.CAR_MODE_DIALER" diff --git a/src/com/android/packageinstaller/role/model/GalleryRoleBehavior.java b/src/com/android/packageinstaller/role/model/GalleryRoleBehavior.java deleted file mode 100644 index 2c5de77f..00000000 --- a/src/com/android/packageinstaller/role/model/GalleryRoleBehavior.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2019 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.packageinstaller.role.model; - -import android.content.Context; - -import androidx.annotation.NonNull; - -import java.util.List; - -/** - * Class for behavior of the gallery role. - */ -public class GalleryRoleBehavior implements RoleBehavior { - - @NonNull - @Override - public List<String> getDefaultHolders(@NonNull Role role, @NonNull Context context) { - return ExclusiveDefaultHolderMixin.getDefaultHolders(role, "config_defaultGallery", - context); - } -} diff --git a/src/com/android/packageinstaller/role/model/MusicRoleBehavior.java b/src/com/android/packageinstaller/role/model/MusicRoleBehavior.java deleted file mode 100644 index d24c616f..00000000 --- a/src/com/android/packageinstaller/role/model/MusicRoleBehavior.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2019 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.packageinstaller.role.model; - -import android.content.Context; - -import androidx.annotation.NonNull; - -import java.util.List; - -/** - * Class for behavior of the music role. - */ -public class MusicRoleBehavior implements RoleBehavior { - - @NonNull - @Override - public List<String> getDefaultHolders(@NonNull Role role, @NonNull Context context) { - return ExclusiveDefaultHolderMixin.getDefaultHolders(role, "config_defaultMusic", context); - } -} |