Merge "Derestrict some non-SDK APIs." am: 29bf6e8443

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541669

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3a073e1413b1e7bd62be3a865230d19db81b4726
This commit is contained in:
Mathew Inwood
2021-01-13 09:45:50 +00:00
committed by Automerger Merge Worker
7 changed files with 12 additions and 12 deletions

View File

@@ -2284,7 +2284,7 @@ public final class ActivityThread extends ClientTransactionHandler {
return null; return null;
} }
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
public final LoadedApk getPackageInfo(ApplicationInfo ai, CompatibilityInfo compatInfo, public final LoadedApk getPackageInfo(ApplicationInfo ai, CompatibilityInfo compatInfo,
int flags) { int flags) {
boolean includeCode = (flags&Context.CONTEXT_INCLUDE_CODE) != 0; boolean includeCode = (flags&Context.CONTEXT_INCLUDE_CODE) != 0;

View File

@@ -118,7 +118,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
* @hide * @hide
*/ */
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
public static final String ACTION_ACTIVE_DEVICE_CHANGED = public static final String ACTION_ACTIVE_DEVICE_CHANGED =
"android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED"; "android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED";
@@ -409,7 +409,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
* @hide * @hide
*/ */
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
public boolean setActiveDevice(@Nullable BluetoothDevice device) { public boolean setActiveDevice(@Nullable BluetoothDevice device) {
if (DBG) log("setActiveDevice(" + device + ")"); if (DBG) log("setActiveDevice(" + device + ")");
try { try {
@@ -433,7 +433,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
* is active * is active
* @hide * @hide
*/ */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
@Nullable @Nullable
@RequiresPermission(Manifest.permission.BLUETOOTH) @RequiresPermission(Manifest.permission.BLUETOOTH)
public BluetoothDevice getActiveDevice() { public BluetoothDevice getActiveDevice() {

View File

@@ -1174,7 +1174,7 @@ public final class BluetoothAdapter {
* @return true to indicate adapter shutdown has begun, or false on immediate error * @return true to indicate adapter shutdown has begun, or false on immediate error
* @hide * @hide
*/ */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
public boolean disable(boolean persist) { public boolean disable(boolean persist) {
try { try {

View File

@@ -113,7 +113,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
* @hide * @hide
*/ */
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
public static final String ACTION_ACTIVE_DEVICE_CHANGED = public static final String ACTION_ACTIVE_DEVICE_CHANGED =
"android.bluetooth.headset.profile.action.ACTIVE_DEVICE_CHANGED"; "android.bluetooth.headset.profile.action.ACTIVE_DEVICE_CHANGED";
@@ -1172,7 +1172,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
* @hide * @hide
*/ */
@RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN)
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
public boolean setActiveDevice(@Nullable BluetoothDevice device) { public boolean setActiveDevice(@Nullable BluetoothDevice device) {
if (DBG) { if (DBG) {
Log.d(TAG, "setActiveDevice: " + device); Log.d(TAG, "setActiveDevice: " + device);
@@ -1198,7 +1198,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
* is active. * is active.
* @hide * @hide
*/ */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
@Nullable @Nullable
@RequiresPermission(Manifest.permission.BLUETOOTH) @RequiresPermission(Manifest.permission.BLUETOOTH)
public BluetoothDevice getActiveDevice() { public BluetoothDevice getActiveDevice() {

View File

@@ -64,7 +64,7 @@ import android.content.IntentSender;
*/ */
interface IPackageManager { interface IPackageManager {
void checkPackageStartable(String packageName, int userId); void checkPackageStartable(String packageName, int userId);
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
boolean isPackageAvailable(String packageName, int userId); boolean isPackageAvailable(String packageName, int userId);
@UnsupportedAppUsage @UnsupportedAppUsage
PackageInfo getPackageInfo(String packageName, int flags, int userId); PackageInfo getPackageInfo(String packageName, int flags, int userId);

View File

@@ -10379,7 +10379,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* *
* @hide * @hide
*/ */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
protected boolean isVisibleToUser(Rect boundInView) { protected boolean isVisibleToUser(Rect boundInView) {
if (mAttachInfo != null) { if (mAttachInfo != null) {
// Attached to invisible window means this view is not visible. // Attached to invisible window means this view is not visible.

View File

@@ -629,7 +629,7 @@ interface ITelephony {
* successful iccOpenLogicalChannel. * successful iccOpenLogicalChannel.
* @return true if the channel was closed successfully. * @return true if the channel was closed successfully.
*/ */
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
boolean iccCloseLogicalChannel(int subId, int channel); boolean iccCloseLogicalChannel(int subId, int channel);
/** /**
@@ -671,7 +671,7 @@ interface ITelephony {
* @return The APDU response from the ICC card with the status appended at * @return The APDU response from the ICC card with the status appended at
* the end. * the end.
*/ */
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) @UnsupportedAppUsage(trackingBug = 171933273)
String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction, String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction,
int p1, int p2, int p3, String data); int p1, int p2, int p3, String data);