Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f006a483 authored by Emil Bengtsson's avatar Emil Bengtsson Committed by Eric Rahm
Browse files

Only test multiuser functionality if supported

Bug: 253516230
Test: atest SettingsProviderTest:
InstallNonMarketAppsDeprecationTest#testValueForNewUser

Change-Id: I09d8a013d60dc619f3af8a1b882209e626f73f58
(cherry picked from commit 6876a41bbd1fcc9f76b634cee727c24cb57a0579)
parent 0eb9f586
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.providers.settings;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

import android.content.Context;
import android.content.pm.UserInfo;
@@ -116,6 +117,8 @@ public class InstallNonMarketAppsDeprecationTest extends BaseSettingsProviderTes

    @Test
    public void testValueForNewUser() throws Exception {
        assumeTrue(mUm.supportsMultipleUsers());

        UserInfo newUser = mUm.createUser("TEST_USER", 0);
        mUsersAddedByTest.add(newUser.id);
        String value = getSecureSettingForUserViaShell(newUser.id);