Merge "Fix crash when trying to open app info page" into rvc-dev am: a43e978ffb
am: 37f7b8e26e
am: f979cd94b8
am: bc47ba6807
Change-Id: I2ce5ad73dca56e7f407412c4862d0f7112f3c9ca
This commit is contained in:
@@ -75,7 +75,7 @@ public class InteractAcrossProfilesDetailsTest {
|
||||
|
||||
assertThat(InteractAcrossProfilesDetails.getPreferenceSummary(
|
||||
mContext, CROSS_PROFILE_PACKAGE_NAME))
|
||||
.isEqualTo(mContext.getString(R.string.app_permission_summary_allowed));
|
||||
.isEqualTo(mContext.getString(R.string.interact_across_profiles_summary_allowed));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -98,7 +98,21 @@ public class InteractAcrossProfilesDetailsTest {
|
||||
|
||||
assertThat(InteractAcrossProfilesDetails.getPreferenceSummary(
|
||||
mContext, CROSS_PROFILE_PACKAGE_NAME))
|
||||
.isEqualTo(mContext.getString(R.string.app_permission_summary_not_allowed));
|
||||
.isEqualTo(mContext.getString(
|
||||
R.string.interact_across_profiles_summary_not_allowed));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getPreferenceSummary_noWorkProfile_returnsNotAllowed() {
|
||||
shadowOf(mUserManager).addUser(
|
||||
PERSONAL_PROFILE_ID, "personal-profile"/* name */, 0/* flags */);
|
||||
shadowOf(mPackageManager).setInstalledPackagesForUserId(
|
||||
PERSONAL_PROFILE_ID, ImmutableList.of(CROSS_PROFILE_PACKAGE_NAME));
|
||||
|
||||
assertThat(InteractAcrossProfilesDetails.getPreferenceSummary(
|
||||
mContext, CROSS_PROFILE_PACKAGE_NAME))
|
||||
.isEqualTo(mContext.getString(
|
||||
R.string.interact_across_profiles_summary_not_allowed));
|
||||
}
|
||||
|
||||
private PermissionInfo createCrossProfilesPermissionInfo() {
|
||||
|
Reference in New Issue
Block a user