Skip to content

Commit

Permalink
More Logging enabled by default in nightly
Browse files Browse the repository at this point in the history
Signed-off-by: DHD2280 <[email protected]>
  • Loading branch information
DHD2280 committed Nov 29, 2024
1 parent f9f0463 commit 9b4f1b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@
import java.util.List;

import it.dhd.oneplusui.preference.OplusSliderPreference;
import it.dhd.oneplusui.preference.OplusSwitchPreference;
import it.dhd.oxygencustomizer.BuildConfig;
import it.dhd.oxygencustomizer.R;
import it.dhd.oxygencustomizer.xposed.utils.ExtendedSharedPreferences;

Expand Down Expand Up @@ -894,6 +896,8 @@ public static boolean isEnabled(String key) {
instance.mPreferences.getBoolean("fix_lag_switch", false) &&
!instance.mPreferences.getBoolean("fix_lag_force_all_apps", false);

case "moreLogging" -> !BuildConfig.VERSION_NAME.contains("nightly");

default -> true;
};
}
Expand Down Expand Up @@ -1169,6 +1173,11 @@ public static void setupPreference(Preference preference) {
// Quick Settings
case "QSLabelScaleFactor", "QSSecondaryLabelScaleFactor" ->
((OplusSliderPreference) preference).slider.setLabelFormatter(value -> (value + 100) + "%");
case "moreLogging" -> {
if (BuildConfig.VERSION_NAME.contains("nightly")) {
((OplusSwitchPreference) preference).setChecked(true);
}
}
}
} catch (Throwable ignored) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static void loadEverything(String packageName, String... key) {
boolean moreLogging = Xprefs.getBoolean(Constants.Preferences.General.PREF_MORE_LOGGING, false);

for (XposedMods thisMod : XPLauncher.runningMods) {
thisMod.mDebug = moreLogging;
thisMod.mDebug = BuildConfig.VERSION_NAME.contains("nightly") || moreLogging;
thisMod.updatePrefs(key);
}
}
Expand Down

0 comments on commit 9b4f1b1

Please sign in to comment.