Merge "Call system service API instead of checking the phenotype flag directly."

This commit is contained in:
Jan Tomljanovic
2022-01-24 12:55:20 +00:00
committed by Android (Google) Code Review
18 changed files with 202 additions and 245 deletions

View File

@@ -33,7 +33,7 @@ import com.android.settings.enterprise.EnterprisePrivacySettings;
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 @@ public class Settings extends SettingsActivity {
/** 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 @@ public class Settings extends SettingsActivity {
/** 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();