Merge "Some HSUM bug fixes" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
a7bb99683d
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assume.assumeFalse;
|
||||
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
@@ -74,8 +75,9 @@ public class TaplPrivateSpaceTest extends AbstractQuickStepTest {
|
||||
}
|
||||
|
||||
private void createAndStartPrivateProfileUser() {
|
||||
String createUserOutput = executeShellCommand("pm create-user --profileOf 0 --user-type "
|
||||
+ "android.os.usertype.profile.PRIVATE " + PRIVATE_PROFILE_NAME);
|
||||
int myUserId = Process.myUserHandle().getIdentifier();
|
||||
String createUserOutput = executeShellCommand("pm create-user --profileOf " + myUserId
|
||||
+ " --user-type android.os.usertype.profile.PRIVATE " + PRIVATE_PROFILE_NAME);
|
||||
updatePrivateProfileSetupSuccessful("pm create-user", createUserOutput);
|
||||
String[] tokens = createUserOutput.split("\\s+");
|
||||
mProfileUserId = Integer.parseInt(tokens[tokens.length - 1]);
|
||||
|
||||
@@ -104,7 +104,7 @@ class InstallSessionHelperTest {
|
||||
.thenReturn(listOf(expectedVerifiedSession))
|
||||
// When
|
||||
val actualSession =
|
||||
installSessionHelper.getActiveSessionInfo(UserHandle(0), expectedAppPackage)
|
||||
installSessionHelper.getActiveSessionInfo(myUserHandle(), expectedAppPackage)
|
||||
// Then
|
||||
assertThat(actualSession).isEqualTo(expectedVerifiedSession)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user