Implement #15841213 Search - index Developer Option only and only if they have been activated
- do not index Developer Options if they are not activated - index them just after their activation Change-Id: I54fcc6b55a1f29eb6b19d6e14e3158d4a38a6fe6
This commit is contained in:
@@ -41,6 +41,7 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.search.Index;
|
||||
import com.android.settings.search.Indexable;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -212,6 +213,11 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
|
||||
mDevHitToast = Toast.makeText(getActivity(), R.string.show_dev_on,
|
||||
Toast.LENGTH_LONG);
|
||||
mDevHitToast.show();
|
||||
// This is good time to index the Developer Options
|
||||
Index.getInstance(
|
||||
getActivity().getApplicationContext()).updateFromClassNameResource(
|
||||
DevelopmentSettings.class.getName(), true, true);
|
||||
|
||||
} else if (mDevHitCountdown > 0
|
||||
&& mDevHitCountdown < (TAPS_TO_BE_A_DEVELOPER-2)) {
|
||||
if (mDevHitToast != null) {
|
||||
|
||||
Reference in New Issue
Block a user