summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Grover <joeygrover@gmail.com>2021-02-04 14:46:34 -0500
committerJoey Grover <joeygrover@gmail.com>2021-02-04 14:46:34 -0500
commit00b417c77721dd708d4bd744372b812e16a7b4c3 (patch)
tree2500e8e20979b64187942dc354bf91d1ab12e64b
parentf4c217a8352a3c77e6071690f0329fc7b876b373 (diff)
downloadsdl_android-bugfix/issue_1615.tar.gz
Revert API to 29 and refactor to supportbugfix/issue_1615
The CI has issues dealing with API 30 right now. The code was updated to handle API 29 as a compile version for now.
-rw-r--r--.github/workflows/android.yml2
-rw-r--r--android/sdl_android/build.gradle2
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/util/IntegrationValidator.java9
3 files changed, 8 insertions, 5 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index 1752a0cbf..721ac4915 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -21,7 +21,7 @@ jobs:
# For more info, please check out: https://github.com/marketplace/actions/android-emulator-runner
uses: reactivecircus/android-emulator-runner@v2
with:
- api-level: 30
+ api-level: 29
script: ./android/gradlew -p ./android :sdl_android:connectedCheck
- name: Hello Sdl Android Tests
diff --git a/android/sdl_android/build.gradle b/android/sdl_android/build.gradle
index 83921c7ff..378273a7a 100644
--- a/android/sdl_android/build.gradle
+++ b/android/sdl_android/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
android {
- compileSdkVersion 30
+ compileSdkVersion 29
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/util/IntegrationValidator.java b/android/sdl_android/src/main/java/com/smartdevicelink/util/IntegrationValidator.java
index 93cbdcf78..44e6bca2f 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/util/IntegrationValidator.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/util/IntegrationValidator.java
@@ -52,6 +52,9 @@ public class IntegrationValidator {
private static final char CHECK_MARK = 0x2713;
private static final char FAIL_MARK = 0x2715;
+ //FIXME When the CI is stable with API 30 use Manifest.permission.QUERY_ALL_PACKAGES instead
+ private static final String QUERY_ALL_PACKAGES = "android.permission.QUERY_ALL_PACKAGES";
+
public static final int FLAG_SKIP_ROUTER_SERVICE_CHECK = 0x01;
@@ -76,7 +79,7 @@ public class IntegrationValidator {
}
}
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R || permissionResults.successful) {
+ if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q || permissionResults.successful) {
//This is done so that we don't provide incorrect information regarding Android 11
//and the required new permission that causes the broadcast receiver check to fail.
results.add(checkBroadcastReceiver(context));
@@ -114,8 +117,8 @@ public class IntegrationValidator {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
permissionList.add(Manifest.permission.FOREGROUND_SERVICE);
}
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
- permissionList.add(Manifest.permission.QUERY_ALL_PACKAGES);
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
+ permissionList.add(QUERY_ALL_PACKAGES);
}
try {
PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getApplicationContext().getPackageName(), PackageManager.GET_PERMISSIONS);