From da6e570f1e1a8c51d1c549dcf1a5b8907cd506bd Mon Sep 17 00:00:00 2001 From: Andrei Onea Date: Mon, 25 Feb 2019 15:24:42 +0000 Subject: [PATCH] Add @UnsupportedAppUsage annotations For packages: android.database android.hardware android.hardware.display android.hardware.input android.hardware.location android.location android.media android.media.tv android.media.projection This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I570c08292f8a9f512c96f9dce13f5337718f112c --- config/hiddenapi-greylist.txt | 31 ------------------- .../android/database/BulkCursorNative.java | 2 ++ .../hardware/display/IDisplayManager.aidl | 1 + .../android/hardware/input/IInputManager.aidl | 1 + .../IActivityRecognitionHardwareClient.aidl | 1 + .../android/location/IGeocodeProvider.aidl | 2 ++ .../android/location/IGeofenceProvider.aidl | 1 + .../android/location/ILocationListener.aidl | 4 +++ .../android/location/ILocationManager.aidl | 1 + .../location/INetInitiatedListener.aidl | 1 + .../android/media/IAudioFocusDispatcher.aidl | 1 + media/java/android/media/IAudioService.aidl | 4 +++ .../android/media/IMediaScannerService.aidl | 2 ++ .../android/media/IRemoteDisplayCallback.aidl | 1 + .../projection/IMediaProjectionManager.aidl | 1 + .../media/tv/ITvRemoteServiceInput.aidl | 9 ++++++ 16 files changed, 32 insertions(+), 31 deletions(-) diff --git a/config/hiddenapi-greylist.txt b/config/hiddenapi-greylist.txt index aaff76eb9ae6c..dc6e7f93525cc 100644 --- a/config/hiddenapi-greylist.txt +++ b/config/hiddenapi-greylist.txt @@ -437,7 +437,6 @@ Landroid/content/pm/IShortcutService$Stub;->asInterface(Landroid/os/IBinder;)Lan Landroid/content/res/ConfigurationBoundResourceCache;->()V Landroid/content/res/DrawableCache;->()V Landroid/content/UndoManager;->()V -Landroid/database/BulkCursorProxy;->mRemote:Landroid/os/IBinder; Landroid/database/IContentObserver$Stub;->()V Landroid/database/IContentObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/database/IContentObserver; Landroid/database/IContentObserver;->onChange(ZLandroid/net/Uri;I)V @@ -446,16 +445,13 @@ Landroid/database/sqlite/SQLiteDatabase;->$assertionsDisabled:Z Landroid/filterfw/GraphEnvironment;->addReferences([Ljava/lang/Object;)V Landroid/hardware/camera2/utils/HashCodeHelpers;->hashCode([I)I Landroid/hardware/display/IDisplayManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/display/IDisplayManager; -Landroid/hardware/display/IDisplayManager;->getDisplayInfo(I)Landroid/view/DisplayInfo; Landroid/hardware/fingerprint/IFingerprintService$Stub$Proxy;->(Landroid/os/IBinder;)V Landroid/hardware/fingerprint/IFingerprintService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/fingerprint/IFingerprintService; Landroid/hardware/ICameraService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/ICameraService; Landroid/hardware/input/IInputManager$Stub$Proxy;->(Landroid/os/IBinder;)V Landroid/hardware/input/IInputManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/input/IInputManager; Landroid/hardware/input/IInputManager$Stub;->TRANSACTION_injectInputEvent:I -Landroid/hardware/input/IInputManager;->injectInputEvent(Landroid/view/InputEvent;I)Z Landroid/hardware/location/IActivityRecognitionHardwareClient$Stub;->()V -Landroid/hardware/location/IActivityRecognitionHardwareClient;->onAvailabilityChanged(ZLandroid/hardware/location/IActivityRecognitionHardware;)V Landroid/hardware/location/IContextHubService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/location/IContextHubService; Landroid/hardware/usb/IUsbManager$Stub$Proxy;->(Landroid/os/IBinder;)V Landroid/hardware/usb/IUsbManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/usb/IUsbManager; @@ -465,60 +461,33 @@ Landroid/location/ICountryDetector$Stub;->asInterface(Landroid/os/IBinder;)Landr Landroid/location/ICountryListener$Stub;->()V Landroid/location/IGeocodeProvider$Stub;->()V Landroid/location/IGeocodeProvider$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/IGeocodeProvider; -Landroid/location/IGeocodeProvider;->getFromLocation(DDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String; -Landroid/location/IGeocodeProvider;->getFromLocationName(Ljava/lang/String;DDDDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String; Landroid/location/IGeofenceProvider$Stub;->()V -Landroid/location/IGeofenceProvider;->setGeofenceHardware(Landroid/hardware/location/IGeofenceHardware;)V Landroid/location/ILocationListener$Stub$Proxy;->(Landroid/os/IBinder;)V Landroid/location/ILocationListener$Stub$Proxy;->mRemote:Landroid/os/IBinder; Landroid/location/ILocationListener$Stub;->()V Landroid/location/ILocationListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ILocationListener; -Landroid/location/ILocationListener;->onLocationChanged(Landroid/location/Location;)V -Landroid/location/ILocationListener;->onProviderDisabled(Ljava/lang/String;)V -Landroid/location/ILocationListener;->onProviderEnabled(Ljava/lang/String;)V -Landroid/location/ILocationListener;->onStatusChanged(Ljava/lang/String;ILandroid/os/Bundle;)V Landroid/location/ILocationManager$Stub$Proxy;->(Landroid/os/IBinder;)V Landroid/location/ILocationManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ILocationManager; Landroid/location/ILocationManager$Stub;->TRANSACTION_getAllProviders:I -Landroid/location/ILocationManager;->getAllProviders()Ljava/util/List; Landroid/location/INetInitiatedListener$Stub;->()V -Landroid/location/INetInitiatedListener;->sendNiResponse(II)Z Landroid/location/LocationManager$ListenerTransport;->(Landroid/location/LocationManager;Landroid/location/LocationListener;Landroid/os/Looper;)V Landroid/Manifest$permission;->CAPTURE_SECURE_VIDEO_OUTPUT:Ljava/lang/String; Landroid/Manifest$permission;->CAPTURE_VIDEO_OUTPUT:Ljava/lang/String; Landroid/Manifest$permission;->READ_FRAME_BUFFER:Ljava/lang/String; Landroid/media/effect/SingleFilterEffect;->(Landroid/media/effect/EffectContext;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V -Landroid/media/IAudioFocusDispatcher;->dispatchAudioFocusChange(ILjava/lang/String;)V Landroid/media/IAudioRoutesObserver$Stub;->()V Landroid/media/IAudioService$Stub$Proxy;->(Landroid/os/IBinder;)V Landroid/media/IAudioService$Stub;->()V Landroid/media/IAudioService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IAudioService; -Landroid/media/IAudioService;->getStreamMaxVolume(I)I -Landroid/media/IAudioService;->getStreamVolume(I)I -Landroid/media/IAudioService;->setStreamVolume(IIILjava/lang/String;)V -Landroid/media/IAudioService;->startWatchingRoutes(Landroid/media/IAudioRoutesObserver;)Landroid/media/AudioRoutesInfo; Landroid/media/IMediaRouterService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaRouterService; Landroid/media/IMediaScannerListener$Stub;->()V Landroid/media/IMediaScannerService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaScannerService; -Landroid/media/IMediaScannerService;->requestScanFile(Ljava/lang/String;Ljava/lang/String;Landroid/media/IMediaScannerListener;)V -Landroid/media/IMediaScannerService;->scanFile(Ljava/lang/String;Ljava/lang/String;)V -Landroid/media/IRemoteDisplayCallback;->onStateChanged(Landroid/media/RemoteDisplayState;)V Landroid/media/IRingtonePlayer;->play(Landroid/os/IBinder;Landroid/net/Uri;Landroid/media/AudioAttributes;FZ)V Landroid/media/IVolumeController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IVolumeController; Landroid/media/MediaFile;->()V Landroid/media/MediaScanner$MyMediaScannerClient;->(Landroid/media/MediaScanner;)V -Landroid/media/projection/IMediaProjectionManager;->hasProjectionPermission(ILjava/lang/String;)Z Landroid/media/session/ISessionManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/session/ISessionManager; Landroid/media/tv/ITvRemoteProvider$Stub;->()V -Landroid/media/tv/ITvRemoteServiceInput;->clearInputBridge(Landroid/os/IBinder;)V -Landroid/media/tv/ITvRemoteServiceInput;->closeInputBridge(Landroid/os/IBinder;)V -Landroid/media/tv/ITvRemoteServiceInput;->openInputBridge(Landroid/os/IBinder;Ljava/lang/String;III)V -Landroid/media/tv/ITvRemoteServiceInput;->sendKeyDown(Landroid/os/IBinder;I)V -Landroid/media/tv/ITvRemoteServiceInput;->sendKeyUp(Landroid/os/IBinder;I)V -Landroid/media/tv/ITvRemoteServiceInput;->sendPointerDown(Landroid/os/IBinder;III)V -Landroid/media/tv/ITvRemoteServiceInput;->sendPointerSync(Landroid/os/IBinder;)V -Landroid/media/tv/ITvRemoteServiceInput;->sendPointerUp(Landroid/os/IBinder;I)V -Landroid/media/tv/ITvRemoteServiceInput;->sendTimestamp(Landroid/os/IBinder;J)V Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->()V Landroid/net/IConnectivityManager$Stub$Proxy;->(Landroid/os/IBinder;)V Landroid/net/IConnectivityManager$Stub$Proxy;->getActiveLinkProperties()Landroid/net/LinkProperties; diff --git a/core/java/android/database/BulkCursorNative.java b/core/java/android/database/BulkCursorNative.java index d3c11e785d7f9..77a13cf800730 100644 --- a/core/java/android/database/BulkCursorNative.java +++ b/core/java/android/database/BulkCursorNative.java @@ -16,6 +16,7 @@ package android.database; +import android.annotation.UnsupportedAppUsage; import android.os.Binder; import android.os.Bundle; import android.os.IBinder; @@ -138,6 +139,7 @@ public abstract class BulkCursorNative extends Binder implements IBulkCursor final class BulkCursorProxy implements IBulkCursor { + @UnsupportedAppUsage private IBinder mRemote; private Bundle mExtras; diff --git a/core/java/android/hardware/display/IDisplayManager.aidl b/core/java/android/hardware/display/IDisplayManager.aidl index 5ea8bd67ce756..edd20519bb537 100644 --- a/core/java/android/hardware/display/IDisplayManager.aidl +++ b/core/java/android/hardware/display/IDisplayManager.aidl @@ -30,6 +30,7 @@ import android.view.Surface; /** @hide */ interface IDisplayManager { + @UnsupportedAppUsage DisplayInfo getDisplayInfo(int displayId); int[] getDisplayIds(); diff --git a/core/java/android/hardware/input/IInputManager.aidl b/core/java/android/hardware/input/IInputManager.aidl index 64448fd98bf3f..2923bbf14c309 100644 --- a/core/java/android/hardware/input/IInputManager.aidl +++ b/core/java/android/hardware/input/IInputManager.aidl @@ -45,6 +45,7 @@ interface IInputManager { // Injects an input event into the system. To inject into windows owned by other // applications, the caller must have the INJECT_EVENTS permission. + @UnsupportedAppUsage boolean injectInputEvent(in InputEvent ev, int mode); // Calibrate input device position diff --git a/core/java/android/hardware/location/IActivityRecognitionHardwareClient.aidl b/core/java/android/hardware/location/IActivityRecognitionHardwareClient.aidl index 3fe645c59a301..2dfaf601c6f5d 100644 --- a/core/java/android/hardware/location/IActivityRecognitionHardwareClient.aidl +++ b/core/java/android/hardware/location/IActivityRecognitionHardwareClient.aidl @@ -32,5 +32,6 @@ oneway interface IActivityRecognitionHardwareClient { * @param isSupported whether the platform has hardware support for the feature * @param instance the available instance to provide access to the feature */ + @UnsupportedAppUsage void onAvailabilityChanged(in boolean isSupported, in IActivityRecognitionHardware instance); } diff --git a/location/java/android/location/IGeocodeProvider.aidl b/location/java/android/location/IGeocodeProvider.aidl index aaa70c74778aa..7eaf7b84c83ae 100644 --- a/location/java/android/location/IGeocodeProvider.aidl +++ b/location/java/android/location/IGeocodeProvider.aidl @@ -26,9 +26,11 @@ import android.location.GeocoderParams; */ interface IGeocodeProvider { + @UnsupportedAppUsage String getFromLocation(double latitude, double longitude, int maxResults, in GeocoderParams params, out List
addrs); + @UnsupportedAppUsage String getFromLocationName(String locationName, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude, int maxResults, diff --git a/location/java/android/location/IGeofenceProvider.aidl b/location/java/android/location/IGeofenceProvider.aidl index d4ff0dd70bf26..426ebef86b961 100644 --- a/location/java/android/location/IGeofenceProvider.aidl +++ b/location/java/android/location/IGeofenceProvider.aidl @@ -24,5 +24,6 @@ import android.hardware.location.IGeofenceHardware; * {@hide} */ oneway interface IGeofenceProvider { + @UnsupportedAppUsage void setGeofenceHardware(in IGeofenceHardware proxy); } diff --git a/location/java/android/location/ILocationListener.aidl b/location/java/android/location/ILocationListener.aidl index 180183e776687..ec1134566b24f 100644 --- a/location/java/android/location/ILocationListener.aidl +++ b/location/java/android/location/ILocationListener.aidl @@ -25,10 +25,14 @@ import android.os.Bundle; */ oneway interface ILocationListener { + @UnsupportedAppUsage void onLocationChanged(in Location location); + @UnsupportedAppUsage void onProviderEnabled(String provider); + @UnsupportedAppUsage void onProviderDisabled(String provider); // --- deprecated --- + @UnsupportedAppUsage void onStatusChanged(String provider, int status, in Bundle extras); } diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl index 57a0a725fb410..bb75c77f7e64f 100644 --- a/location/java/android/location/ILocationManager.aidl +++ b/location/java/android/location/ILocationManager.aidl @@ -85,6 +85,7 @@ interface ILocationManager boolean stopGnssBatch(); boolean injectLocation(in Location location); + @UnsupportedAppUsage List getAllProviders(); List getProviders(in Criteria criteria, boolean enabledOnly); String getBestProvider(in Criteria criteria, boolean enabledOnly); diff --git a/location/java/android/location/INetInitiatedListener.aidl b/location/java/android/location/INetInitiatedListener.aidl index fc64dd67c1166..a9e9136d33175 100644 --- a/location/java/android/location/INetInitiatedListener.aidl +++ b/location/java/android/location/INetInitiatedListener.aidl @@ -22,5 +22,6 @@ package android.location; */ interface INetInitiatedListener { + @UnsupportedAppUsage boolean sendNiResponse(int notifId, int userResponse); } diff --git a/media/java/android/media/IAudioFocusDispatcher.aidl b/media/java/android/media/IAudioFocusDispatcher.aidl index 3b33c5b7a46a0..e3512fa58a7d0 100644 --- a/media/java/android/media/IAudioFocusDispatcher.aidl +++ b/media/java/android/media/IAudioFocusDispatcher.aidl @@ -23,6 +23,7 @@ package android.media; */ oneway interface IAudioFocusDispatcher { + @UnsupportedAppUsage void dispatchAudioFocusChange(int focusChange, String clientId); void dispatchFocusResultFromExtPolicy(int requestResult, String clientId); diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl index 571e67e1ccfcd..cf6d095af70ef 100644 --- a/media/java/android/media/IAudioService.aidl +++ b/media/java/android/media/IAudioService.aidl @@ -64,6 +64,7 @@ interface IAudioService { void adjustStreamVolume(int streamType, int direction, int flags, String callingPackage); + @UnsupportedAppUsage void setStreamVolume(int streamType, int index, int flags, String callingPackage); boolean isStreamMute(int streamType); @@ -74,10 +75,12 @@ interface IAudioService { void setMasterMute(boolean mute, int flags, String callingPackage, int userId); + @UnsupportedAppUsage int getStreamVolume(int streamType); int getStreamMinVolume(int streamType); + @UnsupportedAppUsage int getStreamMaxVolume(int streamType); int getLastAudibleStreamVolume(int streamType); @@ -157,6 +160,7 @@ interface IAudioService { int handleBluetoothA2dpActiveDeviceChange(in BluetoothDevice device, int state, int profile, boolean suppressNoisyIntent, int a2dpVolume); + @UnsupportedAppUsage AudioRoutesInfo startWatchingRoutes(in IAudioRoutesObserver observer); boolean isCameraSoundForced(); diff --git a/media/java/android/media/IMediaScannerService.aidl b/media/java/android/media/IMediaScannerService.aidl index c5316461ef1ff..24b5595510f6f 100644 --- a/media/java/android/media/IMediaScannerService.aidl +++ b/media/java/android/media/IMediaScannerService.aidl @@ -31,6 +31,7 @@ interface IMediaScannerService * @param listener an optional IMediaScannerListener. * If specified, the caller will be notified when scanning is complete via the listener. */ + @UnsupportedAppUsage void requestScanFile(String path, String mimeType, in IMediaScannerListener listener); /** @@ -40,5 +41,6 @@ interface IMediaScannerService * @param mimeType an optional mimeType for the file. * If mimeType is null, then the mimeType will be inferred from the file extension. */ + @UnsupportedAppUsage void scanFile(String path, String mimeType); } diff --git a/media/java/android/media/IRemoteDisplayCallback.aidl b/media/java/android/media/IRemoteDisplayCallback.aidl index 19cf070aa08ec..584417d651214 100644 --- a/media/java/android/media/IRemoteDisplayCallback.aidl +++ b/media/java/android/media/IRemoteDisplayCallback.aidl @@ -22,5 +22,6 @@ import android.media.RemoteDisplayState; * {@hide} */ oneway interface IRemoteDisplayCallback { + @UnsupportedAppUsage void onStateChanged(in RemoteDisplayState state); } diff --git a/media/java/android/media/projection/IMediaProjectionManager.aidl b/media/java/android/media/projection/IMediaProjectionManager.aidl index 7e10c51fc5cd9..d190fcec6c8c8 100644 --- a/media/java/android/media/projection/IMediaProjectionManager.aidl +++ b/media/java/android/media/projection/IMediaProjectionManager.aidl @@ -24,6 +24,7 @@ import android.os.IBinder; /** {@hide} */ interface IMediaProjectionManager { + @UnsupportedAppUsage boolean hasProjectionPermission(int uid, String packageName); IMediaProjection createProjection(int uid, String packageName, int type, boolean permanentGrant); diff --git a/media/java/android/media/tv/ITvRemoteServiceInput.aidl b/media/java/android/media/tv/ITvRemoteServiceInput.aidl index df39299c0f93f..a0b6c9bfc8d87 100644 --- a/media/java/android/media/tv/ITvRemoteServiceInput.aidl +++ b/media/java/android/media/tv/ITvRemoteServiceInput.aidl @@ -21,13 +21,22 @@ package android.media.tv; */ oneway interface ITvRemoteServiceInput { // InputBridge related + @UnsupportedAppUsage void openInputBridge(IBinder token, String name, int width, int height, int maxPointers); + @UnsupportedAppUsage void closeInputBridge(IBinder token); + @UnsupportedAppUsage void clearInputBridge(IBinder token); + @UnsupportedAppUsage void sendTimestamp(IBinder token, long timestamp); + @UnsupportedAppUsage void sendKeyDown(IBinder token, int keyCode); + @UnsupportedAppUsage void sendKeyUp(IBinder token, int keyCode); + @UnsupportedAppUsage void sendPointerDown(IBinder token, int pointerId, int x, int y); + @UnsupportedAppUsage void sendPointerUp(IBinder token, int pointerId); + @UnsupportedAppUsage void sendPointerSync(IBinder token); } \ No newline at end of file