summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2019-11-10 17:03:33 +0100
committerMichael W <baddaemon87@gmail.com>2019-11-10 17:13:57 +0100
commit5ef1d7f911e122f3154f814f3005ecafe450b990 (patch)
treee3710258a217259de6f95cfd5602f9a71ca54175
parent02b6e99102f0e6385557c04d7741c47372d820ea (diff)
downloadandroid_packages_apps_Snap-5ef1d7f911e122f3154f814f3005ecafe450b990.zip
android_packages_apps_Snap-5ef1d7f911e122f3154f814f3005ecafe450b990.tar.gz
android_packages_apps_Snap-5ef1d7f911e122f3154f814f3005ecafe450b990.tar.bz2
Snap: Don't spam exceptions
* When these fields don't exist, you get a lot of NoSuchFieldException stacktraces * Only do so when DEBUG is set, don't spam others Change-Id: I24261be15b2970fc3626f54eb309a10b0d003ff8
-rw-r--r--src_wrapper/org/codeaurora/snapcam/wrapper/Wrapper.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src_wrapper/org/codeaurora/snapcam/wrapper/Wrapper.java b/src_wrapper/org/codeaurora/snapcam/wrapper/Wrapper.java
index f20bcf5..0824ced 100644
--- a/src_wrapper/org/codeaurora/snapcam/wrapper/Wrapper.java
+++ b/src_wrapper/org/codeaurora/snapcam/wrapper/Wrapper.java
@@ -48,7 +48,7 @@ public class Wrapper{
try {
value = (int) field.get(null);
}catch (Exception exception){
- exception.printStackTrace();
+ if (DEBUG) exception.printStackTrace();
}
}
return value;
@@ -60,7 +60,7 @@ public class Wrapper{
try {
value = (String) field.get(null);
}catch (Exception exception){
- exception.printStackTrace();
+ if (DEBUG) exception.printStackTrace();
}
}
return value;
@@ -77,7 +77,7 @@ public class Wrapper{
field = classInstance.getField(name);
Log.d(TAG, "getField:" + classInstance + " " + name);
}catch (Exception exception){
- exception.printStackTrace();
+ if (DEBUG) exception.printStackTrace();
}
return field;
}