From 363d41ed1d4910fa5b8651d3bd95d1c61bc0352c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Tue, 3 Mar 2015 00:26:15 +0100 Subject: Cleanup of contact sync, debugging --- .../keychain/KeychainApplication.java | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java') 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) { + } } } } -- cgit v1.2.3