diff --git a/build.gradle b/build.gradle
index 6ec1f25..e041d30 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,8 +14,8 @@ buildscript {
junitVersion = '4.13'
androidTestVersion = '1.2.0'
androidEspressoVersion = '3.2.0'
- versionCode = 5001199
- versionName = '6.2.1'
+ versionCode = 5001209
+ versionName = '6.3.0'
resConfigs = ['ar', 'es', 'fa', 'fr', 'ja', 'ko', 'ru', 'tr', 'zh-rCN', 'zh-rTW']
}
diff --git a/core/build.gradle b/core/build.gradle
index f8c122e..e572bd8 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -103,6 +103,7 @@ dependencies {
api "androidx.room:room-runtime:2.2.5"
kapt "androidx.room:room-compiler:2.2.5"
api "androidx.work:work-runtime-ktx:2.4.0"
+ implementation 'androidx.work:work-runtime:2.7.1'
api "androidx.work:work-gcm:2.4.0"
api 'com.google.firebase:firebase-analytics-ktx:19.0.0'
api 'com.google.firebase:firebase-config-ktx:21.0.0'
diff --git a/core/src/main/AndroidManifest.xml b/core/src/main/AndroidManifest.xml
index 088d36b..a2c78dc 100644
--- a/core/src/main/AndroidManifest.xml
+++ b/core/src/main/AndroidManifest.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/core/src/main/java/com/github/shadowsocks/Core.kt b/core/src/main/java/com/github/shadowsocks/Core.kt
index bd791f6..66ffcb9 100644
--- a/core/src/main/java/com/github/shadowsocks/Core.kt
+++ b/core/src/main/java/com/github/shadowsocks/Core.kt
@@ -186,7 +186,11 @@ object Core {
fun init(app: Application, configureClass: KClass) {
this.app = app
this.configureIntent = {
- PendingIntent.getActivity(it, 0, Intent(it, configureClass.java)
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
+ PendingIntent.getActivity(it, 0, Intent(it, configureClass.java)
+ .setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT), PendingIntent.FLAG_IMMUTABLE)
+ else
+ PendingIntent.getActivity(it, 0, Intent(it, configureClass.java)
.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT), 0)
}
@@ -213,9 +217,11 @@ object Core {
}
}
})
- val config:Configuration = Configuration.Builder().build()
- WorkManager.initialize(app.applicationContext, config)
- UpdateCheck.enqueue() //google play Publishing, prohibiting self-renewal
+/* if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
+ val config: Configuration = Configuration.Builder().build()
+ WorkManager.initialize(app.applicationContext, config)
+ UpdateCheck.enqueue() //google play Publishing, prohibiting self-renewal
+ }*/
// handle data restored/crash
if (Build.VERSION.SDK_INT >= 24 && DataStore.directBootAware &&
diff --git a/core/src/main/java/com/github/shadowsocks/bg/ServiceNotification.kt b/core/src/main/java/com/github/shadowsocks/bg/ServiceNotification.kt
index 8f91ec7..9f62391 100644
--- a/core/src/main/java/com/github/shadowsocks/bg/ServiceNotification.kt
+++ b/core/src/main/java/com/github/shadowsocks/bg/ServiceNotification.kt
@@ -82,10 +82,12 @@ class ServiceNotification(private val service: BaseService.Interface, profileNam
init {
service as Context
+ var intentFlad=0
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) intentFlad=PendingIntent.FLAG_IMMUTABLE
val closeAction = NotificationCompat.Action.Builder(
R.drawable.ic_navigation_close,
service.getText(R.string.stop),
- PendingIntent.getBroadcast(service, 0, Intent(Action.CLOSE).setPackage(service.packageName), 0)).apply {
+ PendingIntent.getBroadcast(service, 0, Intent(Action.CLOSE).setPackage(service.packageName), intentFlad)).apply {
setShowsUserInterface(false)
}.build()
if (Build.VERSION.SDK_INT < 24) builder.addAction(closeAction) else builder.addInvisibleAction(closeAction)
diff --git a/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt b/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt
index 861c181..61dc3ed 100644
--- a/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt
+++ b/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt
@@ -26,6 +26,7 @@ import android.app.PendingIntent
import android.app.Service
import android.content.Intent
import android.content.IntentFilter
+import android.os.Build
import android.os.IBinder
import android.util.Log
import android.widget.Toast
@@ -80,11 +81,13 @@ class SubscriptionService : Service(), CoroutineScope {
val notification = NotificationCompat.Builder(this@SubscriptionService, NOTIFICATION_CHANNEL).apply {
color = ContextCompat.getColor(this@SubscriptionService, R.color.material_primary_500)
priority = NotificationCompat.PRIORITY_LOW
+ var intentFlad=0
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) intentFlad=PendingIntent.FLAG_IMMUTABLE
addAction(NotificationCompat.Action.Builder(
R.drawable.ic_navigation_close,
getText(R.string.stop),
PendingIntent.getBroadcast(this@SubscriptionService, 0,
- Intent(Action.ABORT).setPackage(packageName), 0)).apply {
+ Intent(Action.ABORT).setPackage(packageName), intentFlad)).apply {
setShowsUserInterface(false)
}.build())
setCategory(NotificationCompat.CATEGORY_PROGRESS)
diff --git a/core/src/main/java/com/github/shadowsocks/work/UpdateCheck.kt b/core/src/main/java/com/github/shadowsocks/work/UpdateCheck.kt
index d7b9cec..4a662ff 100644
--- a/core/src/main/java/com/github/shadowsocks/work/UpdateCheck.kt
+++ b/core/src/main/java/com/github/shadowsocks/work/UpdateCheck.kt
@@ -5,6 +5,7 @@ import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.net.Uri
+import android.os.Build
import androidx.core.app.NotificationCompat
import androidx.core.content.ContextCompat
import androidx.core.content.getSystemService
@@ -45,9 +46,11 @@ class UpdateCheck(context: Context, workerParams: WorkerParameters) : CoroutineW
if (info["version"].asInt > BuildConfig.VERSION_CODE) {
val nm = app.getSystemService()!!
val intent = Intent(Intent.ACTION_VIEW).setData(Uri.parse(update_uri))
+ var intentFlad=0
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) intentFlad=PendingIntent.FLAG_IMMUTABLE
val builder = NotificationCompat.Builder(app as Context, "update")
.setColor(ContextCompat.getColor(app, R.color.material_primary_500))
- .setContentIntent(PendingIntent.getActivity(app, 0, intent, 0))
+ .setContentIntent(PendingIntent.getActivity(app, 0, intent, intentFlad))
.setVisibility(
if (DataStore.canToggleLocked) NotificationCompat.VISIBILITY_PUBLIC
else NotificationCompat.VISIBILITY_PRIVATE
diff --git a/core/src/main/java/org/bannedbook/app/service/PolipoService.java b/core/src/main/java/org/bannedbook/app/service/PolipoService.java
index ac4c04c..d77f71f 100644
--- a/core/src/main/java/org/bannedbook/app/service/PolipoService.java
+++ b/core/src/main/java/org/bannedbook/app/service/PolipoService.java
@@ -98,23 +98,6 @@ public void onDestroy() {
//stopForeground(true);
}
- private void createNotification() {
-
- Intent notificationIntent = new Intent(this, mContext.getClass());
- //notificationIntent.setData(Uri.parse("http://127.0.0.1:8123"));
- //notificationIntent.setClassName(this,mContext.getClass().getName());
- PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,notificationIntent, 0);
-
- Notification notification = new Notification.Builder(this).
- setContentTitle("JWProxy").
- setContentText("JWProxy - 禁闻代理正在运行。").
- setSmallIcon(android.R.drawable.ic_media_play).
- setOngoing(true).
- setContentIntent(pendingIntent).
- build();
- startForeground(ONGOING_NOTIFICATION, notification);
- }
-
private void copyAssets(String configFile, String toPath) {
AssetManager assetManager = getAssets();
Log.e("---", "Copy file: " + configFile);
diff --git a/gitupdate.bat b/gitupdate.bat
index 8dd8aaa..74fa357 100644
--- a/gitupdate.bat
+++ b/gitupdate.bat
@@ -3,6 +3,6 @@ git pull origin master
git add -A
git commit -m "update"
git push origin master
-git tag -a v6.2.0 -m "release v6.2.0"
+git tag -a v6.3.0 -m "release v6.3.0"
git push origin --tags
pause
\ No newline at end of file
diff --git a/libv2ray/libv2ray-sources.jar b/libv2ray/libv2ray-sources.jar
new file mode 100644
index 0000000..066e685
Binary files /dev/null and b/libv2ray/libv2ray-sources.jar differ
diff --git a/libv2ray/libv2ray.aar b/libv2ray/libv2ray.aar
new file mode 100644
index 0000000..43e3cb7
Binary files /dev/null and b/libv2ray/libv2ray.aar differ
diff --git a/update-zh.json b/update-zh.json
index 30bd0ac..7f533f0 100644
--- a/update-zh.json
+++ b/update-zh.json
@@ -1,5 +1,5 @@
{
- "version": "5001168",
+ "version": "5001209",
"title": "V2ray VPN 有新版本",
"text": "请尽快从Google Play下载更新。如果您以前不是从Google Play安装的,则可能需要先卸载再安装!",
"uri": "https://play.google.com/store/apps/details?id=free.v2ray.proxy.VPN"
diff --git a/update.json b/update.json
index 1ad48e4..caf585d 100644
--- a/update.json
+++ b/update.json
@@ -1,5 +1,5 @@
{
- "version": "5001168",
+ "version": "5001209",
"title": "New version detected",
"text": "Please download the update from Google Play as soon as possible. If you did not install it from Google Play before, you may need to uninstall then to install it!",
"uri": "https://play.google.com/store/apps/details?id=free.v2ray.proxy.VPN"