Skip to content

Commit

Permalink
Enable all optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
frknkrc44 committed Jan 11, 2024
1 parent 491b5f2 commit 7f64fc4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ android {
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
debuggable false
jniDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand All @@ -66,7 +69,7 @@ dependencies {

android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "FBoard-v${variant.versionName}.apk"
outputFileName = "${rootProject.name}-v${variant.versionName}.apk"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static void getNextLanguage() {
ArrayList<String> ll = LayoutUtils.getKeyListFromLanguageList(languageCache);
String key = SettingMap.SET_KEYBOARD_LANG_SELECT;
String sel = appDB.getString(key, (String) settingMap.getDefaults(key));
if (!sel.equals("")) {
if (!sel.isEmpty()) {
int index = -1;
for (int i = 0; i < ll.size(); i++) {
if (ll.get(i).equals(sel)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private static SettingMap getSettings() {
public static String getTranslation(Context ctx, String key) {
String requestedKey = "settings_" + key;
try {
int id = R.string.class.getDeclaredField(requestedKey).getInt(null);
int id = ctx.getResources().getIdentifier(requestedKey, "string", ctx.getPackageName());
return ctx.getString(id);
} catch (Throwable ignored) {}
return requestedKey;
Expand Down Expand Up @@ -598,7 +598,7 @@ public static void setColorsFromBitmap(Bitmap b) {
private List<String> getArrayAsList(String key) {
int id;
try {
id = R.array.class.getDeclaredField("settings_" + key).getInt(null);
id = mContext.getResources().getIdentifier("settings_" + key, "array", mContext.getPackageName());
} catch (Throwable t) {
id = 0;
}
Expand Down

0 comments on commit 7f64fc4

Please sign in to comment.