Call system service API instead of checking the phenotype flag directly.
Test: atest SettingsUnitTests Bug: 208625216 Change-Id: Ib551cbaf0f09fe49bd81ef657037401263705521
This commit is contained in:
@@ -24,7 +24,7 @@ import androidx.preference.Preference;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.core.SubSettingLauncher;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settings.safetycenter.SafetyCenterStatus;
|
||||
import com.android.settings.safetycenter.SafetyCenterStatusHolder;
|
||||
|
||||
public class TopLevelSecurityEntryPreferenceController extends BasePreferenceController {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class TopLevelSecurityEntryPreferenceController extends BasePreferenceCon
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
if (!SafetyCenterStatus.isEnabled()) {
|
||||
if (!SafetyCenterStatusHolder.get().isEnabled(mContext)) {
|
||||
return AVAILABLE;
|
||||
}
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
|
Reference in New Issue
Block a user