Restore some greylist entries.

In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
This commit is contained in:
Mathew Inwood
2019-06-27 12:47:38 +01:00
parent 13775aa4bb
commit 3a75f264a8
7 changed files with 31 additions and 23 deletions

View File

@@ -581,6 +581,7 @@ Landroid/security/keystore/IKeystoreService;->ungrant(Ljava/lang/String;I)I
Landroid/service/dreams/IDreamManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/dreams/IDreamManager;
Landroid/service/dreams/IDreamManager;->getDreamComponents()[Landroid/content/ComponentName;
Landroid/service/euicc/IEuiccService$Stub;-><init>()V
Landroid/service/media/IMediaBrowserServiceCallbacks$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/media/IMediaBrowserServiceCallbacks;
Landroid/service/notification/INotificationListener$Stub;-><init>()V
Landroid/service/persistentdata/IPersistentDataBlockService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/persistentdata/IPersistentDataBlockService;
Landroid/service/vr/IVrManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/vr/IVrManager;

View File

@@ -1017,6 +1017,7 @@ public class ApplicationPackageManager extends PackageManager {
}
}
@UnsupportedAppUsage
@Override
public boolean setInstantAppCookie(@NonNull byte[] cookie) {
try {

View File

@@ -22,6 +22,7 @@ import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Binder;
import android.os.IBinder;
@@ -83,6 +84,7 @@ public final class BluetoothHearingAid implements BluetoothProfile {
*
* @hide
*/
@UnsupportedAppUsage
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_ACTIVE_DEVICE_CHANGED =
"android.bluetooth.hearingaid.profile.action.ACTIVE_DEVICE_CHANGED";
@@ -303,6 +305,7 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* @return false on immediate error, true otherwise
* @hide
*/
@UnsupportedAppUsage
public boolean setActiveDevice(@Nullable BluetoothDevice device) {
if (DBG) log("setActiveDevice(" + device + ")");
final IBluetoothHearingAid service = getService();
@@ -331,6 +334,7 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* is not active, it will be null on that position. Returns empty list on error.
* @hide
*/
@UnsupportedAppUsage
@RequiresPermission(Manifest.permission.BLUETOOTH)
public List<BluetoothDevice> getActiveDevices() {
if (VDBG) log("getActiveDevices()");

View File

@@ -20,6 +20,7 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.os.Parcel;
import android.os.Parcelable;
@@ -169,6 +170,7 @@ public final class OverlayInfo implements Parcelable {
* The state of this OverlayInfo as defined by the STATE_* constants in this class.
* @hide
*/
@UnsupportedAppUsage
public final @State int state;
/**

View File

@@ -68,6 +68,7 @@ public final class UserHandle implements Parcelable {
public static final @NonNull UserHandle CURRENT_OR_SELF = new UserHandle(USER_CURRENT_OR_SELF);
/** @hide An undefined user id */
@UnsupportedAppUsage
public static final @UserIdInt int USER_NULL = -10000;
/**

View File

@@ -206,13 +206,13 @@ public class RemoteViews implements Parcelable, Filter {
*
* @hide
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
public ApplicationInfo mApplication;
/**
* The resource ID of the layout file. (Added to the parcel)
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
private final int mLayoutId;
/**
@@ -224,13 +224,13 @@ public class RemoteViews implements Parcelable, Filter {
* An array of actions to perform on the view tree once it has been
* inflated
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
private ArrayList<Action> mActions;
/**
* Maps bitmaps to unique indicies to avoid Bitmap duplication.
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
private BitmapCache mBitmapCache;
/**
@@ -252,7 +252,7 @@ public class RemoteViews implements Parcelable, Filter {
* RemoteViews.
*/
private RemoteViews mLandscape = null;
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
private RemoteViews mPortrait = null;
@ApplyFlags
@@ -430,7 +430,7 @@ public class RemoteViews implements Parcelable, Filter {
// Do nothing
}
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
public int mergeBehavior() {
return MERGE_REPLACE;
}
@@ -466,7 +466,7 @@ public class RemoteViews implements Parcelable, Filter {
// Nothing to visit by default
}
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
int viewId;
}
@@ -499,7 +499,7 @@ public class RemoteViews implements Parcelable, Filter {
*
* @hide
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
public void mergeRemoteViews(RemoteViews newRv) {
if (newRv == null) return;
// We first copy the new RemoteViews, as the process of merging modifies the way the actions
@@ -690,7 +690,7 @@ public class RemoteViews implements Parcelable, Filter {
return SET_PENDING_INTENT_TEMPLATE_TAG;
}
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
PendingIntent pendingIntentTemplate;
}
@@ -1138,7 +1138,7 @@ public class RemoteViews implements Parcelable, Filter {
private static class BitmapCache {
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
ArrayList<Bitmap> mBitmaps;
int mBitmapMemory = -1;
@@ -1190,9 +1190,9 @@ public class RemoteViews implements Parcelable, Filter {
private class BitmapReflectionAction extends Action {
int bitmapId;
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
Bitmap bitmap;
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
String methodName;
BitmapReflectionAction(int viewId, String methodName, Bitmap bitmap) {
@@ -1258,10 +1258,10 @@ public class RemoteViews implements Parcelable, Filter {
static final int COLOR_STATE_LIST = 15;
static final int ICON = 16;
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
String methodName;
int type;
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
Object value;
ReflectionAction(int viewId, String methodName, int type, Object value) {
@@ -1554,7 +1554,7 @@ public class RemoteViews implements Parcelable, Filter {
* ViewGroup methods that are related to adding Views.
*/
private class ViewGroupActionAdd extends Action {
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
private RemoteViews mNestedViews;
private int mIndex;
@@ -2469,7 +2469,7 @@ public class RemoteViews implements Parcelable, Filter {
* Returns an estimate of the bitmap heap memory usage for this RemoteViews.
*/
/** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
public int estimateMemoryUsage() {
return mBitmapCache.getBitmapMemory();
}
@@ -2517,7 +2517,7 @@ public class RemoteViews implements Parcelable, Filter {
*
* @hide
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
public void addView(int viewId, RemoteViews nestedView, int index) {
addAction(new ViewGroupActionAdd(viewId, nestedView, index));
}
@@ -2994,7 +2994,8 @@ public class RemoteViews implements Parcelable, Filter {
* @hide
* @deprecated this appears to have no users outside of UnsupportedAppUsage?
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
@Deprecated
public void setRemoteAdapter(int viewId, ArrayList<RemoteViews> list, int viewTypeCount) {
addAction(new SetRemoteViewsAdapterList(viewId, list, viewTypeCount));
}

View File

@@ -16,8 +16,6 @@
package com.android.internal.view.menu;
import com.android.internal.view.menu.MenuPresenter.Callback;
import android.annotation.AttrRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -26,14 +24,14 @@ import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Build;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;
import android.widget.PopupWindow.OnDismissListener;
import com.android.internal.view.menu.MenuPresenter.Callback;
/**
* Presents a menu as a small, simple popup anchored to another view.
*/
@@ -114,7 +112,7 @@ public class MenuPopupHelper implements MenuHelper {
* @param forceShowIcon {@code true} to force icons to be shown, or
* {@code false} for icons to be optionally shown
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@UnsupportedAppUsage
public void setForceShowIcon(boolean forceShowIcon) {
mForceShowIcon = forceShowIcon;
if (mPopup != null) {