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:
Philip P. Moltmann
2018-08-28 15:01:43 -07:00
parent a59ce66b3b
commit e3f721132a
79 changed files with 358 additions and 274 deletions

View File

@@ -31,7 +31,7 @@ import android.provider.Settings;
import androidx.preference.PreferenceScreen;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import com.android.settingslib.RestrictedLockUtils;
import com.android.settingslib.RestrictedLockUtilsInternal;
import com.android.settingslib.RestrictedPreference;
import org.junit.Before;
@@ -69,7 +69,7 @@ public class AndroidBeamPreferenceControllerTest {
when(mContext.getApplicationContext()).thenReturn(mContext);
when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
when(mContext.getSystemService(Context.NFC_SERVICE)).thenReturn(mManager);
when(RestrictedLockUtils.hasBaseUserRestriction(mContext,
when(RestrictedLockUtilsInternal.hasBaseUserRestriction(mContext,
UserManager.DISALLOW_OUTGOING_BEAM, UserHandle.myUserId())).thenReturn(false);
when(NfcAdapter.getDefaultAdapter(mContext)).thenReturn(mNfcAdapter);
@@ -104,7 +104,7 @@ public class AndroidBeamPreferenceControllerTest {
public void isBeamEnable_disAllowBeam_shouldReturnFalse() {
when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF);
when(RestrictedLockUtils.hasBaseUserRestriction(mContext,
when(RestrictedLockUtilsInternal.hasBaseUserRestriction(mContext,
UserManager.DISALLOW_OUTGOING_BEAM, UserHandle.myUserId())).thenReturn(true);
mAndroidBeamController.displayPreference(mScreen);