Skip to content

Commit bc2b41b

Browse files
authored
Merge pull request #110 from wordpress-mobile/issue/109-update-targetsdkversion-and-compilesdkversion-to-31
Updates: compile sdk version and target sdk version to 31 for Android 12 migration
2 parents 68e2995 + 13b4f06 commit bc2b41b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

WordPressUtils/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ dependencies {
2626
testImplementation 'junit:junit:4.12'
2727
testImplementation 'org.assertj:assertj-core:3.11.1'
2828
testImplementation "org.robolectric:robolectric:4.4"
29-
testImplementation 'androidx.test:core:1.0.0'
29+
testImplementation 'androidx.test:core:1.4.0'
3030

3131
lintChecks 'org.wordpress:lint:1.1.0'
32-
androidTestImplementation 'androidx.test:runner:1.1.0'
33-
androidTestImplementation 'androidx.test:rules:1.1.0'
34-
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
32+
androidTestImplementation 'androidx.test:runner:1.4.0'
33+
androidTestImplementation 'androidx.test:rules:1.4.0'
34+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
3535
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
3636

3737
}
3838

3939
android {
4040
useLibrary 'org.apache.http.legacy'
4141

42-
compileSdkVersion 30
42+
compileSdkVersion 31
4343

4444
defaultConfig {
4545
minSdkVersion 21
46-
targetSdkVersion 30
46+
targetSdkVersion 31
4747

4848
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4949
}

WordPressUtils/src/main/java/org/wordpress/android/util/ImageUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static int getImageOrientation(Context ctx, String filePath) {
100100
.query(curStream, new String[]{MediaStore.Images.Media.ORIENTATION}, null, null, null);
101101
if (cur != null) {
102102
if (cur.moveToFirst()) {
103-
orientation = cur.getInt(cur.getColumnIndex(MediaStore.Images.Media.ORIENTATION));
103+
orientation = cur.getInt(cur.getColumnIndexOrThrow(MediaStore.Images.Media.ORIENTATION));
104104
}
105105
cur.close();
106106
}

0 commit comments

Comments
 (0)