aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-03-03 00:26:15 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2015-03-03 00:26:15 +0100
commit363d41ed1d4910fa5b8651d3bd95d1c61bc0352c (patch)
treee8433e784d71656a9aa0e3cc8e110be6cd8008eb /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
parentea24b5169e1d9e7b866252a464aaa43481e3e2fd (diff)
downloadopen-keychain-363d41ed1d4910fa5b8651d3bd95d1c61bc0352c.tar.gz
open-keychain-363d41ed1d4910fa5b8651d3bd95d1c61bc0352c.tar.bz2
open-keychain-363d41ed1d4910fa5b8651d3bd95d1c61bc0352c.zip
Cleanup of contact sync, debugging
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java30
1 files changed, 16 insertions, 14 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
index 01f6735ea..a4dc12a37 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
@@ -140,20 +140,22 @@ public class KeychainApplication extends Application {
}
static void brandGlowEffect(Context context, int brandColor) {
- try {
- // terrible hack to brand the edge overscroll glow effect
- // https://gist.github.com/menny/7878762#file-brandgloweffect_full-java
-
- //glow
- int glowDrawableId = context.getResources().getIdentifier("overscroll_glow", "drawable", "android");
- Drawable androidGlow = context.getResources().getDrawable(glowDrawableId);
- androidGlow.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN);
- //edge
- int edgeDrawableId = context.getResources().getIdentifier("overscroll_edge", "drawable", "android");
- Drawable androidEdge = context.getResources().getDrawable(edgeDrawableId);
- androidEdge.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN);
- } catch (Resources.NotFoundException e) {
- // no hack on Android 5
+ // no hack on Android 5
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
+ try {
+ // terrible hack to brand the edge overscroll glow effect
+ // https://gist.github.com/menny/7878762#file-brandgloweffect_full-java
+
+ //glow
+ int glowDrawableId = context.getResources().getIdentifier("overscroll_glow", "drawable", "android");
+ Drawable androidGlow = context.getResources().getDrawable(glowDrawableId);
+ androidGlow.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN);
+ //edge
+ int edgeDrawableId = context.getResources().getIdentifier("overscroll_edge", "drawable", "android");
+ Drawable androidEdge = context.getResources().getDrawable(edgeDrawableId);
+ androidEdge.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN);
+ } catch (Resources.NotFoundException e) {
+ }
}
}
}