RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in some RestrictedLockUtilsInternal. This causes a lot of trivial code changes. I also updated the ordering of the imports in all affected files. Bug: 110953302 Test: Built make -j RunSettingsRoboTests Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
This commit is contained in:
@@ -41,7 +41,7 @@ import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.testutils.SettingsRobolectricTestRunner;
|
||||
import com.android.settings.testutils.shadow.ShadowAccountManager;
|
||||
import com.android.settings.testutils.shadow.ShadowContentResolver;
|
||||
import com.android.settings.testutils.shadow.ShadowRestrictedLockUtils;
|
||||
import com.android.settings.testutils.shadow.ShadowRestrictedLockUtilsInternal;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -54,7 +54,7 @@ import org.robolectric.annotation.Config;
|
||||
|
||||
@RunWith(SettingsRobolectricTestRunner.class)
|
||||
@Config(shadows = {ShadowAccountManager.class, ShadowContentResolver.class,
|
||||
ShadowRestrictedLockUtils.class})
|
||||
ShadowRestrictedLockUtilsInternal.class})
|
||||
public class ChooseAccountPreferenceControllerTest {
|
||||
|
||||
private Context mContext;
|
||||
@@ -77,7 +77,7 @@ public class ChooseAccountPreferenceControllerTest {
|
||||
public void tearDown() {
|
||||
ShadowContentResolver.reset();
|
||||
ShadowAccountManager.resetAuthenticator();
|
||||
ShadowRestrictedLockUtils.clearDisabledTypes();
|
||||
ShadowRestrictedLockUtilsInternal.clearDisabledTypes();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -115,9 +115,9 @@ public class ChooseAccountPreferenceControllerTest {
|
||||
true /* supportsUploading */)};
|
||||
ShadowContentResolver.setSyncAdapterTypes(syncAdapters);
|
||||
|
||||
ShadowRestrictedLockUtils.setHasSystemFeature(true);
|
||||
ShadowRestrictedLockUtils.setDevicePolicyManager(mock(DevicePolicyManager.class));
|
||||
ShadowRestrictedLockUtils.setDisabledTypes(new String[] {"test_type"});
|
||||
ShadowRestrictedLockUtilsInternal.setHasSystemFeature(true);
|
||||
ShadowRestrictedLockUtilsInternal.setDevicePolicyManager(mock(DevicePolicyManager.class));
|
||||
ShadowRestrictedLockUtilsInternal.setDisabledTypes(new String[] {"test_type"});
|
||||
|
||||
doReturn("label").when(mController).getLabelForType(anyString());
|
||||
|
||||
@@ -140,9 +140,9 @@ public class ChooseAccountPreferenceControllerTest {
|
||||
true /* supportsUploading */)};
|
||||
ShadowContentResolver.setSyncAdapterTypes(syncAdapters);
|
||||
|
||||
ShadowRestrictedLockUtils.setHasSystemFeature(true);
|
||||
ShadowRestrictedLockUtils.setDevicePolicyManager(mock(DevicePolicyManager.class));
|
||||
ShadowRestrictedLockUtils.setDisabledTypes(new String[] {"com.acct1"});
|
||||
ShadowRestrictedLockUtilsInternal.setHasSystemFeature(true);
|
||||
ShadowRestrictedLockUtilsInternal.setDevicePolicyManager(mock(DevicePolicyManager.class));
|
||||
ShadowRestrictedLockUtilsInternal.setDisabledTypes(new String[] {"com.acct1"});
|
||||
|
||||
doReturn("label").when(mController).getLabelForType(anyString());
|
||||
|
||||
|
Reference in New Issue
Block a user