Don't show default payment component in search if Wallet role is enabled
Bug: 372254720 Test: atest PaymentSettingsTest Flag: android.permission.flags.wallet_role_enabled Change-Id: I4044d8fcd95db215d4a06b335b3cb96f8a5e3697
This commit is contained in:
@@ -30,6 +30,7 @@ import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.internal.hidden_from_bootclasspath.android.permission.flags.Flags;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
@@ -120,6 +121,9 @@ public class PaymentSettings extends DashboardFragment {
|
||||
|
||||
@Override
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
if (Flags.walletRoleEnabled()) {
|
||||
return false;
|
||||
}
|
||||
final UserManager userManager = context.getSystemService(UserManager.class);
|
||||
final UserInfo myUserInfo = userManager.getUserInfo(UserHandle.myUserId());
|
||||
if (myUserInfo.isGuest()) {
|
||||
|
||||
Reference in New Issue
Block a user