Improve strings for share sheet and intent resolvers.

Fixes: 151694643
Fixes: 150942431
Test: manual
Change-Id: Ie419e791aa1d2d2cbd32b3f091833b54b90c81eb
diff --git a/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
index ec2653f..a815592 100644
--- a/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
@@ -115,6 +115,10 @@
         mInjector = injector;
     }
 
+    protected boolean isQuietModeEnabled(UserHandle workProfileUserHandle) {
+        return mInjector.isQuietModeEnabled(workProfileUserHandle);
+    }
+
     void setOnProfileSelectedListener(OnProfileSelectedListener listener) {
         mOnProfileSelectedListener = listener;
     }
@@ -339,23 +343,32 @@
     protected abstract void showNoPersonalToWorkIntentsEmptyState(
             ResolverListAdapter activeListAdapter);
 
+    protected abstract void showNoPersonalAppsAvailableEmptyState(
+            ResolverListAdapter activeListAdapter);
+
+    protected abstract void showNoWorkAppsAvailableEmptyState(
+            ResolverListAdapter activeListAdapter);
+
     protected abstract void showNoWorkToPersonalIntentsEmptyState(
             ResolverListAdapter activeListAdapter);
 
-    void showEmptyState(ResolverListAdapter listAdapter) {
+    void showNoAppsAvailableEmptyState(ResolverListAdapter listAdapter) {
         UserHandle listUserHandle = listAdapter.getUserHandle();
-        if (UserHandle.myUserId() == listUserHandle.getIdentifier()
-                || !hasAppsInOtherProfile(listAdapter)) {
-            if (mWorkProfileUserHandle != null) {
-                DevicePolicyEventLogger.createEvent(
-                        DevicePolicyEnums.RESOLVER_EMPTY_STATE_NO_APPS_RESOLVED)
-                        .setStrings(getMetricsCategory())
-                        .write();
+        if (mWorkProfileUserHandle != null
+                && (UserHandle.myUserId() == listUserHandle.getIdentifier()
+                        || !hasAppsInOtherProfile(listAdapter))) {
+            DevicePolicyEventLogger.createEvent(
+                    DevicePolicyEnums.RESOLVER_EMPTY_STATE_NO_APPS_RESOLVED)
+                    .setStrings(getMetricsCategory())
+                    .setBoolean(/*isPersonalProfile*/ listUserHandle == mPersonalProfileUserHandle)
+                    .write();
+            if (listUserHandle == mPersonalProfileUserHandle) {
+                showNoPersonalAppsAvailableEmptyState(listAdapter);
+            } else {
+                showNoWorkAppsAvailableEmptyState(listAdapter);
             }
-            showEmptyState(listAdapter,
-                    R.drawable.ic_no_apps,
-                    R.string.resolver_no_apps_available,
-                    /* subtitleRes */ 0);
+        } else if (mWorkProfileUserHandle == null) {
+            showConsumerUserNoAppsAvailableEmptyState(listAdapter);
         }
     }
 
@@ -371,7 +384,7 @@
                 userHandleToPageIndex(activeListAdapter.getUserHandle()));
         descriptor.rootView.findViewById(R.id.resolver_list).setVisibility(View.GONE);
         View emptyStateView = descriptor.getEmptyStateView();
-        resetViewVisibilities(emptyStateView);
+        resetViewVisibilitiesForWorkProfileEmptyState(emptyStateView);
         emptyStateView.setVisibility(View.VISIBLE);
 
         ImageView icon = emptyStateView.findViewById(R.id.resolver_empty_state_icon);
@@ -395,6 +408,17 @@
         activeListAdapter.markTabLoaded();
     }
 
+    private void showConsumerUserNoAppsAvailableEmptyState(ResolverListAdapter activeListAdapter) {
+        ProfileDescriptor descriptor = getItem(
+                userHandleToPageIndex(activeListAdapter.getUserHandle()));
+        descriptor.rootView.findViewById(R.id.resolver_list).setVisibility(View.GONE);
+        View emptyStateView = descriptor.getEmptyStateView();
+        resetViewVisibilitiesForConsumerUserEmptyState(emptyStateView);
+        emptyStateView.setVisibility(View.VISIBLE);
+
+        activeListAdapter.markTabLoaded();
+    }
+
     private void showSpinner(View emptyStateView) {
         emptyStateView.findViewById(R.id.resolver_empty_state_icon).setVisibility(View.INVISIBLE);
         emptyStateView.findViewById(R.id.resolver_empty_state_title).setVisibility(View.INVISIBLE);
@@ -402,14 +426,25 @@
                 .setVisibility(View.INVISIBLE);
         emptyStateView.findViewById(R.id.resolver_empty_state_button).setVisibility(View.INVISIBLE);
         emptyStateView.findViewById(R.id.resolver_empty_state_progress).setVisibility(View.VISIBLE);
+        emptyStateView.findViewById(R.id.empty).setVisibility(View.GONE);
     }
 
-    private void resetViewVisibilities(View emptyStateView) {
+    private void resetViewVisibilitiesForWorkProfileEmptyState(View emptyStateView) {
         emptyStateView.findViewById(R.id.resolver_empty_state_icon).setVisibility(View.VISIBLE);
         emptyStateView.findViewById(R.id.resolver_empty_state_title).setVisibility(View.VISIBLE);
         emptyStateView.findViewById(R.id.resolver_empty_state_subtitle).setVisibility(View.VISIBLE);
         emptyStateView.findViewById(R.id.resolver_empty_state_button).setVisibility(View.INVISIBLE);
         emptyStateView.findViewById(R.id.resolver_empty_state_progress).setVisibility(View.GONE);
+        emptyStateView.findViewById(R.id.empty).setVisibility(View.GONE);
+    }
+
+    private void resetViewVisibilitiesForConsumerUserEmptyState(View emptyStateView) {
+        emptyStateView.findViewById(R.id.resolver_empty_state_icon).setVisibility(View.GONE);
+        emptyStateView.findViewById(R.id.resolver_empty_state_title).setVisibility(View.GONE);
+        emptyStateView.findViewById(R.id.resolver_empty_state_subtitle).setVisibility(View.GONE);
+        emptyStateView.findViewById(R.id.resolver_empty_state_button).setVisibility(View.GONE);
+        emptyStateView.findViewById(R.id.resolver_empty_state_progress).setVisibility(View.GONE);
+        emptyStateView.findViewById(R.id.empty).setVisibility(View.VISIBLE);
     }
 
     protected void showListView(ResolverListAdapter activeListAdapter) {
diff --git a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
index c6a00f3..57157f7 100644
--- a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
@@ -175,7 +175,7 @@
             View.OnClickListener listener) {
         showEmptyState(activeListAdapter,
                 R.drawable.ic_work_apps_off,
-                R.string.resolver_turn_on_work_apps_share,
+                R.string.resolver_turn_on_work_apps,
                 /* subtitleRes */ 0,
                 listener);
     }
@@ -185,7 +185,7 @@
         showEmptyState(activeListAdapter,
                 R.drawable.ic_sharing_disabled,
                 R.string.resolver_cant_share_with_work_apps,
-                R.string.resolver_cant_share_cross_profile_explanation);
+                R.string.resolver_cant_share_with_work_apps_explanation);
     }
 
     @Override
