Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2171364
Replace captcha webview with warning
androidacy-user Oct 22, 2022
154e5d7
Update with upstream
androidacy-user Oct 22, 2022
b6fc437
Merge branch 'master' of https://github.com/Fox2Code/FoxMagiskModuleM…
androidacy-user Oct 22, 2022
f20d95e
Merge branch 'Fox2Code:master' into master
androidacy-user Nov 9, 2022
801c136
Update README.md
androidacy-user Nov 9, 2022
c88de9c
Update README.md
androidacy-user Nov 9, 2022
5967765
Merge branch 'Fox2Code:master' into master
androidacy-user Nov 20, 2022
05a29b9
Merge branch 'Fox2Code:master' into master
androidacy-user Nov 25, 2022
b6077f2
Loads of work
androidacy-user Nov 26, 2022
7c934e9
Code cleanup and minor fixes
androidacy-user Nov 26, 2022
55b2b5c
Fix weird proguard error
androidacy-user Nov 26, 2022
37b19f0
Handle notification perm properly
androidacy-user Nov 27, 2022
39cfa8c
Allow user to permanently dismiss notifications request
androidacy-user Nov 27, 2022
29e3d7e
Add option to make dark theme a black theme
androidacy-user Nov 28, 2022
35b00cf
Update androidacy api integration with new reqs
androidacy-user Nov 29, 2022
ff1cb4f
Updates
androidacy-user Dec 2, 2022
0339dd7
Proper implementation for black theme
androidacy-user Dec 2, 2022
4fa978b
Add client ID as per androidacy spec
androidacy-user Dec 6, 2022
f07627d
Fix tests
androidacy-user Dec 6, 2022
dfe5357
Fix crashing for theme switcher
androidacy-user Dec 7, 2022
f3d31ed
Fix empty androidacy client id and bundle cronet
androidacy-user Dec 7, 2022
46a4bd2
Fix tests, again
androidacy-user Dec 7, 2022
9f8703d
Fix tests, again
androidacy-user Dec 7, 2022
cdc4bcd
We're gonna be nice and include default client keys
androidacy-user Dec 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix crashing for theme switcher
Very hacky but it's better than it crashing for non-english locales

Signed-off-by: androidacy-user <opensource@androidacy.com>
  • Loading branch information
androidacy-user committed Dec 7, 2022
commit dfe53576bdeaabc8976585b78460b71cdb242a51
9 changes: 0 additions & 9 deletions app/src/main/java/com/fox2code/mmm/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,9 @@ public void updateTheme() {
themeResId = monet ? R.style.Theme_MagiskModuleManager_Monet_Light : R.style.Theme_MagiskModuleManager_Light;
break;
}
// Handle force black theme
if (theme.equals("dark") && isForceBlackThemeEnabled()) {
// just black background
themeResId = monet ? R.style.Theme_MagiskModuleManager_Monet_Black : R.style.Theme_MagiskModuleManager_Black;
}
this.setManagerThemeResId(themeResId);
}

private boolean isForceBlackThemeEnabled() {
return getSharedPreferences().getBoolean("pref_force_black_theme", false);
}

@StyleRes
public int getManagerThemeResId() {
return managerThemeResId;
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/java/com/fox2code/mmm/utils/Http.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ public class Http {
builder.enableBrotli(true);
builder.enableHttp2(true);
builder.enableQuic(true);
// Cache size is 10MB
// Make the directory if it does not exist
File cacheDir = new File(mainApplication.getCacheDir(), "cronet");
if (!cacheDir.exists()) {
if (!cacheDir.mkdirs()) {
throw new IOException("Failed to create cronet cache directory");
}
}
builder.setStoragePath(mainApplication.getCacheDir().getAbsolutePath() + "/cronet");
builder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISK_NO_HTTP, 10 * 1024 * 1024);
CronetEngine engine =
builder.build();
httpclientBuilder.addInterceptor(CronetInterceptor.newBuilder(engine).build());
Expand Down
8 changes: 1 addition & 7 deletions app/src/main/res/values-cs/arrays.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
<resources>
<!-- If translating, please remove "theme_values"
<string-array name="theme_values" translatable="false">
<item>system</item>
<item>dark</item>
<item>light</item>
</string-array>-->

<string-array name="theme_values_names">
<item>Dle systému</item>
<item>Tmavá</item>
<item>AMOLED Black</item>
<item>Světlá</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-de/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<string-array name="theme_values_names">
<item>Systemvorgabe</item>
<item>Dunkel</item>
<item>AMOLED Black</item>
<item>Hell</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-el/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Προεπιλογή συστήματως</item>
<item>Σκωτεινό</item>
<item>AMOLED Black</item>
<item>Ανοιχτό</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-es-rMX/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Sistema</item>
<item>Oscuro</item>
<item>AMOLED Black</item>
<item>Claro</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-et/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Süsteem</item>
<item>Tume</item>
<item>AMOLED Black</item>
<item>Hele</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Système</item>
<item>Sombre</item>
<item>AMOLED Black</item>
<item>Clair</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-id/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Sistem</item>
<item>Gelap</item>
<item>AMOLED Black</item>
<item>Terang</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-it/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Sistema</item>
<item>Scuro</item>
<item>AMOLED Black</item>
<item>Chiaro</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-ja/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>システムの設定を使用</item>
<item>ダーク</item>
<item>AMOLED Black</item>
<item>ライト</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-pl/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item comment="theme_values_names">Zgodny z systemem</item>
<item comment="theme_values_names">Ciemny</item>
<item>AMOLED Black</item>
<item comment="theme_values_names">Jasny</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-pt-rBR/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Sistema</item>
<item>Escuro</item>
<item>AMOLED Black</item>
<item>Claro</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-ro/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<string-array name="theme_values_names">
<item>Sistem</item>
<item>Întunecată</item>
<item>AMOLED Black</item>
<item>Luminoasă</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-ru/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Как в системе</item>
<item>Тёмная</item>
<item>AMOLED Black</item>
<item>Светлая</item>
</string-array>
</resources>
8 changes: 1 addition & 7 deletions app/src/main/res/values-sk/arrays.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
<resources>
<!-- If translating, please remove "theme_values"
<string-array name="theme_values" translatable="false">
<item>system</item>
<item>dark</item>
<item>light</item>
</string-array>-->

<string-array name="theme_values_names">
<item>Podľa systému</item>
<item>Tmavá</item>
<item>AMOLED Black</item>
<item>Svetlá</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-tr/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>Sistem</item>
<item>Koyu</item>
<item>AMOLED Black</item>
<item>Açık</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-vi/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<string-array name="theme_values_names">
<item>Hệ thống</item>
<item>Tối</item>
<item>AMOLED Black</item>
<item>Sáng</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rCN/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>跟随系统</item>
<item>深色模式</item>
<item>AMOLED Black</item>
<item>明亮模式</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rTW/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<string-array name="theme_values_names">
<item>跟隨系統</item>
<item>深色主題</item>
<item>AMOLED Black</item>
<item>淺色主題</item>
</string-array>
</resources>