diff options
Diffstat (limited to 'src/com/android/launcher3/settings/DeveloperOptionsFragment.java')
-rw-r--r-- | src/com/android/launcher3/settings/DeveloperOptionsFragment.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/com/android/launcher3/settings/DeveloperOptionsFragment.java b/src/com/android/launcher3/settings/DeveloperOptionsFragment.java index b06b8a10bf..4d63218785 100644 --- a/src/com/android/launcher3/settings/DeveloperOptionsFragment.java +++ b/src/com/android/launcher3/settings/DeveloperOptionsFragment.java @@ -20,7 +20,6 @@ import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS; import static android.view.View.GONE; import static android.view.View.VISIBLE; -import static com.android.launcher3.settings.SettingsActivity.EXTRA_FRAGMENT_ARG_KEY; import static com.android.launcher3.uioverrides.plugins.PluginManagerWrapper.PLUGIN_CHANGED; import static com.android.launcher3.uioverrides.plugins.PluginManagerWrapper.pluginEnabledKey; @@ -30,7 +29,6 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.net.Uri; @@ -46,7 +44,6 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.widget.EditText; -import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -60,15 +57,12 @@ import androidx.preference.PreferenceViewHolder; import androidx.preference.SwitchPreference; import com.android.launcher3.R; -import com.android.launcher3.Utilities; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.config.FlagTogglerPrefUi; import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper; -import com.android.launcher3.util.OnboardingPrefs; import java.util.ArrayList; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -110,7 +104,6 @@ public class DeveloperOptionsFragment extends PreferenceFragmentCompat { initFlags(); loadPluginPrefs(); maybeAddSandboxCategory(); - addOnboardingPrefsCatergory(); if (getActivity() != null) { getActivity().setTitle("Developer Options"); @@ -160,15 +153,6 @@ public class DeveloperOptionsFragment extends PreferenceFragmentCompat { } }); - if (getArguments() != null) { - String filter = getArguments().getString(EXTRA_FRAGMENT_ARG_KEY); - // Normally EXTRA_FRAGMENT_ARG_KEY is used to highlight the preference with the given - // key. This is a slight variation where we instead filter by the human-readable titles. - if (filter != null) { - filterBox.setText(filter); - } - } - View listView = getListView(); final int bottomPadding = listView.getPaddingBottom(); listView.setOnApplyWindowInsetsListener((v, insets) -> { @@ -371,28 +355,6 @@ public class DeveloperOptionsFragment extends PreferenceFragmentCompat { sandboxCategory.addPreference(launchSandboxModeTutorialPreference); } - private void addOnboardingPrefsCatergory() { - PreferenceCategory onboardingCategory = newCategory("Onboarding Flows"); - onboardingCategory.setSummary("Reset these if you want to see the education again."); - for (Map.Entry<String, String[]> titleAndKeys : OnboardingPrefs.ALL_PREF_KEYS.entrySet()) { - String title = titleAndKeys.getKey(); - String[] keys = titleAndKeys.getValue(); - Preference onboardingPref = new Preference(getContext()); - onboardingPref.setTitle(title); - onboardingPref.setSummary("Tap to reset"); - onboardingPref.setOnPreferenceClickListener(preference -> { - SharedPreferences.Editor sharedPrefsEdit = Utilities.getPrefs(getContext()).edit(); - for (String key : keys) { - sharedPrefsEdit.remove(key); - } - sharedPrefsEdit.apply(); - Toast.makeText(getContext(), "Reset " + title, Toast.LENGTH_SHORT).show(); - return true; - }); - onboardingCategory.addPreference(onboardingPref); - } - } - private String toName(String action) { String str = action.replace("com.android.systemui.action.PLUGIN_", "") .replace("com.android.launcher3.action.PLUGIN_", ""); |