summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorHai Zhang <zhanghai@google.com>2019-03-26 17:13:13 -0700
committerHai Zhang <zhanghai@google.com>2019-03-27 11:36:46 -0700
commit1f0e12577efba8ca7af0025327de79f1a02bc924 (patch)
tree69866c9e5ab0559daa1250a88243bbc827ea5cad /res
parent57b8b5751df1b423f161c5998315ed318f4f8b92 (diff)
downloadandroid_packages_apps_PackageInstaller-1f0e12577efba8ca7af0025327de79f1a02bc924.tar.gz
android_packages_apps_PackageInstaller-1f0e12577efba8ca7af0025327de79f1a02bc924.tar.bz2
android_packages_apps_PackageInstaller-1f0e12577efba8ca7af0025327de79f1a02bc924.zip
Use short label, request title and request description for roles.
This change allows the request role dialog to make use of the new request title and request description strings, as well as changing the label use for a role to short label in role lists. Showing role description in the new Settings UI will come in another upcoming CL. Bug: 128713569 Test: manual Change-Id: If2dd85a94ec7e450eda1b1d28d775f265788f203
Diffstat (limited to 'res')
-rw-r--r--res/values/strings.xml3
-rw-r--r--res/xml/roles.xml60
2 files changed, 48 insertions, 15 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5641ecfa..4de64c96 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -676,9 +676,6 @@
<!-- Description when an app requests to become the default call companion app. [CHAR LIMIT=60] -->
<string name="role_call_companion_request_description"></string>
- <!-- Template for the title when an app requests to become a default application. [CHAR LIMIT=100] -->
- <string name="request_role_title">Set <xliff:g id="app_name" example="Super Duper SMS">%1$s</xliff:g> as your default <xliff:g id="role_name" example="SMS app">%2$s</xliff:g>?</string>
-
<!-- Subtitle for the application that is the current default application [CHAR LIMIT=30] -->
<string name="request_role_current_default">Current default</string>
diff --git a/res/xml/roles.xml b/res/xml/roles.xml
index 5117c2bc..16f50d74 100644
--- a/res/xml/roles.xml
+++ b/res/xml/roles.xml
@@ -82,7 +82,10 @@
behavior="AssistantRoleBehavior"
exclusive="true"
showNone="true"
- label="@string/role_assistant_short_label">
+ label="@string/role_assistant_label"
+ requestDescription="@string/role_assistant_request_description"
+ requestTitle="@string/role_assistant_request_title"
+ shortLabel="@string/role_assistant_short_label">
<required-components>
<!-- Qualified components are determined int AssistantRoleBehavior. This comment here is
ignored and represents just a rough description
@@ -127,7 +130,10 @@
name="android.app.role.BROWSER"
behavior="BrowserRoleBehavior"
exclusive="true"
- label="@string/role_browser_short_label">
+ label="@string/role_browser_label"
+ requestDescription="@string/role_browser_request_description"
+ requestTitle="@string/role_browser_request_title"
+ shortLabel="@string/role_browser_short_label">
<!--
~ Required components matching is handled in BrowserRoleBehavior because it needs the
~ PackageManager.MATCH_ALL flag and other manual filtering, which cannot fit in our
@@ -161,7 +167,10 @@
name="android.app.role.DIALER"
behavior="DialerRoleBehavior"
exclusive="true"
- label="@string/role_dialer_short_label">
+ label="@string/role_dialer_label"
+ requestDescription="@string/role_dialer_request_description"
+ requestTitle="@string/role_dialer_request_title"
+ shortLabel="@string/role_dialer_short_label">
<required-components>
<activity>
<intent-filter>
@@ -217,7 +226,10 @@
name="android.app.role.SMS"
behavior="SmsRoleBehavior"
exclusive="true"
- label="@string/role_sms_short_label">
+ label="@string/role_sms_label"
+ requestDescription="@string/role_sms_request_description"
+ requestTitle="@string/role_sms_request_title"
+ shortLabel="@string/role_sms_short_label">
<required-components>
<receiver permission="android.permission.BROADCAST_SMS">
<intent-filter>
@@ -299,7 +311,10 @@
name="android.app.role.EMERGENCY"
behavior="EmergencyRoleBehavior"
exclusive="true"
- label="@string/role_emergency_short_label"
+ label="@string/role_emergency_label"
+ requestDescription="@string/role_emergency_request_description"
+ requestTitle="@string/role_emergency_request_title"
+ shortLabel="@string/role_emergency_short_label"
systemOnly="true">
<required-components>
<activity>
@@ -319,7 +334,10 @@
name="android.app.role.HOME"
behavior="HomeRoleBehavior"
exclusive="true"
- label="@string/role_home_short_label">
+ label="@string/role_home_label"
+ requestDescription="@string/role_home_request_description"
+ requestTitle="@string/role_home_request_title"
+ shortLabel="@string/role_home_short_label">
<!-- Also used by HomeRoleBehavior.getFallbackHolder(). -->
<required-components>
<activity>
@@ -349,7 +367,10 @@
name="android.app.role.MUSIC"
behavior="MusicRoleBehavior"
exclusive="true"
- label="@string/role_music_short_label">
+ 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>
@@ -384,7 +405,10 @@
name="android.app.role.GALLERY"
behavior="GalleryRoleBehavior"
exclusive="true"
- label="@string/role_gallery_short_label">
+ 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>
@@ -420,7 +444,10 @@
<role
name="android.app.role.CAR_MODE_DIALER"
exclusive="true"
- label="@string/role_car_mode_dialer_short_label">
+ label="@string/role_car_mode_dialer_label"
+ requestDescription="@string/role_car_mode_dialer_request_description"
+ requestTitle="@string/role_car_mode_dialer_request_title"
+ shortLabel="@string/role_car_mode_dialer_short_label">
<required-components>
<service permission="android.permission.BIND_INCALL_SERVICE">
<meta-data
@@ -439,7 +466,10 @@
<role
name="android.app.role.CALL_REDIRECTION"
exclusive="true"
- label="@string/role_call_redirection_short_label">
+ label="@string/role_call_redirection_label"
+ requestDescription="@string/role_call_redirection_request_description"
+ requestTitle="@string/role_call_redirection_request_title"
+ shortLabel="@string/role_call_redirection_short_label">
<required-components>
<service permission="android.permission.BIND_CALL_REDIRECTION_SERVICE">
<intent-filter>
@@ -453,7 +483,10 @@
<role
name="android.app.role.CALL_SCREENING"
exclusive="true"
- label="@string/role_call_screening_short_label">
+ label="@string/role_call_screening_label"
+ requestDescription="@string/role_call_screening_request_description"
+ requestTitle="@string/role_call_screening_request_title"
+ shortLabel="@string/role_call_screening_short_label">
<required-components>
<service permission="android.permission.BIND_SCREENING_SERVICE">
<intent-filter>
@@ -467,7 +500,10 @@
<role
name="android.app.role.CALL_COMPANION"
exclusive="false"
- label="@string/role_call_companion_short_label">
+ label="@string/role_call_companion_label"
+ requestDescription="@string/role_call_companion_request_description"
+ requestTitle="@string/role_call_companion_request_title"
+ shortLabel="@string/role_call_companion_short_label">
<required-components>
<service permission="android.permission.BIND_INCALL_SERVICE">
<meta-data