Merge "Opt-out for always-on VPN: rename API." into oc-mr1-dev am: 8b2513e439
am: 0aeecd42a9
Change-Id: Ib4eca8d5ea79e5ac65496bee8390e5ce4cd8fb64
This commit is contained in:
@@ -840,8 +840,8 @@ public class ConnectivityManager {
|
||||
* In order to support the always-on feature, an app has to
|
||||
* <ul>
|
||||
* <li>target {@link VERSION_CODES#N API 24} or above, and
|
||||
* <li>not opt out through the {@link VpnService#METADATA_SUPPORTS_ALWAYS_ON} meta-data
|
||||
* field.
|
||||
* <li>not opt out through the {@link VpnService#SERVICE_META_DATA_SUPPORTS_ALWAYS_ON}
|
||||
* meta-data field.
|
||||
* </ul>
|
||||
*
|
||||
* @param userId The identifier of the user for whom the VPN app is installed.
|
||||
|
||||
@@ -351,7 +351,7 @@ public class VpnTest extends AndroidTestCase {
|
||||
// Apps that opt out explicitly are not supported
|
||||
appInfo.targetSdkVersion = VERSION_CODES.CUR_DEVELOPMENT;
|
||||
Bundle metaData = new Bundle();
|
||||
metaData.putBoolean(VpnService.METADATA_SUPPORTS_ALWAYS_ON, false);
|
||||
metaData.putBoolean(VpnService.SERVICE_META_DATA_SUPPORTS_ALWAYS_ON, false);
|
||||
svcInfo.metaData = metaData;
|
||||
assertFalse(vpn.isAlwaysOnPackageSupported(PKGS[0]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user