修复部分设备下闪退问题
修复部分设备下闪退问题
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "APK",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.litevpn.fast",
|
||||||
|
"variantName": "metaRelease",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "UNIVERSAL",
|
||||||
|
"filters": [],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 323001,
|
||||||
|
"versionName": "3.1.0",
|
||||||
|
"outputFile": "UUVPN-3.1.0-meta-universal-release.apk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ONE_OF_MANY",
|
||||||
|
"filters": [
|
||||||
|
{
|
||||||
|
"filterType": "ABI",
|
||||||
|
"value": "x86"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 323001,
|
||||||
|
"versionName": "3.1.0",
|
||||||
|
"outputFile": "UUVPN-3.1.0-meta-x86-release.apk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ONE_OF_MANY",
|
||||||
|
"filters": [
|
||||||
|
{
|
||||||
|
"filterType": "ABI",
|
||||||
|
"value": "x86_64"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 323001,
|
||||||
|
"versionName": "3.1.0",
|
||||||
|
"outputFile": "UUVPN-3.1.0-meta-x86_64-release.apk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ONE_OF_MANY",
|
||||||
|
"filters": [
|
||||||
|
{
|
||||||
|
"filterType": "ABI",
|
||||||
|
"value": "armeabi-v7a"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 323001,
|
||||||
|
"versionName": "3.1.0",
|
||||||
|
"outputFile": "UUVPN-3.1.0-meta-armeabi-v7a-release.apk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ONE_OF_MANY",
|
||||||
|
"filters": [
|
||||||
|
{
|
||||||
|
"filterType": "ABI",
|
||||||
|
"value": "arm64-v8a"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 323001,
|
||||||
|
"versionName": "3.1.0",
|
||||||
|
"outputFile": "UUVPN-3.1.0-meta-arm64-v8a-release.apk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"elementType": "File"
|
||||||
|
}
|
||||||
@@ -241,6 +241,7 @@ class LoginActivity : AppCompatActivity() {
|
|||||||
// Handle error response, even if it's 422
|
// Handle error response, even if it's 422
|
||||||
try {
|
try {
|
||||||
val errorResponse = it?.errorBody()?.string() ?: ""
|
val errorResponse = it?.errorBody()?.string() ?: ""
|
||||||
|
print(errorResponse)
|
||||||
val errorJson = JSONObject(errorResponse)
|
val errorJson = JSONObject(errorResponse)
|
||||||
val message = errorJson.optString("message")
|
val message = errorJson.optString("message")
|
||||||
// Process the error message or show it to the user
|
// Process the error message or show it to the user
|
||||||
|
|||||||
+5
-1
@@ -80,7 +80,11 @@ class ClashService : BaseService() {
|
|||||||
|
|
||||||
|
|
||||||
StaticNotificationModule.createNotificationChannel(this)
|
StaticNotificationModule.createNotificationChannel(this)
|
||||||
StaticNotificationModule.notifyLoadingNotification(this)
|
try {
|
||||||
|
StaticNotificationModule.notifyLoadingNotification(this)
|
||||||
|
} catch (e: SecurityException) {
|
||||||
|
Log.e("Failed to post loading notification: ${e.message}", e)
|
||||||
|
}
|
||||||
|
|
||||||
runtime.launch()
|
runtime.launch()
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-2
@@ -5,6 +5,7 @@ import android.content.BroadcastReceiver
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
|
import android.os.Build
|
||||||
import com.github.kr328.clash.common.constants.Permissions
|
import com.github.kr328.clash.common.constants.Permissions
|
||||||
import com.github.kr328.clash.common.log.Log
|
import com.github.kr328.clash.common.log.Log
|
||||||
import kotlinx.coroutines.NonCancellable
|
import kotlinx.coroutines.NonCancellable
|
||||||
@@ -44,9 +45,17 @@ abstract class Module<E>(val service: Service) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (requireSelf) {
|
if (requireSelf) {
|
||||||
service.registerReceiver(receiver, filter, Permissions.RECEIVE_SELF_BROADCASTS, null)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
service.registerReceiver(receiver, filter, Permissions.RECEIVE_SELF_BROADCASTS, null, Context.RECEIVER_EXPORTED)
|
||||||
|
} else {
|
||||||
|
service.registerReceiver(receiver, filter, Permissions.RECEIVE_SELF_BROADCASTS, null)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
service.registerReceiver(receiver, filter)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
service.registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED)
|
||||||
|
} else {
|
||||||
|
service.registerReceiver(receiver, filter)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
receivers.add(receiver)
|
receivers.add(receiver)
|
||||||
|
|||||||
Reference in New Issue
Block a user