Derestrict some non-SDK APIs.
Per request from a partner, these APIs will not be restricted as they
are in use. This is conceptually a partial revert of change 5d123b6775.
NoNonSdkCheck: b/170729553
Bug: 171933273
Test: Treehugger
Change-Id: Ibb525e9a9e2fc90248b74f45f3cdcb0be7487c3a
This commit is contained in:
@@ -2284,7 +2284,7 @@ public final class ActivityThread extends ClientTransactionHandler {
|
||||
return null;
|
||||
}
|
||||
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
public final LoadedApk getPackageInfo(ApplicationInfo ai, CompatibilityInfo compatInfo,
|
||||
int flags) {
|
||||
boolean includeCode = (flags&Context.CONTEXT_INCLUDE_CODE) != 0;
|
||||
|
||||
@@ -118,7 +118,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
|
||||
* @hide
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
public static final String ACTION_ACTIVE_DEVICE_CHANGED =
|
||||
"android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED";
|
||||
|
||||
@@ -409,7 +409,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
public boolean setActiveDevice(@Nullable BluetoothDevice device) {
|
||||
if (DBG) log("setActiveDevice(" + device + ")");
|
||||
try {
|
||||
@@ -433,7 +433,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
|
||||
* is active
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
@Nullable
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH)
|
||||
public BluetoothDevice getActiveDevice() {
|
||||
|
||||
@@ -1174,7 +1174,7 @@ public final class BluetoothAdapter {
|
||||
* @return true to indicate adapter shutdown has begun, or false on immediate error
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
public boolean disable(boolean persist) {
|
||||
|
||||
try {
|
||||
|
||||
@@ -113,7 +113,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
|
||||
* @hide
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
public static final String ACTION_ACTIVE_DEVICE_CHANGED =
|
||||
"android.bluetooth.headset.profile.action.ACTIVE_DEVICE_CHANGED";
|
||||
|
||||
@@ -1130,7 +1130,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN)
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
public boolean setActiveDevice(@Nullable BluetoothDevice device) {
|
||||
if (DBG) {
|
||||
Log.d(TAG, "setActiveDevice: " + device);
|
||||
@@ -1156,7 +1156,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
|
||||
* is active.
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
@Nullable
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH)
|
||||
public BluetoothDevice getActiveDevice() {
|
||||
|
||||
@@ -64,7 +64,7 @@ import android.content.IntentSender;
|
||||
*/
|
||||
interface IPackageManager {
|
||||
void checkPackageStartable(String packageName, int userId);
|
||||
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
boolean isPackageAvailable(String packageName, int userId);
|
||||
@UnsupportedAppUsage
|
||||
PackageInfo getPackageInfo(String packageName, int flags, int userId);
|
||||
|
||||
@@ -10379,7 +10379,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
protected boolean isVisibleToUser(Rect boundInView) {
|
||||
if (mAttachInfo != null) {
|
||||
// Attached to invisible window means this view is not visible.
|
||||
|
||||
@@ -620,7 +620,7 @@ interface ITelephony {
|
||||
* successful iccOpenLogicalChannel.
|
||||
* @return true if the channel was closed successfully.
|
||||
*/
|
||||
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
boolean iccCloseLogicalChannel(int subId, int channel);
|
||||
|
||||
/**
|
||||
@@ -662,7 +662,7 @@ interface ITelephony {
|
||||
* @return The APDU response from the ICC card with the status appended at
|
||||
* the end.
|
||||
*/
|
||||
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
||||
@UnsupportedAppUsage(trackingBug = 171933273)
|
||||
String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction,
|
||||
int p1, int p2, int p3, String data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user