diff options
| -rw-r--r-- | config/hiddenapi-greylist.txt | 1 | ||||
| -rw-r--r-- | core/java/android/app/ApplicationPackageManager.java | 1 | ||||
| -rw-r--r-- | core/java/android/bluetooth/BluetoothHearingAid.java | 4 | ||||
| -rw-r--r-- | core/java/android/content/om/OverlayInfo.java | 2 | ||||
| -rw-r--r-- | core/java/android/os/UserHandle.java | 1 | ||||
| -rw-r--r-- | core/java/android/widget/RemoteViews.java | 37 | ||||
| -rw-r--r-- | core/java/com/android/internal/view/menu/MenuPopupHelper.java | 8 |
7 files changed, 31 insertions, 23 deletions
diff --git a/config/hiddenapi-greylist.txt b/config/hiddenapi-greylist.txt index 10f25ea1c8d1..c30a6f491807 100644 --- a/config/hiddenapi-greylist.txt +++ b/config/hiddenapi-greylist.txt @@ -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; diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java index 769fd487c2a9..360be350601d 100644 --- a/core/java/android/app/ApplicationPackageManager.java +++ b/core/java/android/app/ApplicationPackageManager.java @@ -1017,6 +1017,7 @@ public class ApplicationPackageManager extends PackageManager { } } + @UnsupportedAppUsage @Override public boolean setInstantAppCookie(@NonNull byte[] cookie) { try { diff --git a/core/java/android/bluetooth/BluetoothHearingAid.java b/core/java/android/bluetooth/BluetoothHearingAid.java index 60fb6fb122e3..a812c32ae868 100644 --- a/core/java/android/bluetooth/BluetoothHearingAid.java +++ b/core/java/android/bluetooth/BluetoothHearingAid.java @@ -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()"); diff --git a/core/java/android/content/om/OverlayInfo.java b/core/java/android/content/om/OverlayInfo.java index 1838babf7794..f39fc6674a11 100644 --- a/core/java/android/content/om/OverlayInfo.java +++ b/core/java/android/content/om/OverlayInfo.java @@ -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; /** diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index b1212343b279..d70ba9921bfd 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -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; /** diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index 564d972ac26d..86cec5e0f0a2 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -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)); } diff --git a/core/java/com/android/internal/view/menu/MenuPopupHelper.java b/core/java/com/android/internal/view/menu/MenuPopupHelper.java index 64291de38130..d00108edefd0 100644 --- a/core/java/com/android/internal/view/menu/MenuPopupHelper.java +++ b/core/java/com/android/internal/view/menu/MenuPopupHelper.java @@ -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) { |