Merge "Finalized Watch profile summary string" into tm-dev am: 954353d4fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18203251 Change-Id: Ibce6c4e11e24bcaa18f07845bac60c459fa3f705 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
<string name="app_label">Companion Device Manager</string>
|
<string name="app_label">Companion Device Manager</string>
|
||||||
|
|
||||||
<!-- Title of the device association confirmation dialog. -->
|
<!-- Title of the device association confirmation dialog. -->
|
||||||
<string name="confirmation_title">Allow <strong><xliff:g id="app_name" example="Android Wear">%1$s</xliff:g></strong> to manage your <strong><xliff:g id="device_name" example="ASUS ZenWatch 2">%2$s</xliff:g></strong></string>
|
<string name="confirmation_title">Allow <strong><xliff:g id="app_name" example="Android Wear">%1$s</xliff:g></strong> to access your <strong><xliff:g id="device_name" example="ASUS ZenWatch 2">%2$s</xliff:g></strong></string>
|
||||||
|
|
||||||
<!-- ================= DEVICE_PROFILE_WATCH and null profile ================= -->
|
<!-- ================= DEVICE_PROFILE_WATCH and null profile ================= -->
|
||||||
|
|
||||||
@@ -31,10 +31,7 @@
|
|||||||
<string name="chooser_title">Choose a <xliff:g id="profile_name" example="watch">%1$s</xliff:g> to be managed by <strong><xliff:g id="app_name" example="Android Wear">%2$s</xliff:g></strong></string>
|
<string name="chooser_title">Choose a <xliff:g id="profile_name" example="watch">%1$s</xliff:g> to be managed by <strong><xliff:g id="app_name" example="Android Wear">%2$s</xliff:g></strong></string>
|
||||||
|
|
||||||
<!-- Description of the privileges the application will get if associated with the companion device of WATCH profile (type) [CHAR LIMIT=NONE] -->
|
<!-- Description of the privileges the application will get if associated with the companion device of WATCH profile (type) [CHAR LIMIT=NONE] -->
|
||||||
<string name="summary_watch" product="default"><xliff:g id="app_name" example="Wear">%1$s</xliff:g> will be allowed to interact with your notifications and access your Phone, SMS, Contacts and Calendar permissions.</string>
|
<string name="summary_watch">This app is needed to manage your <xliff:g id="device_name" example="My Watch">%1$s</xliff:g>. <xliff:g id="app_name" example="Android Wear">%2$s</xliff:g> will be allowed to interact with your notifications and access your Phone, SMS, Contacts, Calendar, Call logs and Nearby devices permissions.</string>
|
||||||
|
|
||||||
<!-- Description of the privileges the application will get if associated with the companion device of WATCH profile (type) [CHAR LIMIT=NONE] -->
|
|
||||||
<string name="summary_watch" product="tablet"><xliff:g id="app_name" example="Wear">%1$s</xliff:g> will be allowed to interact with your notifications and access your Phone, SMS, Contacts and Calendar permissions.</string>
|
|
||||||
|
|
||||||
<!-- ================= DEVICE_PROFILE_APP_STREAMING ================= -->
|
<!-- ================= DEVICE_PROFILE_APP_STREAMING ================= -->
|
||||||
|
|
||||||
|
|||||||
@@ -497,17 +497,19 @@ public class CompanionDeviceActivity extends FragmentActivity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String deviceName = mSelectedDevice.getDisplayName();
|
final String deviceName = mSelectedDevice.getDisplayName();
|
||||||
final Spanned title = getHtmlFromResources(
|
final String profileName = getString(R.string.profile_name_watch);
|
||||||
this, R.string.confirmation_title, appLabel, deviceName);
|
final Spanned title;
|
||||||
final Spanned summary;
|
final Spanned summary;
|
||||||
final Drawable profileIcon;
|
final Drawable profileIcon;
|
||||||
|
|
||||||
if (deviceProfile == null) {
|
if (deviceProfile == null) {
|
||||||
|
title = getHtmlFromResources(this, R.string.confirmation_title, appLabel, deviceName);
|
||||||
summary = getHtmlFromResources(this, R.string.summary_generic);
|
summary = getHtmlFromResources(this, R.string.summary_generic);
|
||||||
profileIcon = getIcon(this, R.drawable.ic_device_other);
|
profileIcon = getIcon(this, R.drawable.ic_device_other);
|
||||||
mSummary.setVisibility(View.GONE);
|
mSummary.setVisibility(View.GONE);
|
||||||
} else if (deviceProfile.equals(DEVICE_PROFILE_WATCH)) {
|
} else if (deviceProfile.equals(DEVICE_PROFILE_WATCH)) {
|
||||||
summary = getHtmlFromResources(this, R.string.summary_watch, appLabel, deviceName);
|
title = getHtmlFromResources(this, R.string.confirmation_title, appLabel, profileName);
|
||||||
|
summary = getHtmlFromResources(this, R.string.summary_watch, deviceName, appLabel);
|
||||||
profileIcon = getIcon(this, R.drawable.ic_watch);
|
profileIcon = getIcon(this, R.drawable.ic_watch);
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("Unsupported profile " + deviceProfile);
|
throw new RuntimeException("Unsupported profile " + deviceProfile);
|
||||||
@@ -535,7 +537,7 @@ public class CompanionDeviceActivity extends FragmentActivity implements
|
|||||||
mSummary.setVisibility(View.GONE);
|
mSummary.setVisibility(View.GONE);
|
||||||
} else if (deviceProfile.equals(DEVICE_PROFILE_WATCH)) {
|
} else if (deviceProfile.equals(DEVICE_PROFILE_WATCH)) {
|
||||||
profileName = getString(R.string.profile_name_watch);
|
profileName = getString(R.string.profile_name_watch);
|
||||||
summary = getHtmlFromResources(this, R.string.summary_watch, appLabel);
|
summary = getHtmlFromResources(this, R.string.summary_watch, profileName, appLabel);
|
||||||
profileIcon = getIcon(this, R.drawable.ic_watch);
|
profileIcon = getIcon(this, R.drawable.ic_watch);
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("Unsupported profile " + deviceProfile);
|
throw new RuntimeException("Unsupported profile " + deviceProfile);
|
||||||
|
|||||||
Reference in New Issue
Block a user