summaryrefslogtreecommitdiff
path: root/permissionse/libs/hidden-apis-stub/src
diff options
context:
space:
mode:
authorGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2022-11-06 18:19:17 +0000
committerGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2022-11-06 18:19:17 +0000
commit99b27efb59ba642bfca0c6fbabfaa2c6631e15b9 (patch)
treec55aed6119dff29a84d7120bedf88e2df1775597 /permissionse/libs/hidden-apis-stub/src
parent9701ef06a47560ca429f1e7fffd0958b376ec628 (diff)
parentfdeecefd34c00b225bd58f6cc7135a95e21728f1 (diff)
Merge branch '5561-name_the_vpn_already_running' into 'main'
5561: display name of other VPNrunning always on. See merge request e/os/advanced-privacy!96
Diffstat (limited to 'permissionse/libs/hidden-apis-stub/src')
-rw-r--r--permissionse/libs/hidden-apis-stub/src/main/java/android/net/IConnectivityManager.java6
-rw-r--r--permissionse/libs/hidden-apis-stub/src/main/java/android/net/VpnManager.java11
2 files changed, 14 insertions, 3 deletions
diff --git a/permissionse/libs/hidden-apis-stub/src/main/java/android/net/IConnectivityManager.java b/permissionse/libs/hidden-apis-stub/src/main/java/android/net/IConnectivityManager.java
index d7f6ccf..53440e0 100644
--- a/permissionse/libs/hidden-apis-stub/src/main/java/android/net/IConnectivityManager.java
+++ b/permissionse/libs/hidden-apis-stub/src/main/java/android/net/IConnectivityManager.java
@@ -32,7 +32,7 @@ public interface IConnectivityManager {
@TargetApi(29)
@DeprecatedSinceApi(
api = 31,
- message = "TODO"
+ message = "Moved to android.net.VpnManager"
)
boolean prepareVpn(String oldPackage, String newPackage, int userId) throws RemoteException;
@@ -53,9 +53,9 @@ public interface IConnectivityManager {
@TargetApi(29)
@DeprecatedSinceApi(
api = 31,
- message = "TODO"
+ message = "Moved to android.net.VpnManager"
)
- String getAlwaysOnVpnPackage(int userId) throws RemoteException;
+ public String getAlwaysOnVpnPackage(int userId) throws RemoteException;
public abstract static class Stub extends Binder implements IConnectivityManager {
public static IConnectivityManager asInterface(IBinder obj) {
diff --git a/permissionse/libs/hidden-apis-stub/src/main/java/android/net/VpnManager.java b/permissionse/libs/hidden-apis-stub/src/main/java/android/net/VpnManager.java
index 7cc9b6a..bdb9e95 100644
--- a/permissionse/libs/hidden-apis-stub/src/main/java/android/net/VpnManager.java
+++ b/permissionse/libs/hidden-apis-stub/src/main/java/android/net/VpnManager.java
@@ -21,6 +21,7 @@ import android.annotation.TargetApi;
import androidx.annotation.DeprecatedSinceApi;
import androidx.annotation.Nullable;
+import androidx.annotation.RequiresPermission;
// Stub based on:
// https://gitlab.e.foundation/e/os/android_frameworks_base/-/blob/[SDK_VERSION]/core/java/android/net/VpnManager.java
@@ -50,4 +51,14 @@ public class VpnManager {
int userId,
int vpnType
) {}
+
+ @TargetApi(31)
+ @DeprecatedSinceApi(
+ api = 33,
+ message = "Check disponibility in SDK33"
+ )
+ @RequiresPermission("android.permission.CONTROL_ALWAYS_ON_VPN")
+ public String getAlwaysOnVpnPackageForUser(int userId) {
+ return null;
+ }
}