aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-07-24 21:59:11 +0200
committerSamuel Tardieu <sam@rfc1149.net>2014-07-24 21:59:11 +0200
commit9f90071b676caa441b8e63713dc2eb6010772ca0 (patch)
tree245260d51872dfe70ac14dc3bd310f617333a546
parent8c6bd64cdc405ba9966a816d498734a4544bdaa7 (diff)
downloadcgeo-9f90071b676caa441b8e63713dc2eb6010772ca0.zip
cgeo-9f90071b676caa441b8e63713dc2eb6010772ca0.tar.gz
cgeo-9f90071b676caa441b8e63713dc2eb6010772ca0.tar.bz2
Do not use Java 7 ReflectiveOperationException
It is not supported by Android <= 4.3.
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java b/main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java
index 74f568f..229150e 100644
--- a/main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java
+++ b/main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java
@@ -10,6 +10,7 @@ import android.view.View;
import android.widget.TextView;
import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
@@ -38,7 +39,9 @@ public class CustomProgressDialog extends ProgressDialog {
method.invoke(textView, View.GONE);
}
}
- } catch (final ReflectiveOperationException e) {
+ } catch (final NoSuchMethodException e) {
+ Log.e("Failed to find the progressDialog method 'setVisibility'.", e);
+ } catch (final IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
Log.e("Failed to invoke the progressDialog method 'setVisibility' and set 'mProgressNumber' to GONE.", e);
}
}