Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c95c478d authored by Ankit Gupta's avatar Ankit Gupta Committed by Gerrit Code Review
Browse files

Settings: disable wifi display from search indexing if disabled

If wifi display is disabled from the system property or from
the overlay file, disable its key indexing to stop appearing
it in search result. Also update the database version to reflect
the changes.
Also fix indexing for saved access point settings.

Issue-id: YAM-141

Change-Id: Ia3688e4b294ad67ab8029dd47d1067fd722cbff7
parent e99695e2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -778,6 +778,11 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
                    if (!Utils.isDozeAvailable(context)) {
                        result.add(KEY_DOZE);
                    }
                    if (!context.getResources().getBoolean(
                                 com.android.internal.R.bool.config_enableWifiDisplay) &&
                            (SystemProperties.getInt(FORCE_WIFI_DISPLAY_ENABLE, -1) != 1)) {
                        result.add(KEY_WIFI_DISPLAY);
                    }
                    return result;
                }
            };
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper {
    private static final String TAG = "IndexDatabaseHelper";

    private static final String DATABASE_NAME = "search_index.db";
    private static final int DATABASE_VERSION = 119;
    private static final int DATABASE_VERSION = 120;

    public interface Tables {
        public static final String TABLE_PREFS_INDEX = "prefs_index";
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ public final class SearchIndexableResources {
        sResMap.put(SavedAccessPointsWifiSettings.class.getName(),
                new SearchIndexableResource(
                        Ranking.getRankForClassName(SavedAccessPointsWifiSettings.class.getName()),
                        R.xml.wifi_display_saved_access_points,
                        NO_DATA_RES_ID,
                        SavedAccessPointsWifiSettings.class.getName(),
                        R.drawable.ic_settings_wireless));