@@ -193,7 +193,23 @@
         showEmptyState(activeListAdapter,
                 R.drawable.ic_sharing_disabled,
                 R.string.resolver_cant_share_with_personal_apps,
-                R.string.resolver_cant_share_cross_profile_explanation);
+                R.string.resolver_cant_share_with_personal_apps_explanation);
+    }
+
+    @Override
+    protected void showNoPersonalAppsAvailableEmptyState(ResolverListAdapter listAdapter) {
+        showEmptyState(listAdapter,
+                R.drawable.ic_no_apps,
+                R.string.resolver_no_personal_apps_available_share,
+                /* subtitleRes */ 0);
+    }
+
+    @Override
+    protected void showNoWorkAppsAvailableEmptyState(ResolverListAdapter listAdapter) {
+        showEmptyState(listAdapter,
+                R.drawable.ic_no_apps,
+                R.string.resolver_no_work_apps_available_share,
+                /* subtitleRes */ 0);
     }
 
     class ChooserProfileDescriptor extends ProfileDescriptor {
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 8e64b97..d142033 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -752,6 +752,11 @@
             }
             mRegistered = true;
         }
+        if (shouldShowTabs() && mMultiProfilePagerAdapter.isWaitingToEnableWorkProfile()) {
+            if (mMultiProfilePagerAdapter.isQuietModeEnabled(getWorkProfileUserHandle())) {
+                mMultiProfilePagerAdapter.markWorkProfileEnabledBroadcastReceived();
+            }
+        }
         mMultiProfilePagerAdapter.getActiveListAdapter().handlePackagesChanged();
         updateProfileViewButton();
     }
