summaryrefslogtreecommitdiffstats
path: root/src_wrapper
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2019-11-10 17:03:33 +0100
committerHan Wang <416810799@qq.com>2019-11-14 05:53:51 +0200
commit29bccbb0a28ca24b39fb095ad00cdeb596728842 (patch)
treed297207b89af055c40aee6e754a06b7260381f6f /src_wrapper
parent8b25286e72f10369accb46e12ae454533c13df38 (diff)
downloadandroid_packages_apps_Snap-29bccbb0a28ca24b39fb095ad00cdeb596728842.zip
android_packages_apps_Snap-29bccbb0a28ca24b39fb095ad00cdeb596728842.tar.gz
android_packages_apps_Snap-29bccbb0a28ca24b39fb095ad00cdeb596728842.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
Diffstat (limited to 'src_wrapper')
-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;
}