From a2f56e726a6e642f4a65f5d513d451f0e40944cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Eisfeld?= Date: Mon, 8 Apr 2019 15:24:52 +0200 Subject: [PATCH] Use bigger resolution in case of high memory class >= 512 --- .../de/jeisfeld/augendiagnoselib/util/PreferenceUtil.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AugendiagnoseIdea/augendiagnoseLib/src/main/java/de/jeisfeld/augendiagnoselib/util/PreferenceUtil.java b/AugendiagnoseIdea/augendiagnoseLib/src/main/java/de/jeisfeld/augendiagnoselib/util/PreferenceUtil.java index e44e4283..8712fd03 100644 --- a/AugendiagnoseIdea/augendiagnoseLib/src/main/java/de/jeisfeld/augendiagnoselib/util/PreferenceUtil.java +++ b/AugendiagnoseIdea/augendiagnoseLib/src/main/java/de/jeisfeld/augendiagnoselib/util/PreferenceUtil.java @@ -297,7 +297,7 @@ public static String getIndexedPreferenceKey(final int preferenceId, final int i * @return The index. */ public static Integer getIndexFromPreferenceKey(@NonNull final String key) { - String[] parts = key.split("\\[|\\]"); + String[] parts = key.split("[\\[]]"); if (parts.length < 2) { return null; } @@ -425,7 +425,10 @@ public static void setDefaultResolutionSettings() { if (maxBitmapSize == null || maxBitmapSize.length() == 0) { // Only if 512 MB are accessible, then full resolution image should be stored. int memoryClass = SystemUtil.getLargeMemoryClass(); - if (memoryClass >= 256) { // MAGIC_NUMBER + if (memoryClass >= 512) { // MAGIC_NUMBER + maxBitmapSize = "4096"; + } + else if (memoryClass >= 256) { // MAGIC_NUMBER maxBitmapSize = "2048"; } else {