This commit is contained in:
parent
a81053de21
commit
7a064c9759
@ -2,11 +2,11 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'net.crystalyx.setaswallpaper'
|
namespace 'net.crystalyx.setaswallpaper'
|
||||||
compileSdk 33
|
compileSdk 34
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "net.crystalyx.setaswallpaper"
|
applicationId "net.crystalyx.setaswallpaper"
|
||||||
minSdkVersion 5
|
minSdkVersion 5
|
||||||
targetSdkVersion 33
|
targetSdkVersion 34
|
||||||
versionCode 11
|
versionCode 11
|
||||||
versionName "3.4"
|
versionName "3.4"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="net.crystalyx.setaswallpaper">
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.SET_WALLPAPER" />
|
<uses-permission android:name="android.permission.SET_WALLPAPER" />
|
||||||
|
@ -11,7 +11,7 @@ import android.os.Bundle;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.MalformedURLException;
|
import java.net.URI;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
public class SetWallpaperActivity extends Activity {
|
public class SetWallpaperActivity extends Activity {
|
||||||
@ -45,8 +45,8 @@ public class SetWallpaperActivity extends Activity {
|
|||||||
URL url;
|
URL url;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
url = new URL(textUrl);
|
url = new URI(textUrl).toURL();
|
||||||
} catch (MalformedURLException e) {
|
} catch (Exception e) {
|
||||||
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user