Merge "[Settings] Pass the system user to launch the web help page" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-29 18:55:24 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 2 deletions

View File

@@ -65,7 +65,8 @@ public final class ActionDisabledByAdminDialogHelper {
R.layout.admin_support_details_dialog, null); R.layout.admin_support_details_dialog, null);
mActionDisabledByAdminController = ActionDisabledByAdminControllerFactory mActionDisabledByAdminController = ActionDisabledByAdminControllerFactory
.createInstance(mActivity, restriction, .createInstance(mActivity, restriction,
new DeviceAdminStringProviderImpl(mActivity)); new DeviceAdminStringProviderImpl(mActivity),
UserHandle.SYSTEM);
} }
private @UserIdInt int getEnforcementAdminUserId(@NonNull EnforcedAdmin admin) { private @UserIdInt int getEnforcementAdminUserId(@NonNull EnforcedAdmin admin) {

View File

@@ -111,7 +111,7 @@ public class ActionDisabledLearnMoreButtonLauncherImplTest {
@Test @Test
public void showHelpPage_works() { public void showHelpPage_works() {
mImpl.showHelpPage(mActivity, URL); mImpl.showHelpPage(mActivity, URL, CONTEXT_USER);
verify(mActivity).startActivityAsUser(mIntentCaptor.capture(), eq(CONTEXT_USER)); verify(mActivity).startActivityAsUser(mIntentCaptor.capture(), eq(CONTEXT_USER));
assertActionViewIntent(mIntentCaptor.getValue()); assertActionViewIntent(mIntentCaptor.getValue());