mirror of
https://github.com/wanghongenpin/proxypin.git
synced 2026-05-20 16:15:47 +08:00
android 14
This commit is contained in:
@@ -159,7 +159,9 @@ class ProxyVpnService : VpnService(), ProtectSocket {
|
||||
.setOngoing(true)
|
||||
.build()
|
||||
|
||||
startForeground(NOTIFICATION_ID, notification)
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
startForeground(NOTIFICATION_ID, notification)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -130,14 +130,14 @@ class PictureInPicturePlugin : AndroidFlutterPlugin() {
|
||||
val pIntent: PendingIntent = PendingIntent.getBroadcast(
|
||||
activity,
|
||||
if (isRunning) 0 else 1,
|
||||
Intent(VPN_ACTION),
|
||||
Intent(VPN_ACTION).apply { setPackage(activity.packageName) },
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_IMMUTABLE else PendingIntent.FLAG_UPDATE_CURRENT
|
||||
)
|
||||
|
||||
val cleanIntent: PendingIntent = PendingIntent.getBroadcast(
|
||||
activity,
|
||||
2,
|
||||
Intent(CLEAN_ACTION),
|
||||
Intent(CLEAN_ACTION).apply { setPackage(activity.packageName) },
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_IMMUTABLE else PendingIntent.FLAG_UPDATE_CURRENT
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user