Remove unnecessarily @System/TestApi annotations
We can't expose APIs if the enclosing class is hidden, so these annotations are redundant. We need to remove them so that we can enable the check. Exempt-From-Owner-Approval: Cherry-pick from goog/master Bug: 159121253 Test: treehugger (i.e. this shouldn't trigger "API has changed" error.) Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2 Change-Id: I36e3562b72e64b51e4febd1d42a3bc8e4dc60988
This commit is contained in:
@@ -19,7 +19,6 @@ package android.bluetooth;
|
||||
import android.Manifest;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.compat.annotation.UnsupportedAppUsage;
|
||||
import android.content.Context;
|
||||
import android.os.Binder;
|
||||
@@ -587,7 +586,6 @@ public final class BluetoothHeadsetClient implements BluetoothProfile {
|
||||
* @return true if connectionPolicy is set, false on error
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
|
||||
public boolean setConnectionPolicy(@NonNull BluetoothDevice device,
|
||||
@ConnectionPolicy int connectionPolicy) {
|
||||
@@ -637,7 +635,6 @@ public final class BluetoothHeadsetClient implements BluetoothProfile {
|
||||
* @return connection policy of the device
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH)
|
||||
public @ConnectionPolicy int getConnectionPolicy(@NonNull BluetoothDevice device) {
|
||||
if (VDBG) log("getConnectionPolicy(" + device + ")");
|
||||
|
||||
@@ -19,7 +19,6 @@ package android.bluetooth;
|
||||
import android.Manifest;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.app.PendingIntent;
|
||||
import android.compat.annotation.UnsupportedAppUsage;
|
||||
import android.content.Context;
|
||||
@@ -276,7 +275,6 @@ public final class BluetoothMapClient implements BluetoothProfile {
|
||||
* @return true if connectionPolicy is set, false on error
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
|
||||
public boolean setConnectionPolicy(@NonNull BluetoothDevice device,
|
||||
@ConnectionPolicy int connectionPolicy) {
|
||||
@@ -325,7 +323,6 @@ public final class BluetoothMapClient implements BluetoothProfile {
|
||||
* @return connection policy of the device
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
|
||||
public @ConnectionPolicy int getConnectionPolicy(@NonNull BluetoothDevice device) {
|
||||
if (VDBG) Log.d(TAG, "getConnectionPolicy(" + device + ")");
|
||||
|
||||
@@ -19,7 +19,6 @@ package android.bluetooth;
|
||||
import android.Manifest;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
@@ -276,7 +275,6 @@ public final class BluetoothPbapClient implements BluetoothProfile {
|
||||
* @return true if connectionPolicy is set, false on error
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
|
||||
public boolean setConnectionPolicy(@NonNull BluetoothDevice device,
|
||||
@ConnectionPolicy int connectionPolicy) {
|
||||
@@ -329,7 +327,6 @@ public final class BluetoothPbapClient implements BluetoothProfile {
|
||||
* @return connection policy of the device
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
|
||||
public @ConnectionPolicy int getConnectionPolicy(@NonNull BluetoothDevice device) {
|
||||
if (VDBG) {
|
||||
|
||||
@@ -18,7 +18,6 @@ package android.bluetooth;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.compat.annotation.UnsupportedAppUsage;
|
||||
import android.content.Context;
|
||||
import android.os.Binder;
|
||||
@@ -328,7 +327,6 @@ public final class BluetoothSap implements BluetoothProfile {
|
||||
* @return true if connectionPolicy is set, false on error
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
|
||||
public boolean setConnectionPolicy(BluetoothDevice device,
|
||||
@ConnectionPolicy int connectionPolicy) {
|
||||
@@ -377,7 +375,6 @@ public final class BluetoothSap implements BluetoothProfile {
|
||||
* @return connection policy of the device
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
|
||||
public @ConnectionPolicy int getConnectionPolicy(BluetoothDevice device) {
|
||||
if (VDBG) log("getConnectionPolicy(" + device + ")");
|
||||
|
||||
@@ -46,7 +46,6 @@ import android.annotation.IntRange;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.StringRes;
|
||||
import android.annotation.TestApi;
|
||||
import android.apex.ApexInfo;
|
||||
import android.app.ActivityTaskManager;
|
||||
import android.app.ActivityThread;
|
||||
@@ -2682,7 +2681,6 @@ public class PackageParser {
|
||||
* not compatible with this platform
|
||||
* @hide Exposed for unit testing only.
|
||||
*/
|
||||
@TestApi
|
||||
public static int computeTargetSdkVersion(@IntRange(from = 0) int targetVers,
|
||||
@Nullable String targetCode, @NonNull String[] platformSdkCodenames,
|
||||
@NonNull String[] outError) {
|
||||
@@ -2747,7 +2745,6 @@ public class PackageParser {
|
||||
* compatible with this platform
|
||||
* @hide Exposed for unit testing only.
|
||||
*/
|
||||
@TestApi
|
||||
public static int computeMinSdkVersion(@IntRange(from = 1) int minVers,
|
||||
@Nullable String minCode, @IntRange(from = 1) int platformSdkVersion,
|
||||
@NonNull String[] platformSdkCodenames, @NonNull String[] outError) {
|
||||
@@ -4845,7 +4842,6 @@ public class PackageParser {
|
||||
* AndroidManifest.xml.
|
||||
* @hide Exposed for unit testing only.
|
||||
*/
|
||||
@TestApi
|
||||
public static int getActivityConfigChanges(int configChanges, int recreateOnConfigChanges) {
|
||||
return configChanges | ((~recreateOnConfigChanges) & RECREATE_ON_CONFIG_CHANGES_MASK);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ package android.telephony;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.TestApi;
|
||||
import android.content.Context;
|
||||
import android.os.Binder;
|
||||
import android.os.RemoteException;
|
||||
@@ -248,7 +247,6 @@ public class TelephonyRegistryManager {
|
||||
* @param incomingNumber incoming phone number.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
||||
public void notifyCallStateChangedForAllSubscriptions(@CallState int state,
|
||||
@Nullable String incomingNumber) {
|
||||
|
||||
@@ -346,7 +346,6 @@ public class MmTelFeature extends ImsFeature {
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@SystemApi @TestApi
|
||||
public void onIncomingCall(IImsCallSession c, Bundle extras) {
|
||||
|
||||
}
|
||||
@@ -358,7 +357,6 @@ public class MmTelFeature extends ImsFeature {
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@SystemApi @TestApi
|
||||
public void onRejectedCall(ImsCallProfile callProfile, ImsReasonInfo reason) {
|
||||
|
||||
}
|
||||
@@ -369,7 +367,6 @@ public class MmTelFeature extends ImsFeature {
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@SystemApi @TestApi
|
||||
public void onVoiceMessageCountUpdate(int count) {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user