@@ -990,7 +995,7 @@
             return;
         }
         if (shouldShowEmptyState(listAdapter)) {
-            mMultiProfilePagerAdapter.showEmptyState(listAdapter);
+            mMultiProfilePagerAdapter.showNoAppsAvailableEmptyState(listAdapter);
         } else {
             mMultiProfilePagerAdapter.showListView(listAdapter);
         }
@@ -1603,8 +1608,6 @@
     }
 
     private void resetTabsHeaderStyle(TabWidget tabWidget) {
-        String workContentDescription = getString(R.string.resolver_work_tab_accessibility);
-        String personalContentDescription = getString(R.string.resolver_personal_tab_accessibility);
         for (int i = 0; i < tabWidget.getChildCount(); i++) {
             View tabView = tabWidget.getChildAt(i);
             TextView title = tabView.findViewById(android.R.id.title);
@@ -1612,11 +1615,6 @@
             title.setTextColor(getAttrColor(this, android.R.attr.textColorTertiary));
             title.setTextSize(TypedValue.COMPLEX_UNIT_PX,
                     getResources().getDimension(R.dimen.resolver_tab_text_size));
-            if (title.getText().equals(getString(R.string.resolver_personal_tab))) {
-                tabView.setContentDescription(personalContentDescription);
-            } else if (title.getText().equals(getString(R.string.resolver_work_tab))) {
-                tabView.setContentDescription(workContentDescription);
-            }
         }
     }
 
diff --git a/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
index 578f6ae..b690a18 100644
--- a/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
@@ -167,7 +167,7 @@
             View.OnClickListener listener) {
         showEmptyState(activeListAdapter,
                 R.drawable.ic_work_apps_off,
-                R.string.resolver_turn_on_work_apps_view,
+                R.string.resolver_turn_on_work_apps,
                 /* subtitleRes */ 0,
                 listener);
     }
@@ -188,6 +188,22 @@
                 R.string.resolver_cant_access_personal_apps_explanation);
     }
 
