From 0c69735cdd66c0f335042b68dd83375111269337 Mon Sep 17 00:00:00 2001 From: cyberta Date: Tue, 26 Nov 2019 01:52:38 +0100 Subject: initial commit for apk split --- app/build.gradle | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 124 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle index 7e4a6e03..2290a06a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,6 @@ import java.util.regex.Matcher import java.util.regex.Pattern +import groovy.util.* apply plugin: 'com.android.application' @@ -56,10 +57,11 @@ android { } } - flavorDimensions "branding", "implementation" + flavorDimensions "branding", "implementation", "abi" productFlavors { productFlavors.all { ext.appName = null; + ext.splitApk = false } production { dimension "implementation" @@ -67,12 +69,13 @@ android { insecure { dimension "implementation" } + normal { dimension "branding" appName = "Bitmask" + splitApk = true } - custom { dimension "branding" @@ -106,10 +109,64 @@ android { //The duration in days to trigger the donation reminder buildConfigField 'int', 'donation_reminder_duration', '30' + // Build apks for each architecture, in addition to one 'fat' apk containing libraries for all all architectures + // enable this if you're publishing in gplay + ext { + splitApk = false + } + //************************************************************************** //************************************************************************** } + + + fat { + dimension "abi" + ext { + abiVersionCode = 0 + } + } + + x86 { + dimension "abi" + ndk { + abiFilters "x86" + } + ext { + abiVersionCode = 1 + } + } + + armv7 { + dimension "abi" + ndk { + abiFilters "armeabi-v7a" + } + ext { + abiVersionCode = 2 + } + } + + x86_64 { + dimension "abi" + ndk { + abiFilters "x86_64" + } + ext { + abiVersionCode = 3 + } + } + + arm64 { + dimension "abi" + ndk { + abiFilters "arm64-v8a" + } + ext { + abiVersionCode = 4 + } + } } buildTypes { @@ -159,8 +216,61 @@ android { java.srcDirs += ['src/sharedTest/java'] } } + + /** + * BUILD VARAIANTS: + * ================= + * Development builds: + * -------------------- + * customProductionFatDebug -> branded development build, includes all ABIs + * normalProductionFatDebug -> Bitmask development build, includes all ABIS + * customInsecureFatDebug -> branded development build, doesn't checks certificates (for test server setup w/o valid certificates), includes all ABIs + * normalInsecureFatDebug -> Bitmask development build, doesn't checks certificates (for test server setup w/o valid certificates), includes all ABIs + * + * Branded Releases: + * ----------------- + * customProductionFatBeta -> branded build, includes all ABI's, Beta release + * customProductionFatRelease -> branded build, includes all ABI's, stable release (-> F-Droid, GPlay if not splitApk is set to true) + * + * Bitmask Beta releases: + * ---------------------- + * normalProductionArm64Beta -> Bitmask build, only for ABI arm64, for GPlay Beta channel with split apks (1 of 4) + * normalProductionArmv7Beta -> Bitmask build, only for ABI armeabi-v7a, for GPlay Beta channel with split apks (2 of 4) + * normalProductionX86Beta -> Bitmask build, only for ABI x86, for GPlay Beta channel with split apks (3 of 4) + * normalProductionX86_64Beta -> Bitmask build, only for ABI x86 64 bit, for GPlay Beta channel with split apks (4 of 4) + * normalProductionFatBeta -> Bitmask build, including all ABIS, for izzysoft's F-Droid repo and beta link on download page + * + * Bitmask Stable releases: + * ------------------------ + * normalProductionArm64Release -> Bitmask build, only for ABI arm64, for GPlay releases with split apks (1 of 4) + * normalProductionArmv7Release -> Bitmask build, only for ABI armeabi-v7a, for GPlay releases with split apks (2 of 4) + * normalProductionX86Release -> Bitmask build, only for ABI x86, for GPlay releases with split apks (3 of 4) + * normalProductionX86_64Release -> Bitmask build, only for ABI x86 64 bit, for GPlay releases with split apks (4 of 4) + * normalProductionFatRelease -> Bitmask build, including all ABIS, for official F-Droid repo and stable link on download page + */ + + variantFilter { variant -> + + def names = variant.flavors*.name + def buildTypeName = variant.buildType.name + // flavorDimensions "branding" -> 0, "implementation" -> 1, "abi" -> 2 + def supportsSplitApk = variant.flavors[0].splitApk + // To check for a certain build type, use variant.buildType.name == "" + if (((names.contains("insecure") && !names.contains("fat")) || + (names.contains("insecure") && buildTypeName.contains("beta")) || + (names.contains("insecure") && buildTypeName.contains("release")) || + (buildTypeName.contains("debug") && !names.contains("fat")) || + (!supportsSplitApk && !names.contains("fat"))) + ) { + // Gradle ignores any variants that satisfy the conditions above. + setIgnore(true) + } + } } + + + dependencies { testImplementation 'junit:junit:4.12' //outdated mockito-core version due to powermock dependency @@ -205,11 +315,22 @@ dependencies { } android.applicationVariants.all { variant -> + + // configure app name for different build variants def flavors = variant.productFlavors - // flavorDimensions "branding" -> 0, "implementation" -> 1 + // flavorDimensions "branding" -> 0, "implementation" -> 1, "abi" -> 2 def branding = flavors[0] + def abiDimension = flavors[2] def buildType = variant.buildType variant.resValue "string", "app_name", "\"${branding.appName}${buildType.appSuffix}\"" + + // reconfigure version codes for split builds + variant.outputs.each { output -> + // if not a fat build + if (abiDimension.abiVersionCode > 0) { + output.versionCodeOverride = android.defaultConfig.versionCode * 1000 + abiDimension.abiVersionCode + } + } } -- cgit v1.2.3 From 5706b9e8d890272e8839384f29d6042bf2ae06da Mon Sep 17 00:00:00 2001 From: cyberta Date: Tue, 26 Nov 2019 02:15:42 +0100 Subject: add minifyEnabled and shrinkResources to Release and Beta builds --- app/build.gradle | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle index 2290a06a..988b0a31 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -177,6 +177,8 @@ android { //runProguard true if(signingConfigs.contains(release)) signingConfig signingConfigs.release.isSigningReady() ? signingConfigs.release : signingConfigs.debug + minifyEnabled = true + shrinkResources true } beta { initWith release -- cgit v1.2.3 From 66588f76e9b255466eaad2d34edfa87a66c2ff69 Mon Sep 17 00:00:00 2001 From: cyberta Date: Tue, 26 Nov 2019 02:52:03 +0100 Subject: convert riseup vpn's pngs to webp files to reduce apk size --- app/src/custom/res/drawable-land/background_main.png | Bin 38813 -> 0 bytes app/src/custom/res/drawable-land/background_main.webp | Bin 0 -> 10452 bytes .../custom/res/drawable-land/ic_splash_background.png | Bin 60125 -> 0 bytes .../custom/res/drawable-land/ic_splash_background.webp | Bin 0 -> 16928 bytes .../res/drawable-sw600dp-port/background_main.png | Bin 45747 -> 0 bytes .../res/drawable-sw600dp-port/background_main.webp | Bin 0 -> 12894 bytes .../res/drawable-sw600dp-port/ic_splash_background.png | Bin 74566 -> 0 bytes .../res/drawable-sw600dp-port/ic_splash_background.webp | Bin 0 -> 21606 bytes app/src/custom/res/drawable-sw600dp/background_main.png | Bin 64577 -> 0 bytes .../custom/res/drawable-sw600dp/background_main.webp | Bin 0 -> 17034 bytes .../res/drawable-sw600dp/ic_splash_background.png | Bin 86371 -> 0 bytes .../res/drawable-sw600dp/ic_splash_background.webp | Bin 0 -> 23410 bytes app/src/custom/res/drawable/background_drawer.png | Bin 41536 -> 0 bytes app/src/custom/res/drawable/background_drawer.webp | Bin 0 -> 16328 bytes app/src/custom/res/drawable/background_main.png | Bin 45747 -> 0 bytes app/src/custom/res/drawable/background_main.webp | Bin 0 -> 12894 bytes app/src/custom/res/drawable/ic_splash_background.png | Bin 74566 -> 0 bytes app/src/custom/res/drawable/ic_splash_background.webp | Bin 0 -> 21606 bytes app/src/custom/res/drawable/logo_square.png | Bin 6141 -> 0 bytes app/src/custom/res/drawable/logo_square.webp | Bin 0 -> 1042 bytes 20 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/src/custom/res/drawable-land/background_main.png create mode 100644 app/src/custom/res/drawable-land/background_main.webp delete mode 100644 app/src/custom/res/drawable-land/ic_splash_background.png create mode 100644 app/src/custom/res/drawable-land/ic_splash_background.webp delete mode 100644 app/src/custom/res/drawable-sw600dp-port/background_main.png create mode 100644 app/src/custom/res/drawable-sw600dp-port/background_main.webp delete mode 100644 app/src/custom/res/drawable-sw600dp-port/ic_splash_background.png create mode 100644 app/src/custom/res/drawable-sw600dp-port/ic_splash_background.webp delete mode 100644 app/src/custom/res/drawable-sw600dp/background_main.png create mode 100644 app/src/custom/res/drawable-sw600dp/background_main.webp delete mode 100644 app/src/custom/res/drawable-sw600dp/ic_splash_background.png create mode 100644 app/src/custom/res/drawable-sw600dp/ic_splash_background.webp delete mode 100644 app/src/custom/res/drawable/background_drawer.png create mode 100644 app/src/custom/res/drawable/background_drawer.webp delete mode 100644 app/src/custom/res/drawable/background_main.png create mode 100644 app/src/custom/res/drawable/background_main.webp delete mode 100644 app/src/custom/res/drawable/ic_splash_background.png create mode 100644 app/src/custom/res/drawable/ic_splash_background.webp delete mode 100644 app/src/custom/res/drawable/logo_square.png create mode 100644 app/src/custom/res/drawable/logo_square.webp (limited to 'app') diff --git a/app/src/custom/res/drawable-land/background_main.png b/app/src/custom/res/drawable-land/background_main.png deleted file mode 100644 index ce11f5b4..00000000 Binary files a/app/src/custom/res/drawable-land/background_main.png and /dev/null differ diff --git a/app/src/custom/res/drawable-land/background_main.webp b/app/src/custom/res/drawable-land/background_main.webp new file mode 100644 index 00000000..c28c2183 Binary files /dev/null and b/app/src/custom/res/drawable-land/background_main.webp differ diff --git a/app/src/custom/res/drawable-land/ic_splash_background.png b/app/src/custom/res/drawable-land/ic_splash_background.png deleted file mode 100644 index 09103e4b..00000000 Binary files a/app/src/custom/res/drawable-land/ic_splash_background.png and /dev/null differ diff --git a/app/src/custom/res/drawable-land/ic_splash_background.webp b/app/src/custom/res/drawable-land/ic_splash_background.webp new file mode 100644 index 00000000..f939c114 Binary files /dev/null and b/app/src/custom/res/drawable-land/ic_splash_background.webp differ diff --git a/app/src/custom/res/drawable-sw600dp-port/background_main.png b/app/src/custom/res/drawable-sw600dp-port/background_main.png deleted file mode 100644 index 23c7ffa6..00000000 Binary files a/app/src/custom/res/drawable-sw600dp-port/background_main.png and /dev/null differ diff --git a/app/src/custom/res/drawable-sw600dp-port/background_main.webp b/app/src/custom/res/drawable-sw600dp-port/background_main.webp new file mode 100644 index 00000000..6d23e9e1 Binary files /dev/null and b/app/src/custom/res/drawable-sw600dp-port/background_main.webp differ diff --git a/app/src/custom/res/drawable-sw600dp-port/ic_splash_background.png b/app/src/custom/res/drawable-sw600dp-port/ic_splash_background.png deleted file mode 100644 index c5abd96a..00000000 Binary files a/app/src/custom/res/drawable-sw600dp-port/ic_splash_background.png and /dev/null differ diff --git a/app/src/custom/res/drawable-sw600dp-port/ic_splash_background.webp b/app/src/custom/res/drawable-sw600dp-port/ic_splash_background.webp new file mode 100644 index 00000000..227fcb24 Binary files /dev/null and b/app/src/custom/res/drawable-sw600dp-port/ic_splash_background.webp differ diff --git a/app/src/custom/res/drawable-sw600dp/background_main.png b/app/src/custom/res/drawable-sw600dp/background_main.png deleted file mode 100644 index d11acde1..00000000 Binary files a/app/src/custom/res/drawable-sw600dp/background_main.png and /dev/null differ diff --git a/app/src/custom/res/drawable-sw600dp/background_main.webp b/app/src/custom/res/drawable-sw600dp/background_main.webp new file mode 100644 index 00000000..aa6b452b Binary files /dev/null and b/app/src/custom/res/drawable-sw600dp/background_main.webp differ diff --git a/app/src/custom/res/drawable-sw600dp/ic_splash_background.png b/app/src/custom/res/drawable-sw600dp/ic_splash_background.png deleted file mode 100644 index b3fb1f9c..00000000 Binary files a/app/src/custom/res/drawable-sw600dp/ic_splash_background.png and /dev/null differ diff --git a/app/src/custom/res/drawable-sw600dp/ic_splash_background.webp b/app/src/custom/res/drawable-sw600dp/ic_splash_background.webp new file mode 100644 index 00000000..f1a035ec Binary files /dev/null and b/app/src/custom/res/drawable-sw600dp/ic_splash_background.webp differ diff --git a/app/src/custom/res/drawable/background_drawer.png b/app/src/custom/res/drawable/background_drawer.png deleted file mode 100644 index ed138c42..00000000 Binary files a/app/src/custom/res/drawable/background_drawer.png and /dev/null differ diff --git a/app/src/custom/res/drawable/background_drawer.webp b/app/src/custom/res/drawable/background_drawer.webp new file mode 100644 index 00000000..8e0c4a6f Binary files /dev/null and b/app/src/custom/res/drawable/background_drawer.webp differ diff --git a/app/src/custom/res/drawable/background_main.png b/app/src/custom/res/drawable/background_main.png deleted file mode 100644 index 23c7ffa6..00000000 Binary files a/app/src/custom/res/drawable/background_main.png and /dev/null differ diff --git a/app/src/custom/res/drawable/background_main.webp b/app/src/custom/res/drawable/background_main.webp new file mode 100644 index 00000000..6d23e9e1 Binary files /dev/null and b/app/src/custom/res/drawable/background_main.webp differ diff --git a/app/src/custom/res/drawable/ic_splash_background.png b/app/src/custom/res/drawable/ic_splash_background.png deleted file mode 100644 index c5abd96a..00000000 Binary files a/app/src/custom/res/drawable/ic_splash_background.png and /dev/null differ diff --git a/app/src/custom/res/drawable/ic_splash_background.webp b/app/src/custom/res/drawable/ic_splash_background.webp new file mode 100644 index 00000000..227fcb24 Binary files /dev/null and b/app/src/custom/res/drawable/ic_splash_background.webp differ diff --git a/app/src/custom/res/drawable/logo_square.png b/app/src/custom/res/drawable/logo_square.png deleted file mode 100644 index d20cedd5..00000000 Binary files a/app/src/custom/res/drawable/logo_square.png and /dev/null differ diff --git a/app/src/custom/res/drawable/logo_square.webp b/app/src/custom/res/drawable/logo_square.webp new file mode 100644 index 00000000..cd3ad9d0 Binary files /dev/null and b/app/src/custom/res/drawable/logo_square.webp differ -- cgit v1.2.3 From dde51373bb08a7a13aca50259f533fbd85cef53d Mon Sep 17 00:00:00 2001 From: cyberta Date: Tue, 26 Nov 2019 03:33:50 +0100 Subject: remove unrelated abi specific assets in split apk builds --- app/build.gradle | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle index 988b0a31..1a4e7632 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -60,7 +60,7 @@ android { flavorDimensions "branding", "implementation", "abi" productFlavors { productFlavors.all { - ext.appName = null; + ext.appName = null ext.splitApk = false } production { @@ -125,6 +125,7 @@ android { dimension "abi" ext { abiVersionCode = 0 + abiFilter = "" } } @@ -135,6 +136,7 @@ android { } ext { abiVersionCode = 1 + abiFilter = "x86" } } @@ -145,6 +147,7 @@ android { } ext { abiVersionCode = 2 + abiFilter = "armeabi-v7a" } } @@ -155,6 +158,7 @@ android { } ext { abiVersionCode = 3 + abiFilter = "x86_64" } } @@ -165,6 +169,7 @@ android { } ext { abiVersionCode = 4 + abiFilter = "arm64-v8a" } } } @@ -333,6 +338,19 @@ android.applicationVariants.all { variant -> output.versionCodeOverride = android.defaultConfig.versionCode * 1000 + abiDimension.abiVersionCode } } + + // remove unrelated abi specific assets + variant.mergeAssets.doLast { + // if not a fat build + if (abiDimension.abiVersionCode > 0) { + def filesToDelete = fileTree(dir: variant.mergeAssets.outputDir, excludes: ["*pie_openvpn.${abiDimension.abiFilter}", + 'urls/', + '*.url', + '*.json', + '*.pem']) + delete(filesToDelete) + } + } } -- cgit v1.2.3 From 3c9adb1b45fb547763b4a2102e4c810e81b25164 Mon Sep 17 00:00:00 2001 From: cyberta Date: Fri, 29 Nov 2019 12:10:19 +0100 Subject: configure apk file name depending on flavor and build type --- app/build.gradle | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle index 1a4e7632..31e00ffb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,5 @@ import java.util.regex.Matcher import java.util.regex.Pattern -import groovy.util.* apply plugin: 'com.android.application' @@ -322,21 +321,33 @@ dependencies { } android.applicationVariants.all { variant -> - - // configure app name for different build variants + // configure app name and apk file name for different build variants def flavors = variant.productFlavors // flavorDimensions "branding" -> 0, "implementation" -> 1, "abi" -> 2 def branding = flavors[0] def abiDimension = flavors[2] + def abiFilter = abiDimension.abiFilter + if (abiFilter.length() > 0) { + abiFilter = "_"+abiFilter + } def buildType = variant.buildType + def tag = getTag() + if (tag.length() > 0) { + tag = "_"+tag + } + variant.resValue "string", "app_name", "\"${branding.appName}${buildType.appSuffix}\"" + variant.outputs.all { output -> + output.outputFileName = "${branding.appName}${abiFilter}_${buildType.name}${tag}.apk" + } + // reconfigure version codes for split builds variant.outputs.each { output -> - // if not a fat build - if (abiDimension.abiVersionCode > 0) { - output.versionCodeOverride = android.defaultConfig.versionCode * 1000 + abiDimension.abiVersionCode - } + // if not a fat build + if (abiDimension.abiVersionCode > 0) { + output.versionCodeOverride = android.defaultConfig.versionCode * 1000 + abiDimension.abiVersionCode + } } // remove unrelated abi specific assets @@ -475,7 +486,7 @@ def removeDuplicatedStrings() { def replaceDuplicatesForSource(File it, String type) { def ics_openvpn_file = file(it.absolutePath.replace(type+'.xml', type+'-icsopenvpn.xml')) if(ics_openvpn_file.exists()) { - def ics_openvpn_strings_names = (new XmlParser()).parse(ics_openvpn_file) + def ics_openvpn_strings_names = new XmlParser().parse(ics_openvpn_file) def current_file = it ics_openvpn_strings_names.string.each { @@ -522,11 +533,11 @@ task mergeUntranslatable(dependsOn: 'copyIcsOpenVPNFiles', type: Copy ) { task copyIcsOpenVPNFiles(dependsOn: 'updateIcsOpenVpn') { println "copyIcsOpenVPNFiles" -/* copyIcsOpenVPNClasses + copyIcsOpenVPNClasses copyIcsOpenVPNXml copyIcsOpenVPNImages //mergeUntranslatable.execute() - removeDuplicatedStrings()*/ + removeDuplicatedStrings() } task updateIcsOpenVpn( type: Exec ) { @@ -535,6 +546,11 @@ task updateIcsOpenVpn( type: Exec ) { } +def getTag() { + String commit = "git log --pretty=format:'%h' -n 1".execute().text.trim().replaceAll("'", "") + return ("git describe --tags --exact-match "+ commit).execute().text.trim() +} + task cleanNative( type: Delete ) { def shouldClean = getCurrentFlavorForBetaOrRelease() == "production" @@ -572,4 +588,4 @@ def getCurrentFlavorForBetaOrRelease() { { return ""; } -} \ No newline at end of file +} -- cgit v1.2.3 From 5abafe7b6e1e4eee7b6c9a238e7e0358f20cb52b Mon Sep 17 00:00:00 2001 From: cyberta Date: Wed, 4 Dec 2019 00:49:51 +0100 Subject: avoid apk file name with spaces --- app/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle index 31e00ffb..932fa75c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -325,6 +325,7 @@ android.applicationVariants.all { variant -> def flavors = variant.productFlavors // flavorDimensions "branding" -> 0, "implementation" -> 1, "abi" -> 2 def branding = flavors[0] + def trimmedAppName = branding.appName.replaceAll(' ', '') def abiDimension = flavors[2] def abiFilter = abiDimension.abiFilter if (abiFilter.length() > 0) { @@ -339,7 +340,7 @@ android.applicationVariants.all { variant -> variant.resValue "string", "app_name", "\"${branding.appName}${buildType.appSuffix}\"" variant.outputs.all { output -> - output.outputFileName = "${branding.appName}${abiFilter}_${buildType.name}${tag}.apk" + output.outputFileName = "${trimmedAppName}${abiFilter}_${buildType.name}${tag}.apk" } // reconfigure version codes for split builds -- cgit v1.2.3 From 5811f80f7b4a6e8dbc5eef53cc02d2ecb13e8c5f Mon Sep 17 00:00:00 2001 From: cyBerta Date: Wed, 11 Dec 2019 23:41:20 +0100 Subject: wrap dialogs in try catch clause for now --- .../java/se/leap/bitmaskclient/EipFragment.java | 37 ++++++++++++++-------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'app') diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java index 0485e907..a6f8040f 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java @@ -324,13 +324,17 @@ public class EipFragment extends Fragment implements Observer { return; } - AlertDialog.Builder alertBuilder = new AlertDialog.Builder(getActivity()); - showPendingStartCancellation = true; - alertDialog = alertBuilder.setTitle(activity.getString(R.string.eip_cancel_connect_title)) - .setMessage(activity.getString(R.string.eip_cancel_connect_text)) - .setPositiveButton((android.R.string.yes), (dialog, which) -> stopEipIfPossible()) - .setNegativeButton(activity.getString(android.R.string.no), (dialog, which) -> { - }).setOnDismissListener(dialog -> showPendingStartCancellation = false).show(); + try { + AlertDialog.Builder alertBuilder = new AlertDialog.Builder(getActivity()); + showPendingStartCancellation = true; + alertDialog = alertBuilder.setTitle(activity.getString(R.string.eip_cancel_connect_title)) + .setMessage(activity.getString(R.string.eip_cancel_connect_text)) + .setPositiveButton((android.R.string.yes), (dialog, which) -> stopEipIfPossible()) + .setNegativeButton(activity.getString(android.R.string.no), (dialog, which) -> { + }).setOnDismissListener(dialog -> showPendingStartCancellation = false).show(); + } catch (IllegalStateException e) { + e.printStackTrace(); + } } @@ -340,13 +344,18 @@ public class EipFragment extends Fragment implements Observer { Log.e(TAG, "activity is null when asking to stop EIP"); return; } - AlertDialog.Builder alertBuilder = new AlertDialog.Builder(activity); - showAskToStopEip = true; - alertDialog = alertBuilder.setTitle(activity.getString(R.string.eip_cancel_connect_title)) - .setMessage(activity.getString(R.string.eip_warning_browser_inconsistency)) - .setPositiveButton((android.R.string.yes), (dialog, which) -> stopEipIfPossible()) - .setNegativeButton(activity.getString(android.R.string.no), (dialog, which) -> { - }).setOnDismissListener(dialog -> showAskToStopEip = false).show(); + try { + AlertDialog.Builder alertBuilder = new AlertDialog.Builder(activity); + showAskToStopEip = true; + alertDialog = alertBuilder.setTitle(activity.getString(R.string.eip_cancel_connect_title)) + .setMessage(activity.getString(R.string.eip_warning_browser_inconsistency)) + .setPositiveButton((android.R.string.yes), (dialog, which) -> stopEipIfPossible()) + .setNegativeButton(activity.getString(android.R.string.no), (dialog, which) -> { + }).setOnDismissListener(dialog -> showAskToStopEip = false).show(); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } @Override -- cgit v1.2.3 From 938f54ffd546fb8372e65edfd5a4de0c6ca9a569 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 12 Dec 2019 00:18:55 +0100 Subject: revert minifying sources for now --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle index 932fa75c..0726cca8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -181,8 +181,8 @@ android { //runProguard true if(signingConfigs.contains(release)) signingConfig signingConfigs.release.isSigningReady() ? signingConfigs.release : signingConfigs.debug - minifyEnabled = true - shrinkResources true + //minifyEnabled = true + //shrinkResources true } beta { initWith release -- cgit v1.2.3