Replaced reflection method getConstructor with getDeclaredConstructor

(Was not functioning on a sony phone with Android version 5.1.1.)
This commit is contained in:
Olga Miller 2017-01-06 11:36:00 +01:00
parent eefa55bb6d
commit c14af42222

View file

@ -56,7 +56,7 @@ public final class ModeFactory {
if (bitmap.getWidth() == size.width() && bitmap.getHeight() == size.height()) { if (bitmap.getWidth() == size.width() && bitmap.getHeight() == size.height()) {
try { try {
Constructor constructor = modeClass.getConstructor(Bitmap.class, IOutput.class); Constructor constructor = modeClass.getDeclaredConstructor(Bitmap.class, IOutput.class);
mode = (Mode) constructor.newInstance(bitmap, output); mode = (Mode) constructor.newInstance(bitmap, output);
} catch (Exception ignore) { } catch (Exception ignore) {
} }