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:
@@ -30,6 +30,7 @@ import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settingslib.RestrictedLockUtils;
|
||||
import com.android.settingslib.RestrictedLockUtilsInternal;
|
||||
import com.android.settingslib.RestrictedSwitchPreference;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
@@ -130,7 +131,7 @@ public class StayAwakePreferenceController extends DeveloperOptionsPreferenceCon
|
||||
// will lock... in this case we can't allow the user to turn
|
||||
// on "stay awake when plugged in" because that would defeat the
|
||||
// restriction.
|
||||
return RestrictedLockUtils.checkIfMaximumTimeToLockIsSet(mContext);
|
||||
return RestrictedLockUtilsInternal.checkIfMaximumTimeToLockIsSet(mContext);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
@@ -28,8 +28,8 @@ import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settingslib.RestrictedLockUtils;
|
||||
import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
||||
import com.android.settingslib.RestrictedLockUtilsInternal;
|
||||
import com.android.settingslib.RestrictedSwitchPreference;
|
||||
import com.android.settingslib.development.DeveloperOptionsPreferenceController;
|
||||
|
||||
@@ -57,7 +57,8 @@ public class VerifyAppsOverUsbPreferenceController extends DeveloperOptionsPrefe
|
||||
class RestrictedLockUtilsDelegate {
|
||||
public EnforcedAdmin checkIfRestrictionEnforced(
|
||||
Context context, String userRestriction, int userId) {
|
||||
return RestrictedLockUtils.checkIfRestrictionEnforced(context, userRestriction, userId);
|
||||
return RestrictedLockUtilsInternal.checkIfRestrictionEnforced(context, userRestriction,
|
||||
userId);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user