67 lines
2.1 KiB
Java
67 lines
2.1 KiB
Java
package com.cherish.settings.fragments;
|
|
|
|
import com.android.internal.logging.nano.MetricsProto;
|
|
|
|
import android.os.Bundle;
|
|
import android.content.Context;
|
|
import android.provider.Settings;
|
|
import androidx.preference.Preference;
|
|
import androidx.preference.ListPreference;
|
|
|
|
import com.android.settings.R;
|
|
|
|
import com.android.settings.SettingsPreferenceFragment;
|
|
import com.android.settings.search.BaseSearchIndexProvider;
|
|
import com.android.settingslib.search.SearchIndexable;
|
|
import android.provider.SearchIndexableResource;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
|
|
public class GestureSettings extends SettingsPreferenceFragment implements
|
|
Preference.OnPreferenceChangeListener {
|
|
|
|
@Override
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
|
|
addPreferencesFromResource(R.xml.cherish_settings_gestures);
|
|
}
|
|
|
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public int getMetricsCategory() {
|
|
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
|
}
|
|
|
|
/**
|
|
* For Search.
|
|
*/
|
|
|
|
public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
|
new BaseSearchIndexProvider() {
|
|
|
|
@Override
|
|
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
|
|
boolean enabled) {
|
|
ArrayList<SearchIndexableResource> result =
|
|
new ArrayList<SearchIndexableResource>();
|
|
SearchIndexableResource sir = new SearchIndexableResource(context);
|
|
sir.xmlResId = R.xml.cherish_settings_gestures;
|
|
result.add(sir);
|
|
return result;
|
|
}
|
|
|
|
@Override
|
|
public List<String> getNonIndexableKeys(Context context) {
|
|
List<String> keys = super.getNonIndexableKeys(context);
|
|
return keys;
|
|
}
|
|
};
|
|
|
|
}
|