Use SDK 33
This commit is contained in:
parent
0e71b36361
commit
a1260ae536
@ -3,16 +3,15 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
namespace "net.crystalyx.setaswallpaper"
|
namespace "net.crystalyx.setaswallpaper"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "net.crystalyx.setaswallpaper"
|
applicationId "net.crystalyx.setaswallpaper"
|
||||||
minSdk 5
|
minSdk 5
|
||||||
//noinspection OldTargetApi
|
targetSdkVersion 33
|
||||||
targetSdkVersion 32
|
versionCode 10
|
||||||
versionCode 9
|
versionName "3.3"
|
||||||
versionName "3.2"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@ -41,3 +40,7 @@ android {
|
|||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.deprecation = true
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ import android.content.Intent;
|
|||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -26,11 +27,20 @@ public class SetWallpaperActivity extends Activity {
|
|||||||
if ("text/plain".equals(type)) {
|
if ("text/plain".equals(type)) {
|
||||||
handleUrl(intent.getStringExtra(Intent.EXTRA_TEXT));
|
handleUrl(intent.getStringExtra(Intent.EXTRA_TEXT));
|
||||||
} else if (type.startsWith("image/")) {
|
} else if (type.startsWith("image/")) {
|
||||||
handleStream(intent.getParcelableExtra(Intent.EXTRA_STREAM));
|
handleStream(getParcelableExtraStream(intent));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
private Uri getParcelableExtraStream(Intent intent) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
return intent.getParcelableExtra(Intent.EXTRA_STREAM, Uri.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
return intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||||
|
}
|
||||||
|
|
||||||
private void handleUrl(String textUrl) {
|
private void handleUrl(String textUrl) {
|
||||||
URL url;
|
URL url;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
|
Loading…
Reference in New Issue
Block a user