Loading app/build.gradle +5 −9 Original line number Diff line number Diff line Loading @@ -33,8 +33,8 @@ android { } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } lint { disable 'GoogleAppIndexingWarning', 'MissingTranslation', 'NotificationIconCompatibility' Loading @@ -44,12 +44,8 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.5.1' implementation('androidx.preference:preference:1.2.0') { // workaround for appcompat:1.5.1 exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel' exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel-ktx' } implementation 'androidx.exifinterface:exifinterface:1.3.4' implementation 'androidx.appcompat:appcompat:1.6.0' implementation 'androidx.preference:preference:1.2.0' implementation 'androidx.exifinterface:exifinterface:1.3.5' testImplementation 'junit:junit:4.13.2' } app/src/main/java/net/fabiszewski/ulogger/AutoNamePreference.java +10 −10 Original line number Diff line number Diff line Loading @@ -32,16 +32,16 @@ class AutoNamePreference extends TrimmedEditTextPreference { private static final Pattern PATTERN = Pattern.compile("%[%ymdHMS]|'"); private static final Map<String, String> PLACEHOLDERS; static { Map<String, String> map = new HashMap<>(); map.put("%%", "%"); map.put("%y", "yyyy"); map.put("%m", "MM"); map.put("%d", "dd"); map.put("%H", "HH"); map.put("%M", "mm"); map.put("%S", "ss"); map.put("'", "''"); PLACEHOLDERS = Collections.unmodifiableMap(map); PLACEHOLDERS = Map.of( "%%", "%", "%y", "yyyy", "%m", "MM", "%d", "dd", "%H", "HH", "%M", "mm", "%S", "ss", "'", "''" ); } public AutoNamePreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { Loading Loading
app/build.gradle +5 −9 Original line number Diff line number Diff line Loading @@ -33,8 +33,8 @@ android { } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } lint { disable 'GoogleAppIndexingWarning', 'MissingTranslation', 'NotificationIconCompatibility' Loading @@ -44,12 +44,8 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.5.1' implementation('androidx.preference:preference:1.2.0') { // workaround for appcompat:1.5.1 exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel' exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel-ktx' } implementation 'androidx.exifinterface:exifinterface:1.3.4' implementation 'androidx.appcompat:appcompat:1.6.0' implementation 'androidx.preference:preference:1.2.0' implementation 'androidx.exifinterface:exifinterface:1.3.5' testImplementation 'junit:junit:4.13.2' }
app/src/main/java/net/fabiszewski/ulogger/AutoNamePreference.java +10 −10 Original line number Diff line number Diff line Loading @@ -32,16 +32,16 @@ class AutoNamePreference extends TrimmedEditTextPreference { private static final Pattern PATTERN = Pattern.compile("%[%ymdHMS]|'"); private static final Map<String, String> PLACEHOLDERS; static { Map<String, String> map = new HashMap<>(); map.put("%%", "%"); map.put("%y", "yyyy"); map.put("%m", "MM"); map.put("%d", "dd"); map.put("%H", "HH"); map.put("%M", "mm"); map.put("%S", "ss"); map.put("'", "''"); PLACEHOLDERS = Collections.unmodifiableMap(map); PLACEHOLDERS = Map.of( "%%", "%", "%y", "yyyy", "%m", "MM", "%d", "dd", "%H", "HH", "%M", "mm", "%S", "ss", "'", "''" ); } public AutoNamePreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { Loading