Disable nfc foreground setting ui when the wallet role
is enabled.
Bug: 315194263
Test: local
Change-Id: I495c6c62b841617cf7914703740d8b52f628fd45
diff --git a/src/com/android/settings/nfc/NfcForegroundPreferenceController.java b/src/com/android/settings/nfc/NfcForegroundPreferenceController.java
index a4cad87..b036da2 100644
--- a/src/com/android/settings/nfc/NfcForegroundPreferenceController.java
+++ b/src/com/android/settings/nfc/NfcForegroundPreferenceController.java
@@ -16,6 +16,7 @@
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.pm.PackageManager;
+import android.permission.flags.Flags;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
@@ -68,6 +69,9 @@
@Override
public int getAvailabilityStatus() {
+ if (Flags.walletRoleEnabled()) {
+ return UNSUPPORTED_ON_DEVICE;
+ }
final PackageManager pm = mContext.getPackageManager();
if (!pm.hasSystemFeature(PackageManager.FEATURE_NFC)) {
return UNSUPPORTED_ON_DEVICE;