Bump version and add new(ish) theme

We feel this is stable enough to warrant a 1.x release so here's the version bump

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/242/head
androidacy-user 1 year ago
parent 3c98c9b6a1
commit 056d88955e

@ -27,8 +27,8 @@ android {
applicationId "com.fox2code.mmm"
minSdk 21
targetSdk 33
versionCode 60
versionName "0.6.8"
versionCode 61
versionName "1.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.release
}

@ -234,6 +234,12 @@ public class MainApplication extends FoxApplication implements androidx.work.Con
case "light":
themeResId = monet ? R.style.Theme_MagiskModuleManager_Monet_Light : R.style.Theme_MagiskModuleManager_Light;
break;
case "transparent_light":
if (monet) {
Log.w("MainApplication", "Monet is not supported for transparent theme");
}
themeResId = R.style.Theme_MagiskModuleManager_Transparent_Light;
break;
}
this.setManagerThemeResId(themeResId);
}
@ -319,8 +325,7 @@ public class MainApplication extends FoxApplication implements androidx.work.Con
SentryMain.initialize(this);
if (Objects.equals(BuildConfig.ANDROIDACY_CLIENT_ID, "")) {
Log.w("MainApplication", "Androidacy client id is empty! Please set it in androidacy" +
".properties. Will not enable Androidacy.");
Log.w("MainApplication", "Androidacy client id is empty! Please set it in androidacy" + ".properties. Will not enable Androidacy.");
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("pref_androidacy_repo_enabled", false);
editor.apply();

@ -123,6 +123,20 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
return true;
});
ListPreference themePreference = findPreference("pref_theme");
// If transparent theme(s) are set, disable monet
if (themePreference.getValue().equals("transparent_light")) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "Transparent theme is set, disabling monet");
}
findPreference("pref_enable_monet").setEnabled(false);
// Toggle monet off
((TwoStatePreference) findPreference("pref_enable_monet")).setChecked(false);
SharedPreferences.Editor editor =
getPreferenceManager().getSharedPreferences().edit();
editor.putBoolean("pref_enable_monet", false).apply();
// Set summary
findPreference("pref_enable_monet").setSummary(R.string.monet_disabled_summary);
}
themePreference.setSummaryProvider(p -> themePreference.getEntry());
themePreference.setOnPreferenceClickListener(p -> {
// You need to reboot your device at least once to be able to access dev-mode
@ -130,6 +144,26 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
return false;
});
themePreference.setOnPreferenceChangeListener((preference, newValue) -> {
if (BuildConfig.DEBUG) {
Log.d(TAG, "Theme changed, refreshing activity. New value: " + newValue);
}
// Immediately save
SharedPreferences.Editor editor =
getPreferenceManager().getSharedPreferences().edit();
editor.putString("pref_theme", (String) newValue).apply();
// If theme contains "transparent" then disable monet
if (newValue.toString().contains("transparent")) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "Transparent theme is being set, disabling monet");
}
findPreference("pref_enable_monet").setEnabled(false);
((TwoStatePreference) findPreference("pref_enable_monet")).setChecked(false);
editor.putBoolean("pref_enable_monet", false).apply();
findPreference("pref_enable_monet").setSummary(R.string.monet_disabled_summary);
} else {
findPreference("pref_enable_monet").setEnabled(true);
findPreference("pref_enable_monet").setSummary(null);
}
devModeStep = 0;
UiThreadHandler.handler.postDelayed(() -> {
MainApplication.getINSTANCE().updateTheme();

@ -3,6 +3,7 @@
<item>Dle systému</item>
<item>Tmavá</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Světlá</item>
</string-array>
</resources>

@ -4,6 +4,7 @@
<item>Systemvorgabe</item>
<item>Dunkel</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Hell</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Προεπιλογή συστήματως</item>
<item>Σκωτεινό</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Ανοιχτό</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Sistema</item>
<item>Oscuro</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Claro</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Süsteem</item>
<item>Tume</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Hele</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Système</item>
<item>Sombre</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Clair</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Sistem</item>
<item>Gelap</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Terang</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Sistema</item>
<item>Scuro</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Chiaro</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>システムの設定を使用</item>
<item>ダーク</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>ライト</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item comment="theme_values_names">Zgodny z systemem</item>
<item comment="theme_values_names">Ciemny</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item comment="theme_values_names">Jasny</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Sistema</item>
<item>Escuro</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Claro</item>
</string-array>
</resources>

@ -5,6 +5,7 @@
<item>Sistem</item>
<item>Întunecată</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Luminoasă</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Как в системе</item>
<item>Тёмная</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Светлая</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Podľa systému</item>
<item>Tmavá</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Svetlá</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>Sistem</item>
<item>Koyu</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>ık</item>
</string-array>
</resources>

@ -4,6 +4,7 @@
<item>Hệ thống</item>
<item>Tối</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Sáng</item>
</string-array>
</resources>

@ -1,8 +1,9 @@
<resources>
<string-array name="theme_values_names">
<string-array name="theme_values_names">
<item>跟随系统</item>
<item>深色模式</item>
<item>纯黑模式</item>
<item>Transparent (light)</item>
<item>明亮模式</item>
</string-array>
</resources>

@ -3,6 +3,7 @@
<item>跟隨系統</item>
<item>深色主題</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>淺色主題</item>
</string-array>
</resources>

@ -1,9 +1,12 @@
<resources>
<!-- If translating, please remove "theme_values" -->
<!-- Transparent dark theme has, erm, issues -->
<string-array name="theme_values" translatable="false">
<item>system</item>
<item>dark</item>
<item>black</item>
<item>transparent_light</item>
<!-- <item>transparent_dark</item> -->
<item>light</item>
</string-array>
@ -11,6 +14,7 @@
<item>System</item>
<item>Dark</item>
<item>AMOLED Black</item>
<item>Transparent (light)</item>
<item>Light</item>
</string-array>
<string-array name="permission_notification_dont_ask_again">Don't prompt again</string-array>

@ -199,4 +199,5 @@
<string name="download_full_app">Download full version</string>
<string name="repo_update_failed">Some repos have failed to update</string>
<string name="repo_update_failed_extended">Update of %1$s failed. Please try again later.</string>
<string name="monet_disabled_summary">Monet has been disabled because it causes issues with transparent themes. Please choose another theme to enable monet.</string>
</resources>

Loading…
Cancel
Save