From f1f6c4ac7e0dea0cf59201726876b8f8378f4b6d Mon Sep 17 00:00:00 2001 From: Alison Cichowlas Date: Tue, 23 Mar 2021 14:44:42 -0400 Subject: [PATCH] Update strings - chooser/resolver WP strings. Test: manual verification of string update, atest ChooserActivityTest Bug: 182361692 Change-Id: I6ec45c5ae2a9877bb2114243589a0da0247bed95 --- .../app/ChooserMultiProfilePagerAdapter.java | 8 ++++---- .../app/ResolverMultiProfilePagerAdapter.java | 4 ++-- core/res/res/values/strings.xml | 20 +++++++------------ core/res/res/values/symbols.xml | 5 +---- .../internal/app/ChooserActivityTest.java | 8 ++++---- .../internal/app/ResolverActivityTest.java | 4 ++-- 6 files changed, 20 insertions(+), 29 deletions(-) diff --git a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java index dd837fc2194c3..922f96e96765c 100644 --- a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java +++ b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java @@ -194,12 +194,12 @@ public class ChooserMultiProfilePagerAdapter extends AbstractMultiProfilePagerAd if (mIsSendAction) { showEmptyState(activeListAdapter, R.drawable.ic_sharing_disabled, - R.string.resolver_cant_share_with_work_apps, + R.string.resolver_cross_profile_blocked, R.string.resolver_cant_share_with_work_apps_explanation); } else { showEmptyState(activeListAdapter, R.drawable.ic_sharing_disabled, - R.string.resolver_cant_access_work_apps, + R.string.resolver_cross_profile_blocked, R.string.resolver_cant_access_work_apps_explanation); } } @@ -209,12 +209,12 @@ public class ChooserMultiProfilePagerAdapter extends AbstractMultiProfilePagerAd if (mIsSendAction) { showEmptyState(activeListAdapter, R.drawable.ic_sharing_disabled, - R.string.resolver_cant_share_with_personal_apps, + R.string.resolver_cross_profile_blocked, R.string.resolver_cant_share_with_personal_apps_explanation); } else { showEmptyState(activeListAdapter, R.drawable.ic_sharing_disabled, - R.string.resolver_cant_access_personal_apps, + R.string.resolver_cross_profile_blocked, R.string.resolver_cant_access_personal_apps_explanation); } } diff --git a/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java index 2464fc737a1fc..a2f014c86ec16 100644 --- a/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java +++ b/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java @@ -205,7 +205,7 @@ public class ResolverMultiProfilePagerAdapter extends AbstractMultiProfilePagerA protected void showNoPersonalToWorkIntentsEmptyState(ResolverListAdapter activeListAdapter) { showEmptyState(activeListAdapter, R.drawable.ic_sharing_disabled, - R.string.resolver_cant_access_work_apps, + R.string.resolver_cross_profile_blocked, R.string.resolver_cant_access_work_apps_explanation); } @@ -213,7 +213,7 @@ public class ResolverMultiProfilePagerAdapter extends AbstractMultiProfilePagerA protected void showNoWorkToPersonalIntentsEmptyState(ResolverListAdapter activeListAdapter) { showEmptyState(activeListAdapter, R.drawable.ic_sharing_disabled, - R.string.resolver_cant_access_personal_apps, + R.string.resolver_cross_profile_blocked, R.string.resolver_cant_access_personal_apps_explanation); } diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 2c7f9a4a5ffe3..4938104f353a9 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -5606,30 +5606,24 @@ Work view - - Can\u2019t share this with work apps + + Blocked by your IT admin - Your IT admin doesn\u2019t allow you to share this content with apps in your work profile + This content can\u2019t be shared with work apps - - Can\u2019t open this with work apps - Your IT admin doesn\u2019t allow you to open this content with apps in your work profile + This content can\u2019t be opened with work apps - - Can\u2019t share this with personal apps - Your IT admin doesn\u2019t allow you to share this content with apps in your personal profile + This content can\u2019t be shared with personal apps - - Can\u2019t open this with personal apps - Your IT admin doesn\u2019t allow you to open this content with apps in your personal profile + This content can\u2019t be opened with personal apps Work profile is paused - Turn on + Tap to turn on No work apps can support this content diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index b9357885175db..b3d1efa85ba8a 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -4099,13 +4099,10 @@ - + - - - diff --git a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java index d9012f649dd36..57b9fda7a4f91 100644 --- a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java +++ b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java @@ -1488,14 +1488,13 @@ public class ChooserActivityTest { onView(withId(R.id.contentPanel)) .perform(swipeUp()); - onView(withText(R.string.resolver_cant_share_with_work_apps)) + onView(withText(R.string.resolver_cross_profile_blocked)) .check(matches(isDisplayed())); } @Test public void testWorkTab_workProfileDisabled_emptyStateShown() { // enable the work tab feature flag - ResolverActivity.ENABLE_TABBED_VIEW = true; markWorkProfileUserAvailable(); int workProfileTargets = 4; List personalResolvedComponentInfos = @@ -1507,6 +1506,7 @@ public class ChooserActivityTest { Intent sendIntent = createSendTextIntent(); sendIntent.setType("TestType"); + ResolverActivity.ENABLE_TABBED_VIEW = true; final ChooserWrapperActivity activity = mActivityRule.launchActivity(Intent.createChooser(sendIntent, "work tab test")); waitForIdle(); @@ -1566,7 +1566,7 @@ public class ChooserActivityTest { onView(withText(R.string.resolver_work_tab)).perform(click()); waitForIdle(); - onView(withText(R.string.resolver_cant_share_with_work_apps)) + onView(withText(R.string.resolver_cross_profile_blocked)) .check(matches(isDisplayed())); } @@ -1996,7 +1996,7 @@ public class ChooserActivityTest { onView(withId(R.id.contentPanel)) .perform(swipeUp()); - onView(withText(R.string.resolver_cant_access_work_apps)) + onView(withText(R.string.resolver_cross_profile_blocked)) .check(matches(isDisplayed())); } diff --git a/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java b/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java index 7dc5a8b58f914..68287caa8bbd2 100644 --- a/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java +++ b/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java @@ -650,7 +650,7 @@ public class ResolverActivityTest { onView(withId(R.id.contentPanel)) .perform(swipeUp()); - onView(withText(R.string.resolver_cant_access_work_apps)) + onView(withText(R.string.resolver_cross_profile_blocked)) .check(matches(isDisplayed())); } @@ -726,7 +726,7 @@ public class ResolverActivityTest { onView(withText(R.string.resolver_work_tab)).perform(click()); waitForIdle(); - onView(withText(R.string.resolver_cant_access_work_apps)) + onView(withText(R.string.resolver_cross_profile_blocked)) .check(matches(isDisplayed())); }