summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-09-02 02:54:43 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-09-02 02:54:43 +0000
commitcf4d533abf67ab0637e9720913411fe0cc67d3fd (patch)
tree7ac95735007d664cadefc0eb686d446a3c415ab8
parentf600ab436176d973cea7aeae7ce77735c81d612e (diff)
parentff1c673515cb0f679e21b8d1df1d93f1e80cd586 (diff)
downloadbase-cf4d533abf67ab0637e9720913411fe0cc67d3fd.tar.gz
Merge cherrypicks of [19415033] into tm-d1-release.android-13.0.0_r11
Change-Id: I28060188d28fec50f926e95e6144d925f6cf2a25
-rw-r--r--services/core/java/com/android/server/connectivity/Vpn.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 77d3392da993..15aa07f40641 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -2944,7 +2944,7 @@ public class Vpn {
// All the above failures are configuration errors, and are terminal
// TODO(b/230548427): Remove SDK check once VPN related stuff are
// decoupled from ConnectivityServiceTest.
- if (SdkLevel.isAtLeastT()) {
+ if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) {
sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_IKE_ERROR,
VpnManager.ERROR_CLASS_NOT_RECOVERABLE,
ikeException.getErrorType(),
@@ -2962,7 +2962,7 @@ public class Vpn {
// All the above failures are configuration errors, and are terminal
// TODO(b/230548427): Remove SDK check once VPN related stuff are
// decoupled from ConnectivityServiceTest.
- if (SdkLevel.isAtLeastT()) {
+ if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) {
sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_IKE_ERROR,
VpnManager.ERROR_CLASS_RECOVERABLE,
ikeException.getErrorType(),
@@ -2981,7 +2981,7 @@ public class Vpn {
} else if (exception instanceof IkeNetworkLostException) {
// TODO(b/230548427): Remove SDK check once VPN related stuff are
// decoupled from ConnectivityServiceTest.
- if (SdkLevel.isAtLeastT()) {
+ if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) {
sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_NETWORK_ERROR,
VpnManager.ERROR_CLASS_RECOVERABLE,
VpnManager.ERROR_CODE_NETWORK_LOST,
@@ -2996,7 +2996,7 @@ public class Vpn {
if (exception.getCause() instanceof UnknownHostException) {
// TODO(b/230548427): Remove SDK check once VPN related stuff are
// decoupled from ConnectivityServiceTest.
- if (SdkLevel.isAtLeastT()) {
+ if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) {
sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_NETWORK_ERROR,
VpnManager.ERROR_CLASS_RECOVERABLE,
VpnManager.ERROR_CODE_NETWORK_UNKNOWN_HOST,
@@ -3010,7 +3010,7 @@ public class Vpn {
} else if (exception.getCause() instanceof IkeTimeoutException) {
// TODO(b/230548427): Remove SDK check once VPN related stuff are
// decoupled from ConnectivityServiceTest.
- if (SdkLevel.isAtLeastT()) {
+ if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) {
sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_NETWORK_ERROR,
VpnManager.ERROR_CLASS_RECOVERABLE,
VpnManager.ERROR_CODE_NETWORK_PROTOCOL_TIMEOUT,
@@ -3024,7 +3024,7 @@ public class Vpn {
} else if (exception.getCause() instanceof IOException) {
// TODO(b/230548427): Remove SDK check once VPN related stuff are
// decoupled from ConnectivityServiceTest.
- if (SdkLevel.isAtLeastT()) {
+ if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) {
sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_NETWORK_ERROR,
VpnManager.ERROR_CLASS_RECOVERABLE,
VpnManager.ERROR_CODE_NETWORK_IO,