+    @Override
+    protected void showNoPersonalAppsAvailableEmptyState(ResolverListAdapter listAdapter) {
+        showEmptyState(listAdapter,
+                R.drawable.ic_no_apps,
+                R.string.resolver_no_personal_apps_available_resolve,
+                /* subtitleRes */ 0);
+    }
+
+    @Override
+    protected void showNoWorkAppsAvailableEmptyState(ResolverListAdapter listAdapter) {
+        showEmptyState(listAdapter,
+                R.drawable.ic_no_apps,
+                R.string.resolver_no_work_apps_available_resolve,
+                /* subtitleRes */ 0);
+    }
+
     class ResolverProfileDescriptor extends ProfileDescriptor {
         private ResolverListAdapter resolverListAdapter;
         final ListView listView;
diff --git a/core/res/res/layout/resolver_empty_states.xml b/core/res/res/layout/resolver_empty_states.xml
index 5fdf190..67299e8 100644
--- a/core/res/res/layout/resolver_empty_states.xml
+++ b/core/res/res/layout/resolver_empty_states.xml
@@ -18,7 +18,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/resolver_empty_state"
     android:layout_width="match_parent"
-    android:layout_height="@dimen/resolver_empty_state_height"
+    android:layout_height="wrap_content"
     android:orientation="vertical"
     android:gravity="center_horizontal"
     android:visibility="gone"
@@ -72,4 +72,12 @@
         android:layout_centerHorizontal="true"
         android:layout_below="@+id/resolver_empty_state_subtitle"
         android:indeterminateTint="?attr/colorAccent"/>
+    <TextView android:id="@+id/empty"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="?attr/colorBackgroundFloating"
+        android:text="@string/noApplications"
+        android:padding="@dimen/chooser_edge_margin_normal"
+        android:layout_marginBottom="56dp"
+        android:gravity="center"/>
 </RelativeLayout>
\ No newline at end of file
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 26024ed..dd3b0b4 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -5388,33 +5388,42 @@
     <string name="resolver_personal_tab">Personal</string>
     <!-- Label of a tab on a screen. A user can tap this tab to switch to the 'Work' view (that shows their work content) if they have a work profile on their device. [CHAR LIMIT=NONE] -->
     <string name="resolver_work_tab">Work</string>
-    <!-- Accessibility label for the personal tab button. [CHAR LIMIT=NONE] -->
-    <string name="resolver_personal_tab_accessibility">Personal view</string>
-    <!-- Accessibility label for the work tab button. [CHAR LIMIT=NONE] -->
-    <string name="resolver_work_tab_accessibility">Work view</string>
-    <!-- Title of a screen. This text lets the user know that their IT admin doesn't allow them to share personal content with work apps. [CHAR LIMIT=NONE] -->
-    <string name="resolver_cant_share_with_work_apps">Can\u2019t share with work apps</string>
-    <!-- Title of a screen. This text lets the user know that their IT admin doesn't allow them to share work content with personal apps. [CHAR LIMIT=NONE] -->
-    <string name="resolver_cant_share_with_personal_apps">Can\u2019t share with personal apps</string>
-    <!-- Error message. This text is explaining that the user's IT admin doesn't allow sharing between personal and work apps. [CHAR LIMIT=NONE] -->
-    <string name="resolver_cant_share_cross_profile_explanation">Your IT admin blocked sharing between personal and work profiles</string>
-    <!-- Title of an error screen. This error message lets the user know that their IT admin blocked access to work apps, and the personal content that they're trying to view in a work app, such as Chrome, isn't allowed. [CHAR LIMIT=NONE] -->
-    <string name="resolver_cant_access_work_apps">Can\u2019t access work apps</string>
-    <!-- Error message. This message lets the user know that their IT admin blocked access to work apps, and the personal content that they're trying to view in a work app, such as Chrome, isn't allowed. [CHAR LIMIT=NONE] -->
-    <string name="resolver_cant_access_work_apps_explanation">Your IT admin doesn\u2019t let you view personal content in work apps</string>
-    <!-- Title of an error screen. This error message lets the user know that their IT admin blocked access to personal apps, and the work content that they're trying to view in a personal app, such as Chrome, isn't allowed. [CHAR LIMIT=NONE] -->
-    <string name="resolver_cant_access_personal_apps">Can\u2019t access personal apps</string>
-    <!-- Error message. This message lets the user know that their IT admin blocked access to personal apps, and the work content that they're trying to view in a personal app, such as Chrome, isn't allowed. [CHAR LIMIT=NONE] -->
-    <string name="resolver_cant_access_personal_apps_explanation">Your IT admin doesn\u2019t let you view work content in personal apps</string>
-    <!-- Error message. This text lets the user know that they need to turn on work apps in order to share content. There's also a button a user can tap to turn on the apps. [CHAR LIMIT=NONE] -->
-    <string name="resolver_turn_on_work_apps_share">Turn on work profile to share content</string>
-    <!-- Error message. This text lets the user know that they need to turn on work apps in order to view content. There's also a button a user can tap to turn on the apps. [CHAR LIMIT=NONE] -->
-    <string name="resolver_turn_on_work_apps_view">Turn on work profile to view content</string>
-    <!-- Error message. This text lets the user know that work apps aren't available on the device. [CHAR LIMIT=NONE] -->
-    <string name="resolver_no_apps_available">No apps available</string>
+
+    <!-- Title of a screen. This text lets the user know that their IT admin doesn't allow them to share this specific content with work apps. [CHAR LIMIT=NONE] -->
+    <string name="resolver_cant_share_with_work_apps">Can\u2019t share this with work apps</string>
+    <!-- Error message. This text is explaining that the user's IT admin doesn't allow this specific content to be shared with apps in the work profile. [CHAR LIMIT=NONE] -->
+    <string name="resolver_cant_share_with_work_apps_explanation">Your IT admin doesn\u2019t allow you to share this content with apps in your work profile</string>
+
+    <!-- Title of an error screen. This error message lets the user know that their IT admin doesn't allow them to open this specific content with a work app. [CHAR LIMIT=NONE] -->
+    <string name="resolver_cant_access_work_apps">Can\u2019t open this with work apps</string>
+    <!-- Error message. This message lets the user know that their IT admin doesn't allow them to open this specific content with an app in their work profile. [CHAR LIMIT=NONE] -->
+    <string name="resolver_cant_access_work_apps_explanation">Your IT admin doesn\u2019t allow you to open this content with apps in your work profile</string>
+
+    <!-- Title of a screen. This text lets the user know that their IT admin doesn't allow them to share this specific content with personal apps. [CHAR LIMIT=NONE] -->
+    <string name="resolver_cant_share_with_personal_apps">Can\u2019t share this with personal apps</string>
+    <!-- Error message. This text is explaining that the user's IT admin doesn't allow them to share this specific content with apps in their personal profile. [CHAR LIMIT=NONE] -->
+    <string name="resolver_cant_share_with_personal_apps_explanation">Your IT admin doesn\u2019t allow you to share this content with apps in your personal profile</string>
+
+    <!-- Title of an error screen. This error message lets the user know that their IT admin doesn't allow them to open this specific content with a personal app. [CHAR LIMIT=NONE] -->
+    <string name="resolver_cant_access_personal_apps">Can\u2019t open this with personal apps</string>
+    <!-- Error message. This message lets the user know that their IT admin doesn't allow them to open this specific content with an app in their personal profile. [CHAR LIMIT=NONE] -->
+    <string name="resolver_cant_access_personal_apps_explanation">Your IT admin doesn\u2019t allow you to open this content with apps in your personal profile</string>
+
+    <!-- Error message. This text lets the user know that they need to turn on work apps in order to share or open content. There's also a button a user can tap to turn on the apps. [CHAR LIMIT=NONE] -->
+    <string name="resolver_turn_on_work_apps">Work profile is paused</string>
     <!-- Button text. This button turns on a user's work profile so they can access their work apps and data. [CHAR LIMIT=NONE] -->
     <string name="resolver_switch_on_work">Turn on</string>
 
+    <!-- Error message. This text lets the user know that their current work apps don't support the specific content that they're trying to share. [CHAR LIMIT=NONE] -->
+    <string name="resolver_no_work_apps_available_share">No work apps can support this content</string>
+    <!-- Error message. This text lets the user know that their current work apps can't open this specific content. [CHAR LIMIT=NONE] -->
+    <string name="resolver_no_work_apps_available_resolve">No work apps can open this content</string>
+
+    <!-- Error message. This text lets the user know that their current personal apps don't support the specific content that they're trying to share. [CHAR LIMIT=NONE] -->
+    <string name="resolver_no_personal_apps_available_share">No personal apps can support this content</string>
+    <!-- Error message. This text lets the user know that their current personal apps can't open this specific content. [CHAR LIMIT=NONE] -->
+    <string name="resolver_no_personal_apps_available_resolve">No personal apps can open this content</string>
+
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
     <string name="permlab_accessCallAudio">Record or play audio in telephony calls</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 3f48088..bf6ca29 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3885,9 +3885,7 @@
 
   <!-- Intent resolver and share sheet -->
   <java-symbol type="string" name="resolver_personal_tab" />
-  <java-symbol type="string" name="resolver_personal_tab_accessibility" />
   <java-symbol type="string" name="resolver_work_tab" />
-  <java-symbol type="string" name="resolver_work_tab_accessibility" />
   <java-symbol type="id" name="stub" />
   <java-symbol type="id" name="resolver_empty_state" />
   <java-symbol type="id" name="resolver_empty_state_icon" />
@@ -3897,15 +3895,18 @@
   <java-symbol type="id" name="resolver_empty_state_progress" />
   <java-symbol type="id" name="resolver_tab_divider" />
   <java-symbol type="string" name="resolver_cant_share_with_work_apps" />
+  <java-symbol type="string" name="resolver_cant_share_with_work_apps_explanation" />
   <java-symbol type="string" name="resolver_cant_share_with_personal_apps" />
-  <java-symbol type="string" name="resolver_cant_share_cross_profile_explanation" />
+  <java-symbol type="string" name="resolver_cant_share_with_personal_apps_explanation" />
   <java-symbol type="string" name="resolver_cant_access_work_apps" />
   <java-symbol type="string" name="resolver_cant_access_work_apps_explanation" />
   <java-symbol type="string" name="resolver_cant_access_personal_apps" />
   <java-symbol type="string" name="resolver_cant_access_personal_apps_explanation" />
-  <java-symbol type="string" name="resolver_turn_on_work_apps_view" />
-  <java-symbol type="string" name="resolver_turn_on_work_apps_share" />
-  <java-symbol type="string" name="resolver_no_apps_available" />
+  <java-symbol type="string" name="resolver_turn_on_work_apps" />
+  <java-symbol type="string" name="resolver_no_work_apps_available_share" />
+  <java-symbol type="string" name="resolver_no_work_apps_available_resolve" />
+  <java-symbol type="string" name="resolver_no_personal_apps_available_share" />
+  <java-symbol type="string" name="resolver_no_personal_apps_available_resolve" />
   <java-symbol type="string" name="resolver_switch_on_work" />
   <java-symbol type="drawable" name="ic_work_apps_off" />
   <java-symbol type="drawable" name="ic_sharing_disabled" />
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 a6cbc1a..e427421 100644
--- a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
+++ b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
@@ -1343,7 +1343,7 @@
         onView(withText(R.string.resolver_work_tab)).perform(click());
         waitForIdle();
 
-        onView(withText(R.string.resolver_turn_on_work_apps_share))
+        onView(withText(R.string.resolver_turn_on_work_apps))
                 .check(matches(isDisplayed()));
     }
 
@@ -1368,7 +1368,7 @@
         onView(withText(R.string.resolver_work_tab)).perform(click());
         waitForIdle();
 
-        onView(withText(R.string.resolver_no_apps_available))
+        onView(withText(R.string.resolver_no_work_apps_available_share))
                 .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 9d1ca61..4ec89b7 100644
--- a/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java
+++ b/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java
@@ -624,7 +624,7 @@
         onView(withText(R.string.resolver_work_tab)).perform(click());
         waitForIdle();
 
-        onView(withText(R.string.resolver_turn_on_work_apps_view))
+        onView(withText(R.string.resolver_turn_on_work_apps))
                 .check(matches(isDisplayed()));
     }
 
@@ -648,7 +648,7 @@
         onView(withText(R.string.resolver_work_tab)).perform(click());
         waitForIdle();
 
-        onView(withText(R.string.resolver_no_apps_available))
+        onView(withText(R.string.resolver_no_work_apps_available_resolve))
                 .check(matches(isDisplayed()));
     }