summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-07-31 19:30:54 +0200
committercyBerta <cyberta@riseup.net>2021-11-14 19:44:25 +0100
commita2067cd5b56387405cb653de8940e7afc448449d (patch)
treed1310f3f693789bbf2289a5303594c792593f6dd /app/src/main/java/se/leap
parent1f8b9f9c65a60de9813c77344bdba0fa8153cb62 (diff)
Add BuildConfig to disable color filtering of the main screen background, if VPN is turned off. Make EipFragment's text colors customizable
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java25
1 files changed, 16 insertions, 9 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
index ef16d085..d8be1cc5 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
@@ -54,6 +54,7 @@ import de.blinkt.openvpn.core.ConnectionStatus;
import de.blinkt.openvpn.core.IOpenVPNServiceInternal;
import de.blinkt.openvpn.core.OpenVPNService;
import de.blinkt.openvpn.core.VpnStatus;
+import se.leap.bitmaskclient.BuildConfig;
import se.leap.bitmaskclient.R;
import se.leap.bitmaskclient.base.FragmentManagerEnhanced;
import se.leap.bitmaskclient.base.MainActivity;
@@ -552,21 +553,27 @@ public class EipFragment extends Fragment implements Observer {
}
private void greyscaleBackground() {
- ColorMatrix matrix = new ColorMatrix();
- matrix.setSaturation(0);
- ColorMatrixColorFilter cf = new ColorMatrixColorFilter(matrix);
- background.setColorFilter(cf);
- background.setImageAlpha(255);
+ if (BuildConfig.use_color_filter) {
+ ColorMatrix matrix = new ColorMatrix();
+ matrix.setSaturation(0);
+ ColorMatrixColorFilter cf = new ColorMatrixColorFilter(matrix);
+ background.setColorFilter(cf);
+ background.setImageAlpha(255);
+ }
}
private void colorBackgroundALittle() {
- background.setColorFilter(null);
- background.setImageAlpha(144);
+ if (BuildConfig.use_color_filter) {
+ background.setColorFilter(null);
+ background.setImageAlpha(144);
+ }
}
private void colorBackground() {
- background.setColorFilter(null);
- background.setImageAlpha(210);
+ if (BuildConfig.use_color_filter) {
+ background.setColorFilter(null);
+ background.setImageAlpha(210);
+ }
}
private void updateInvalidVpnCertificate() {