Proposal to move Developer Options to top of Home settings if studio build.

- Increases developer efficiency by avoiding the need to scroll

Bug: 258263867
Test: manual
Change-Id: I6cb46fdd12b51f8c45017f823dd4b2458e21fc72
This commit is contained in:
Jon Miranda
2022-11-08 11:42:28 -08:00
parent 98f400397b
commit 3153cd9b97

View File

@@ -18,6 +18,7 @@ package com.android.launcher3.settings;
import static androidx.core.view.accessibility.AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS;
import static com.android.launcher3.config.FeatureFlags.IS_STUDIO_BUILD;
import static com.android.launcher3.states.RotationHelper.ALLOW_ROTATION_PREFERENCE_KEY;
import android.content.Intent;
@@ -207,7 +208,11 @@ public class SettingsActivity extends FragmentActivity
PreferenceScreen screen = getPreferenceScreen();
for (int i = screen.getPreferenceCount() - 1; i >= 0; i--) {
Preference preference = screen.getPreference(i);
if (!initPreference(preference)) {
if (initPreference(preference)) {
if (IS_STUDIO_BUILD && preference == mDeveloperOptionPref) {
preference.setOrder(0);
}
} else {
screen.removePreference(preference);
}
}