Call system service API instead of checking the phenotype flag directly.
Test: atest SettingsUnitTests
Bug: 208625216
Change-Id: Ib551cbaf0f09fe49bd81ef657037401263705521
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 61d1180..2c213b4 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -33,7 +33,7 @@
import com.android.settings.network.SubscriptionUtil;
import com.android.settings.network.telephony.MobileNetworkUtils;
import com.android.settings.overlay.FeatureFactory;
-import com.android.settings.safetycenter.SafetyCenterStatus;
+import com.android.settings.safetycenter.SafetyCenterStatusHolder;
import com.android.settings.security.SecuritySettingsFeatureProvider;
import com.google.android.setupdesign.util.ThemeHelper;
@@ -152,7 +152,7 @@
/** Redirects to SafetyCenter if enabled. */
@VisibleForTesting
public void handleSafetyCenterRedirection() {
- if (SafetyCenterStatus.isEnabled()) {
+ if (SafetyCenterStatusHolder.get().isEnabled(this)) {
try {
startActivity(new Intent(Intent.ACTION_SAFETY_CENTER));
finish();
@@ -213,7 +213,7 @@
/** Redirects to SafetyCenter if enabled. */
@VisibleForTesting
public void handleSafetyCenterRedirection() {
- if (SafetyCenterStatus.isEnabled()) {
+ if (SafetyCenterStatusHolder.get().isEnabled(this)) {
try {
startActivity(new Intent(Intent.ACTION_SAFETY_CENTER));
finish();