Browse Source

Update to latest Android SDK

pull/7386/head
Anders Jenbo 2 years ago
parent
commit
449285a585
  1. 6
      android-project/app/build.gradle
  2. 8
      android-project/app/src/main/java/org/diasurgical/devilutionx/DataActivity.java
  3. 2
      android-project/build.gradle

6
android-project/app/build.gradle

@ -8,14 +8,14 @@ if (buildAsApplication) {
android {
ndkVersion '26.1.10909125'
compileSdk 33
compileSdk 35
defaultConfig {
if (buildAsApplication) {
applicationId "org.diasurgical.devilutionx"
}
minSdkVersion 21
targetSdkVersion 33
versionCode 28
targetSdkVersion 35
versionCode 29
versionName project.file('../../VERSION').text.trim()
externalNativeBuild {
cmake {

8
android-project/app/src/main/java/org/diasurgical/devilutionx/DataActivity.java

@ -9,6 +9,7 @@ import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.text.method.LinkMovementMethod;
@ -158,7 +159,12 @@ public class DataActivity extends Activity {
if (mReceiver == null) {
mReceiver = new DownloadReceiver();
registerReceiver(mReceiver, new IntentFilter("android.intent.action.DOWNLOAD_COMPLETE"));
IntentFilter filter = new IntentFilter("android.intent.action.DOWNLOAD_COMPLETE");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(mReceiver, filter, Context.RECEIVER_EXPORTED);
} else {
registerReceiver(mReceiver, filter);
}
}
DownloadManager downloadManager = (DownloadManager)this.getSystemService(Context.DOWNLOAD_SERVICE);

2
android-project/build.gradle

@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.android.tools.build:gradle:8.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

Loading…
Cancel
Save