From 1eba36badc2414e36460e0804871fca5cdb7bd3e Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Fri, 6 May 2022 11:45:35 -0700 Subject: Finalized Watch profile summary string Bug: 211836059 Test: atest CtsCompanionDeviceManagerCoreTestCases atest CtsCompanionDeviceManagerUiAutomationTestCases atest CtsOsTestCases:CompanionDeviceManagerTest Change-Id: I1a6f276468d03433b70d508285a712e3c043a89c Merged-In: I1a6f276468d03433b70d508285a712e3c043a89c --- packages/CompanionDeviceManager/res/values/strings.xml | 7 ++----- .../companiondevicemanager/CompanionDeviceActivity.java | 10 ++++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/CompanionDeviceManager/res/values/strings.xml b/packages/CompanionDeviceManager/res/values/strings.xml index 586a0223b460..28ba424c99d2 100644 --- a/packages/CompanionDeviceManager/res/values/strings.xml +++ b/packages/CompanionDeviceManager/res/values/strings.xml @@ -20,7 +20,7 @@ Companion Device Manager - Allow <strong>%1$s</strong> to manage your <strong>%2$s</strong> + Allow <strong>%1$s</strong> to access your <strong>%2$s</strong> @@ -31,10 +31,7 @@ Choose a %1$s to be managed by <strong>%2$s</strong> - %1$s will be allowed to interact with your notifications and access your Phone, SMS, Contacts and Calendar permissions. - - - %1$s will be allowed to interact with your notifications and access your Phone, SMS, Contacts and Calendar permissions. + This app is needed to manage your %1$s. %2$s will be allowed to interact with your notifications and access your Phone, SMS, Contacts, Calendar, Call logs and Nearby devices permissions. diff --git a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionDeviceActivity.java b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionDeviceActivity.java index 37cbf3017f0b..225181943a60 100644 --- a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionDeviceActivity.java +++ b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionDeviceActivity.java @@ -486,17 +486,19 @@ public class CompanionDeviceActivity extends FragmentActivity implements mSelectedDevice = requireNonNull(deviceFilterPairs.get(0)); final String deviceName = mSelectedDevice.getDisplayName(); - final Spanned title = getHtmlFromResources( - this, R.string.confirmation_title, appLabel, deviceName); + final String profileName = getString(R.string.profile_name_watch); + final Spanned title; final Spanned summary; final Drawable profileIcon; if (deviceProfile == null) { + title = getHtmlFromResources(this, R.string.confirmation_title, appLabel, deviceName); summary = getHtmlFromResources(this, R.string.summary_generic); profileIcon = getIcon(this, R.drawable.ic_device_other); mSummary.setVisibility(View.GONE); } 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); } else { throw new RuntimeException("Unsupported profile " + deviceProfile); @@ -524,7 +526,7 @@ public class CompanionDeviceActivity extends FragmentActivity implements mSummary.setVisibility(View.GONE); } else if (deviceProfile.equals(DEVICE_PROFILE_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); } else { throw new RuntimeException("Unsupported profile " + deviceProfile); -- cgit v1.2.3-59-g8ed1b