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/src') 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 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/src') 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