Fix the problem that the autofill could be searched.

PreferenceCategory will not be indexed by default. The auto fill
category use the AutofillPreferenceCategory class in the xml so
it will be indexed.
The solution is to create a controller to replace AutofillPreferenceCategory.

Fix: 185914894
Test: manual adb test to see the log
Change-Id: Id0e3bcc33a3132434a6bd1fe91e1c6915116d06d
This commit is contained in:
Stanley Wang
2022-03-01 19:28:30 +08:00
parent 100a1f9990
commit e11d9e9ef3
3 changed files with 49 additions and 30 deletions

View File

@@ -47,6 +47,7 @@ import com.android.settings.SettingsActivity;
import com.android.settings.Utils;
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.dashboard.RestrictedDashboardFragment;
import com.android.settings.development.autofill.AutofillCategoryController;
import com.android.settings.development.autofill.AutofillLoggingLevelPreferenceController;
import com.android.settings.development.autofill.AutofillResetOptionsPreferenceController;
import com.android.settings.development.bluetooth.AbstractBluetoothDialogPreferenceController;
@@ -566,6 +567,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
controllers.add(new DefaultLaunchPreferenceController(context, "density"));
controllers.add(new DefaultLaunchPreferenceController(context, "background_check"));
controllers.add(new DefaultLaunchPreferenceController(context, "inactive_apps"));
controllers.add(new AutofillCategoryController(context, lifecycle));
controllers.add(new AutofillLoggingLevelPreferenceController(context, lifecycle));
controllers.add(new AutofillResetOptionsPreferenceController(context));
controllers.add(new BluetoothCodecDialogPreferenceController(context, lifecycle,