Mark connectivity test utilities as module API
The API surface is planned to move to the Connectivity module, meaning that it will be maintained across multiple Android releases. This is incompatible with TestApi semantics, which are designed to be removable across releases. Effectively the APIs become SystemApi, so mark them as such considering that TestApi is not supported by modules. Remove the NetworkCapabilities.getCapabilities test API that is not essential for tests, and mark other APIs as module API. Test: m Bug: 174436414 Change-Id: Ic04551a9874b3d756cf5e6c77ceabfc7c85d52a6
This commit is contained in:
parent
28d69fc2f7
commit
761c7ad923
1 changed files with 4 additions and 5 deletions
|
|
@ -29,7 +29,6 @@ import android.annotation.SdkConstant;
|
|||
import android.annotation.SdkConstant.SdkConstantType;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.SystemService;
|
||||
import android.annotation.TestApi;
|
||||
import android.app.PendingIntent;
|
||||
import android.compat.annotation.UnsupportedAppUsage;
|
||||
import android.content.Context;
|
||||
|
|
@ -4823,6 +4822,8 @@ public class ConnectivityManager {
|
|||
/**
|
||||
* Simulates a Data Stall for the specified Network.
|
||||
*
|
||||
* <p>This method should only be used for tests.
|
||||
*
|
||||
* <p>The caller must be the owner of the specified Network.
|
||||
*
|
||||
* @param detectionMethod The detection method used to identify the Data Stall.
|
||||
|
|
@ -4832,7 +4833,7 @@ public class ConnectivityManager {
|
|||
* @throws SecurityException if the caller is not the owner of the given network.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
|
||||
@RequiresPermission(anyOf = {android.Manifest.permission.MANAGE_TEST_NETWORKS,
|
||||
android.Manifest.permission.NETWORK_STACK})
|
||||
public void simulateDataStall(int detectionMethod, long timestampMillis,
|
||||
|
|
|
|||
Loading…
Reference in a new issue