Launcher3: Bring back developer settings on all builds

Change-Id: I93d7bb56728ed8e425130923169e5a454da69fdd
This commit is contained in:
Adithya R 2023-10-30 21:54:15 +05:30 committed by fazilsheik96
parent 21c611e2c3
commit a3088a6eb7
2 changed files with 12 additions and 6 deletions

View File

@ -69,7 +69,7 @@ public class FlagsFactory {
*/
public static BooleanFlag getDebugFlag(
int bugId, String key, boolean defaultValue, String description) {
if (true) { // Utilities.IS_DEBUG_DEVICE)
if (true) { // Utilities.IS_DEBUG_DEVICE
SharedPreferences prefs = currentApplication()
.getSharedPreferences(FLAGS_PREF_NAME, Context.MODE_PRIVATE);
boolean currentValue = prefs.getBoolean(key, defaultValue);
@ -88,7 +88,7 @@ public class FlagsFactory {
int bugId, String key, boolean defaultValueInCode, String description) {
INSTANCE.mKeySet.add(key);
boolean defaultValue = DeviceConfig.getBoolean(NAMESPACE_LAUNCHER, key, defaultValueInCode);
if (Utilities.IS_DEBUG_DEVICE) {
if (true) { // Utilities.IS_DEBUG_DEVICE
SharedPreferences prefs = currentApplication()
.getSharedPreferences(FLAGS_PREF_NAME, Context.MODE_PRIVATE);
boolean currentValue = prefs.getBoolean(key, defaultValue);
@ -111,9 +111,9 @@ public class FlagsFactory {
}
static List<DebugFlag> getDebugFlags() {
if (!Utilities.IS_DEBUG_DEVICE) {
/*if (!Utilities.IS_DEBUG_DEVICE) {
return Collections.emptyList();
}
}*/
synchronized (sDebugFlags) {
return new ArrayList<>(sDebugFlags);
}
@ -123,9 +123,9 @@ public class FlagsFactory {
* Dumps the current flags state to the print writer
*/
public static void dump(PrintWriter pw) {
if (!Utilities.IS_DEBUG_DEVICE) {
/*if (!Utilities.IS_DEBUG_DEVICE) {
return;
}
}*/
pw.println("DeviceFlags:");
synchronized (sDebugFlags) {
for (DebugFlag flag : sDebugFlags) {

View File

@ -167,6 +167,12 @@
android:defaultValue="false"
android:persistent="true" />
<Preference
android:key="pref_developer_options"
android:persistent="false"
android:title="Developer Options"
android:fragment="com.android.launcher3.uioverrides.flags.DeveloperOptionsFragment"/>
</androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>