Skip to content

Commit a28fe23

Browse files
authored
Merge pull request #1017 from wordpress-mobile/build/update-min-sdk-version-to-24
Update `minSdkVersion` (from `21` to `24`)
2 parents b3b8092 + 1e717df commit a28fe23

File tree

75 files changed

+119
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+119
-193
lines changed

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion 28
7+
compileSdkVersion rootProject.compileSdkVersion
88

99
defaultConfig {
1010
applicationId "org.wordpress.aztec"
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionCode 1
1414
versionName "1.0"
1515
vectorDrawables.useSupportLibrary = true

app/src/main/res/drawable/ic_action_redo_selector.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

3-
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
4-
xmlns:tools="http://schemas.android.com/tools"
5-
tools:targetApi="lollipop">
3+
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
64

75
<item android:drawable="@drawable/ic_action_redo_white_30_24dp" android:state_enabled="false" />
86
<item android:drawable="@drawable/ic_action_redo_white_24dp" />

app/src/main/res/drawable/ic_action_undo_selector.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

3-
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
4-
xmlns:tools="http://schemas.android.com/tools"
5-
tools:targetApi="lollipop">
3+
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
64

75
<item android:drawable="@drawable/ic_action_undo_white_30_24dp" android:state_enabled="false" />
86
<item android:drawable="@drawable/ic_action_undo_white_24dp" />

app/src/main/res/drawable/media_bar_button_camera_selector.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
tools:targetApi="lollipop">
2+
3+
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
54

65
<item android:drawable="@drawable/media_bar_button_camera_disabled" android:state_enabled="false"/>
76
<item android:drawable="@drawable/media_bar_button_camera_highlighted" android:state_focused="true"/>

app/src/main/res/drawable/media_bar_button_image_multiple_selector.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
tools:targetApi="lollipop">
2+
3+
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
54

65
<item android:drawable="@drawable/media_bar_button_image_multiple_disabled" android:state_enabled="false"/>
76
<item android:drawable="@drawable/media_bar_button_image_multiple_highlighted" android:state_focused="true"/>

aztec/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ plugins {
55
}
66

77
android {
8-
compileSdkVersion 28
8+
compileSdkVersion rootProject.compileSdkVersion
99

1010
defaultConfig {
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionName "1.0"
1414
vectorDrawables.useSupportLibrary = true
1515
}

aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
18221822
// Android 7 Ref: https://github.com/wordpress-mobile/WordPress-Android/issues/10872
18231823
// Android 8 Ref: https://github.com/wordpress-mobile/WordPress-Android/issues/8827
18241824
clipboardIdentifier -> {
1825-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && Build.VERSION.SDK_INT < Build.VERSION_CODES.P
1825+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P
18261826
&& Build.MANUFACTURER.lowercase(Locale.getDefault()).equals("samsung")) {
18271827
// Nope return true
18281828
Toast.makeText(context, context.getString(R.string.samsung_disabled_custom_clipboard, Build.VERSION.RELEASE), Toast.LENGTH_LONG).show()

aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,7 @@ class BlockFormatter(editor: AztecText,
11081108
}
11091109
}
11101110

1111+
@Suppress("UNUSED_PARAMETER")
11111112
fun containsPreformat(selStart: Int = selectionStart, selEnd: Int = selectionEnd): Boolean {
11121113
val lines = TextUtils.split(editableText.toString(), "\n")
11131114
val list = ArrayList<Int>()

aztec/src/main/kotlin/org/wordpress/aztec/util/ColorConverter.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package org.wordpress.aztec.util
22

33
import android.content.res.Resources
44
import android.graphics.Color
5-
import android.os.Build
65
import android.text.TextUtils
76
import androidx.annotation.ColorInt
87
import org.wordpress.aztec.util.ColorConverter.Companion.COLOR_NOT_FOUND
@@ -209,19 +208,14 @@ class ColorConverter {
209208
* cannot be translated.
210209
*/
211210
@ColorInt
212-
@Suppress("DEPRECATION")
213211
fun getColorInt(colorText: String): Int {
214212
try {
215213
if (isColorResource(colorText)) {
216214
val res = Resources.getSystem()
217215
val name = colorText.substring(1)
218216
val colorRes = res.getIdentifier(name, "color", "android")
219217
if (colorRes != 0) {
220-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
221-
return res.getColor(colorRes)
222-
} else {
223-
return res.getColor(colorRes, null)
224-
}
218+
return res.getColor(colorRes, null)
225219
}
226220
}
227221
//

aztec/src/main/res/drawable/format_bar_button_align_center_selector.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

3-
<animated-selector xmlns:tools="http://schemas.android.com/tools"
4-
xmlns:android="http://schemas.android.com/apk/res/android"
5-
tools:targetApi="lollipop">
3+
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
64

75
<item android:drawable="@drawable/format_bar_button_align_center_disabled" android:state_enabled="false" />
86
<item android:drawable="@drawable/format_bar_button_align_center_highlighted" android:state_checked="true" />

0 commit comments

Comments
 (0)