Add @UnsupportedAppUsage annotations
For packages:
android.hardware.usb
android.hardware.soundtrigger
android.hardware.radio
android.hardware.location
android.hardware.input
android.hardware.hdmi
android.hardware.fingerprint
android.hardware.display
android.hardware.cas.V1_0
android.hardware.camera2.utils
android.hardware.camera2.params
android.hardware.camera2.marshal.impl
android.hardware.camera2.marshal
android.hardware.camera2.legacy
android.hardware.camera2.impl
android.hardware.camera2.dispatch
android.hardware.camera2
android.hardware
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: I046df307d1065a9692e4e7259c59a93ee8f458ef
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 22e1f45..8e96f56 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -21,6 +21,7 @@
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.app.AppOpsManager;
import android.content.Context;
@@ -164,6 +165,7 @@
private static final int CAMERA_MSG_PREVIEW_METADATA = 0x400;
private static final int CAMERA_MSG_FOCUS_MOVE = 0x800;
+ @UnsupportedAppUsage
private long mNativeContext; // accessed by native methods
private EventHandler mEventHandler;
private ShutterCallback mShutterCallback;
@@ -236,6 +238,7 @@
* Camera HAL device API version 1.0
* @hide
*/
+ @UnsupportedAppUsage
public static final int CAMERA_HAL_API_VERSION_1_0 = 0x100;
/**
@@ -451,6 +454,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static Camera openLegacy(int cameraId, int halVersion) {
if (halVersion < CAMERA_HAL_API_VERSION_1_0) {
throw new IllegalArgumentException("Invalid HAL version " + halVersion);
@@ -604,6 +608,7 @@
release();
}
+ @UnsupportedAppUsage
private native final int native_setup(Object camera_this, int cameraId, int halVersion,
String packageName);
@@ -716,6 +721,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public native final void setPreviewSurface(Surface surface) throws IOException;
/**
@@ -839,6 +845,7 @@
* FIXME: Unhide before release
* @hide
*/
+ @UnsupportedAppUsage
public native final boolean previewEnabled();
/**
@@ -1012,11 +1019,13 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public final void addRawImageCallbackBuffer(byte[] callbackBuffer)
{
addCallbackBuffer(callbackBuffer, CAMERA_MSG_RAW_IMAGE);
}
+ @UnsupportedAppUsage
private final void addCallbackBuffer(byte[] callbackBuffer, int msgType)
{
// CAMERA_MSG_VIDEO_FRAME may be allowed in the future.
@@ -1263,6 +1272,7 @@
}
}
+ @UnsupportedAppUsage
private static void postEventFromNative(Object camera_ref,
int what, int arg1, int arg2, Object obj)
{
@@ -2075,7 +2085,9 @@
mDetailedErrorCallback = cb;
}
+ @UnsupportedAppUsage
private native final void native_setParameters(String params);
+ @UnsupportedAppUsage
private native final String native_getParameters();
/**
@@ -2124,6 +2136,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static Parameters getEmptyParameters() {
Camera camera = new Camera();
return camera.new Parameters();
@@ -2658,6 +2671,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void copyFrom(Parameters other) {
if (other == null) {
throw new NullPointerException("other must not be null");
@@ -2689,6 +2703,7 @@
* @deprecated
*/
@Deprecated
+ @UnsupportedAppUsage
public void dump() {
Log.e(TAG, "dump: size=" + mMap.size());
for (String k : mMap.keySet()) {
@@ -4407,6 +4422,7 @@
// Splits a comma delimited string to an ArrayList of Area objects.
// Example string: "(-10,-10,0,0,300),(0,0,10,10,700)". Return null if
// the passing string is null or the size is 0 or (0,0,0,0,0).
+ @UnsupportedAppUsage
private ArrayList<Area> splitArea(String str) {
if (str == null || str.charAt(0) != '('
|| str.charAt(str.length() - 1) != ')') {
diff --git a/core/java/android/hardware/HardwareBuffer.java b/core/java/android/hardware/HardwareBuffer.java
index 9aa3f40..c17aabb 100644
--- a/core/java/android/hardware/HardwareBuffer.java
+++ b/core/java/android/hardware/HardwareBuffer.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.LongDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -89,6 +90,7 @@
public static final int S_UI8 = 0x35;
// Note: do not rename, this field is used by native code
+ @UnsupportedAppUsage
private long mNativeObject;
// Invoked on destruction
@@ -182,6 +184,7 @@
* Private use only. See {@link #create(int, int, int, int, long)}. May also be
* called from JNI using an already allocated native <code>HardwareBuffer</code>.
*/
+ @UnsupportedAppUsage
private HardwareBuffer(long nativeObject) {
mNativeObject = nativeObject;
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index 7297426..4aa6fab 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -18,6 +18,7 @@
package android.hardware;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Build;
/**
@@ -504,6 +505,7 @@
*
* @hide Expected to be used internally for always on display.
*/
+ @UnsupportedAppUsage
public static final int TYPE_PICK_UP_GESTURE = 25;
/**
@@ -543,6 +545,7 @@
* @hide Expected to be used internally for auto-rotate and speaker rotation.
*
*/
+ @UnsupportedAppUsage
public static final int TYPE_DEVICE_ORIENTATION = 27;
/**
@@ -891,6 +894,7 @@
private String mStringType;
private String mRequiredPermission;
private int mMaxDelay;
+ @UnsupportedAppUsage
private int mFlags;
private int mId;
@@ -1014,6 +1018,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getHandle() {
return mHandle;
}
diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java
index bbd04a3..8c910b2 100644
--- a/core/java/android/hardware/SensorEvent.java
+++ b/core/java/android/hardware/SensorEvent.java
@@ -16,6 +16,8 @@
package android.hardware;
+import android.annotation.UnsupportedAppUsage;
+
/**
* This class represents a {@link android.hardware.Sensor Sensor} event and
* holds information such as the sensor's type, the time-stamp, accuracy and of
@@ -649,6 +651,7 @@
*/
public long timestamp;
+ @UnsupportedAppUsage
SensorEvent(int valueSize) {
values = new float[valueSize];
}
diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java
index cbddc91..3250428 100644
--- a/core/java/android/hardware/SensorManager.java
+++ b/core/java/android/hardware/SensorManager.java
@@ -18,6 +18,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
@@ -368,6 +369,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public SensorManager() {
}
diff --git a/core/java/android/hardware/SerialManager.java b/core/java/android/hardware/SerialManager.java
index 610f6a5..571c3cc 100644
--- a/core/java/android/hardware/SerialManager.java
+++ b/core/java/android/hardware/SerialManager.java
@@ -17,6 +17,7 @@
package android.hardware;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
@@ -46,6 +47,7 @@
*
* @return names of available serial ports
*/
+ @UnsupportedAppUsage
public String[] getSerialPorts() {
try {
return mService.getSerialPorts();
@@ -65,6 +67,7 @@
* @param speed at which to open the serial port
* @return the serial port
*/
+ @UnsupportedAppUsage
public SerialPort openSerialPort(String name, int speed) throws IOException {
try {
ParcelFileDescriptor pfd = mService.openSerialPort(name);
diff --git a/core/java/android/hardware/SerialPort.java b/core/java/android/hardware/SerialPort.java
index 5d83d9c..78ac3c0 100644
--- a/core/java/android/hardware/SerialPort.java
+++ b/core/java/android/hardware/SerialPort.java
@@ -16,6 +16,7 @@
package android.hardware;
+import android.annotation.UnsupportedAppUsage;
import android.os.ParcelFileDescriptor;
import java.io.FileDescriptor;
@@ -31,6 +32,7 @@
private static final String TAG = "SerialPort";
// used by the JNI code
+ @UnsupportedAppUsage
private int mNativeContext;
private final String mName;
private ParcelFileDescriptor mFileDescriptor;
@@ -59,6 +61,7 @@
/**
* Closes the serial port
*/
+ @UnsupportedAppUsage
public void close() throws IOException {
if (mFileDescriptor != null) {
mFileDescriptor.close();
@@ -102,6 +105,7 @@
* @param buffer to write
* @param length number of bytes to write
*/
+ @UnsupportedAppUsage
public void write(ByteBuffer buffer, int length) throws IOException {
if (buffer.isDirect()) {
native_write_direct(buffer, length);
diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java
index 1174cb6..7abfabf 100644
--- a/core/java/android/hardware/SystemSensorManager.java
+++ b/core/java/android/hardware/SystemSensorManager.java
@@ -16,6 +16,7 @@
package android.hardware;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -758,10 +759,13 @@
if (sensor == null) throw new NullPointerException();
return nativeDisableSensor(mNativeSensorEventQueue, sensor.getHandle());
}
+ @UnsupportedAppUsage
protected abstract void dispatchSensorEvent(int handle, float[] values, int accuracy,
long timestamp);
+ @UnsupportedAppUsage
protected abstract void dispatchFlushCompleteEvent(int handle);
+ @UnsupportedAppUsage
protected void dispatchAdditionalInfoEvent(
int handle, int type, int serial, float[] floatValues, int[] intValues) {
// default implementation is do nothing
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index d027fd9..f7d1b8d 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.PublicKey;
import android.hardware.camera2.impl.SyntheticKey;
@@ -72,6 +73,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type, long vendorId) {
mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
}
@@ -90,6 +92,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type) {
mKey = new CameraMetadataNative.Key<T>(name, type);
}
@@ -99,6 +102,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, TypeReference<T> typeReference) {
mKey = new CameraMetadataNative.Key<T>(name, typeReference);
}
@@ -168,6 +172,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CameraMetadataNative.Key<T> getNativeKey() {
return mKey;
}
@@ -180,6 +185,7 @@
}
}
+ @UnsupportedAppUsage
private final CameraMetadataNative mProperties;
private List<CameraCharacteristics.Key<?>> mKeys;
private List<CaptureRequest.Key<?>> mAvailableRequestKeys;
@@ -767,6 +773,7 @@
* @see CaptureRequest#CONTROL_AWB_REGIONS
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> CONTROL_MAX_REGIONS =
new Key<int[]>("android.control.maxRegions", int[].class);
@@ -872,6 +879,7 @@
* @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class);
@@ -1140,6 +1148,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
@@ -1491,6 +1500,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
new Key<Byte>("android.quirks.usePartialResult", byte.class);
@@ -1528,6 +1538,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
@@ -1767,6 +1778,7 @@
* @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
new Key<int[]>("android.request.availableRequestKeys", int[].class);
@@ -1792,6 +1804,7 @@
* @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
new Key<int[]>("android.request.availableResultKeys", int[].class);
@@ -1804,6 +1817,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
@@ -1850,6 +1864,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS =
new Key<int[]>("android.request.availableSessionKeys", int[].class);
@@ -1870,6 +1885,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =
new Key<int[]>("android.request.availablePhysicalCameraRequestKeys", int[].class);
@@ -1885,6 +1901,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
new Key<int[]>("android.scaler.availableFormats", int[].class);
@@ -1907,6 +1924,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
@@ -1925,6 +1943,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
@@ -1966,6 +1985,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
@@ -1990,6 +2010,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
@@ -2045,6 +2066,7 @@
* @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
@@ -2137,6 +2159,7 @@
* @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
@@ -2159,6 +2182,7 @@
* @see CaptureRequest#SENSOR_FRAME_DURATION
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
@@ -2227,6 +2251,7 @@
* @see CaptureRequest#SENSOR_FRAME_DURATION
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
@@ -3134,6 +3159,7 @@
* @see #LED_AVAILABLE_LEDS_TRANSMIT
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> LED_AVAILABLE_LEDS =
new Key<int[]>("android.led.availableLeds", int[].class);
@@ -3320,6 +3346,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =
new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
@@ -3346,6 +3373,7 @@
* @see CaptureRequest#SENSOR_FRAME_DURATION
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =
new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
@@ -3369,6 +3397,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =
new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
@@ -3412,6 +3441,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<byte[]> LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =
new Key<byte[]>("android.logicalMultiCamera.physicalIds", byte[].class);
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 0c3fe77..47bef12 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.PublicKey;
import android.hardware.camera2.impl.SyntheticKey;
@@ -107,6 +108,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type, long vendorId) {
mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
}
@@ -116,6 +118,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type) {
mKey = new CameraMetadataNative.Key<T>(name, type);
}
@@ -125,6 +128,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, TypeReference<T> typeReference) {
mKey = new CameraMetadataNative.Key<T>(name, typeReference);
}
@@ -194,6 +198,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CameraMetadataNative.Key<T> getNativeKey() {
return mKey;
}
@@ -223,6 +228,7 @@
private static final ArraySet<Surface> mEmptySurfaceSet = new ArraySet<Surface>();
private String mLogicalCameraId;
+ @UnsupportedAppUsage
private CameraMetadataNative mLogicalCameraSettings;
private final HashMap<String, CameraMetadataNative> mPhysicalCameraSettings =
new HashMap<String, CameraMetadataNative>();
@@ -598,6 +604,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public Collection<Surface> getTargets() {
return Collections.unmodifiableCollection(mSurfaceSet);
}
@@ -886,6 +893,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setPartOfCHSRequestList(boolean partOfCHSList) {
mRequest.mIsPartOfCHSRequestList = partOfCHSList;
}
@@ -2132,6 +2140,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<double[]> JPEG_GPS_COORDINATES =
new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
@@ -2142,6 +2151,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
@@ -2152,6 +2162,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Long> JPEG_GPS_TIMESTAMP =
new Key<Long>("android.jpeg.gpsTimestamp", long.class);
@@ -2487,6 +2498,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Integer> REQUEST_ID =
new Key<Integer>("android.request.id", int.class);
@@ -2902,6 +2914,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_BLUE =
new Key<float[]>("android.tonemap.curveBlue", float[].class);
@@ -2919,6 +2932,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_GREEN =
new Key<float[]>("android.tonemap.curveGreen", float[].class);
@@ -2981,6 +2995,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_RED =
new Key<float[]>("android.tonemap.curveRed", float[].class);
@@ -3155,6 +3170,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Boolean> LED_TRANSMIT =
new Key<Boolean>("android.led.transmit", boolean.class);
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 5836288..007794f 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.CaptureResultExtras;
import android.hardware.camera2.impl.PublicKey;
@@ -78,6 +79,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type, long vendorId) {
mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
}
@@ -96,6 +98,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type) {
mKey = new CameraMetadataNative.Key<T>(name, type);
}
@@ -105,6 +108,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, TypeReference<T> typeReference) {
mKey = new CameraMetadataNative.Key<T>(name, typeReference);
}
@@ -174,6 +178,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CameraMetadataNative.Key<T> getNativeKey() {
return mKey;
}
@@ -184,6 +189,7 @@
}
}
+ @UnsupportedAppUsage
private final CameraMetadataNative mResults;
private final CaptureRequest mRequest;
private final int mSequenceId;
@@ -2458,6 +2464,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<double[]> JPEG_GPS_COORDINATES =
new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
@@ -2468,6 +2475,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
@@ -2478,6 +2486,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Long> JPEG_GPS_TIMESTAMP =
new Key<Long>("android.jpeg.gpsTimestamp", long.class);
@@ -3116,6 +3125,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
new Key<Boolean>("android.quirks.partialResult", boolean.class);
@@ -3134,6 +3144,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<Integer> REQUEST_FRAME_COUNT =
new Key<Integer>("android.request.frameCount", int.class);
@@ -3147,6 +3158,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Integer> REQUEST_ID =
new Key<Integer>("android.request.id", int.class);
@@ -3708,6 +3720,7 @@
* @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> STATISTICS_FACE_IDS =
new Key<int[]>("android.statistics.faceIds", int[].class);
@@ -3734,6 +3747,7 @@
* @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
new Key<int[]>("android.statistics.faceLandmarks", int[].class);
@@ -3760,6 +3774,7 @@
* @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class);
@@ -3774,6 +3789,7 @@
* @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<byte[]> STATISTICS_FACE_SCORES =
new Key<byte[]>("android.statistics.faceScores", byte[].class);
@@ -3933,6 +3949,7 @@
* @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
new Key<float[]>("android.statistics.lensShadingMap", float[].class);
@@ -3956,6 +3973,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
new Key<float[]>("android.statistics.predictedColorGains", float[].class);
@@ -3982,6 +4000,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
@@ -4124,6 +4143,7 @@
* @see CaptureResult#SENSOR_TIMESTAMP
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<long[]> STATISTICS_OIS_TIMESTAMPS =
new Key<long[]>("android.statistics.oisTimestamps", long[].class);
@@ -4143,6 +4163,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> STATISTICS_OIS_X_SHIFTS =
new Key<float[]>("android.statistics.oisXShifts", float[].class);
@@ -4162,6 +4183,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> STATISTICS_OIS_Y_SHIFTS =
new Key<float[]>("android.statistics.oisYShifts", float[].class);
@@ -4202,6 +4224,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_BLUE =
new Key<float[]>("android.tonemap.curveBlue", float[].class);
@@ -4219,6 +4242,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_GREEN =
new Key<float[]>("android.tonemap.curveGreen", float[].class);
@@ -4281,6 +4305,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_RED =
new Key<float[]>("android.tonemap.curveRed", float[].class);
@@ -4455,6 +4480,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Boolean> LED_TRANSMIT =
new Key<Boolean>("android.led.transmit", boolean.class);
@@ -4544,6 +4570,7 @@
* @see #SYNC_FRAME_NUMBER_UNKNOWN
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Long> SYNC_FRAME_NUMBER =
new Key<Long>("android.sync.frameNumber", long.class);
diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
index 86bd30c..0610d7a 100644
--- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
+++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
@@ -16,6 +16,7 @@
package android.hardware.camera2.impl;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.ImageFormat;
import android.graphics.Point;
import android.graphics.Rect;
@@ -231,6 +232,7 @@
*
* @return The tag numeric value corresponding to the string
*/
+ @UnsupportedAppUsage
public final int getTag() {
if (!mHasTag) {
mTag = CameraMetadataNative.getTag(mName, mVendorId);
@@ -1188,6 +1190,7 @@
return true;
}
+ @UnsupportedAppUsage
private long mMetadataPtr; // native CameraMetadata*
private native long nativeAllocate();
@@ -1202,13 +1205,16 @@
private native synchronized boolean nativeIsEmpty();
private native synchronized int nativeGetEntryCount();
+ @UnsupportedAppUsage
private native synchronized byte[] nativeReadValues(int tag);
private native synchronized void nativeWriteValues(int tag, byte[] src);
private native synchronized void nativeDump() throws IOException; // dump to ALOGD
private native synchronized ArrayList nativeGetAllVendorKeys(Class keyClass);
+ @UnsupportedAppUsage
private native synchronized int nativeGetTagFromKeyLocal(String keyName)
throws IllegalArgumentException;
+ @UnsupportedAppUsage
private native synchronized int nativeGetTypeFromTagLocal(int tag)
throws IllegalArgumentException;
private static native int nativeGetTagFromKey(String keyName, long vendorId)
diff --git a/core/java/android/hardware/camera2/utils/SurfaceUtils.java b/core/java/android/hardware/camera2/utils/SurfaceUtils.java
index 9247844..d3c4505 100644
--- a/core/java/android/hardware/camera2/utils/SurfaceUtils.java
+++ b/core/java/android/hardware/camera2/utils/SurfaceUtils.java
@@ -16,6 +16,7 @@
package android.hardware.camera2.utils;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.ImageFormat;
import android.hardware.camera2.legacy.LegacyCameraDevice;
import android.hardware.camera2.legacy.LegacyExceptionUtils.BufferQueueAbandonedException;
@@ -77,6 +78,7 @@
*
* @throws IllegalArgumentException if the surface is already abandoned.
*/
+ @UnsupportedAppUsage
public static Size getSurfaceSize(Surface surface) {
try {
return LegacyCameraDevice.getSurfaceSize(surface);
diff --git a/core/java/android/hardware/camera2/utils/TypeReference.java b/core/java/android/hardware/camera2/utils/TypeReference.java
index 24ce124..d9ba31b 100644
--- a/core/java/android/hardware/camera2/utils/TypeReference.java
+++ b/core/java/android/hardware/camera2/utils/TypeReference.java
@@ -16,6 +16,7 @@
package android.hardware.camera2.utils;
+import android.annotation.UnsupportedAppUsage;
import java.lang.reflect.Array;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
@@ -55,6 +56,7 @@
*
* @see TypeReference
*/
+ @UnsupportedAppUsage
protected TypeReference() {
ParameterizedType thisType = (ParameterizedType)getClass().getGenericSuperclass();
@@ -136,6 +138,7 @@
*
* @throws IllegalArgumentException if {@code type} had any type variables
*/
+ @UnsupportedAppUsage
public static TypeReference<?> createSpecializedTypeReference(Type type) {
return new SpecializedBaseTypeReference(type);
}
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index b182fa2..e700cac 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -23,6 +23,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.KeyguardManager;
import android.content.Context;
import android.graphics.Point;
@@ -62,6 +63,7 @@
* </p>
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACTION_WIFI_DISPLAY_STATUS_CHANGED =
"android.hardware.display.action.WIFI_DISPLAY_STATUS_CHANGED";
@@ -69,6 +71,7 @@
* Contains a {@link WifiDisplayStatus} object.
* @hide
*/
+ @UnsupportedAppUsage
public static final String EXTRA_WIFI_DISPLAY_STATUS =
"android.hardware.display.extra.WIFI_DISPLAY_STATUS";
@@ -437,6 +440,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void startWifiDisplayScan() {
mGlobal.startWifiDisplayScan();
}
@@ -449,6 +453,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void stopWifiDisplayScan() {
mGlobal.stopWifiDisplayScan();
}
@@ -466,16 +471,19 @@
* @param deviceAddress The MAC address of the device to which we should connect.
* @hide
*/
+ @UnsupportedAppUsage
public void connectWifiDisplay(String deviceAddress) {
mGlobal.connectWifiDisplay(deviceAddress);
}
/** @hide */
+ @UnsupportedAppUsage
public void pauseWifiDisplay() {
mGlobal.pauseWifiDisplay();
}
/** @hide */
+ @UnsupportedAppUsage
public void resumeWifiDisplay() {
mGlobal.resumeWifiDisplay();
}
@@ -485,6 +493,7 @@
* The results are sent as a {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED} broadcast.
* @hide
*/
+ @UnsupportedAppUsage
public void disconnectWifiDisplay() {
mGlobal.disconnectWifiDisplay();
}
@@ -504,6 +513,7 @@
* or empty if no alias should be used.
* @hide
*/
+ @UnsupportedAppUsage
public void renameWifiDisplay(String deviceAddress, String alias) {
mGlobal.renameWifiDisplay(deviceAddress, alias);
}
@@ -519,6 +529,7 @@
* @param deviceAddress The MAC address of the device to forget.
* @hide
*/
+ @UnsupportedAppUsage
public void forgetWifiDisplay(String deviceAddress) {
mGlobal.forgetWifiDisplay(deviceAddress);
}
@@ -531,6 +542,7 @@
* @return The current Wifi display status.
* @hide
*/
+ @UnsupportedAppUsage
public WifiDisplayStatus getWifiDisplayStatus() {
return mGlobal.getWifiDisplayStatus();
}
diff --git a/core/java/android/hardware/display/DisplayManagerGlobal.java b/core/java/android/hardware/display/DisplayManagerGlobal.java
index d968a3e..7304ab4 100644
--- a/core/java/android/hardware/display/DisplayManagerGlobal.java
+++ b/core/java/android/hardware/display/DisplayManagerGlobal.java
@@ -16,6 +16,7 @@
package android.hardware.display;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.ParceledListSlice;
import android.content.res.Resources;
@@ -66,10 +67,12 @@
public static final int EVENT_DISPLAY_CHANGED = 2;
public static final int EVENT_DISPLAY_REMOVED = 3;
+ @UnsupportedAppUsage
private static DisplayManagerGlobal sInstance;
private final Object mLock = new Object();
+ @UnsupportedAppUsage
private final IDisplayManager mDm;
private DisplayManagerCallback mCallback;
@@ -91,6 +94,7 @@
* @return The display manager instance, may be null early in system startup
* before the display manager has been fully initialized.
*/
+ @UnsupportedAppUsage
public static DisplayManagerGlobal getInstance() {
synchronized (DisplayManagerGlobal.class) {
if (sInstance == null) {
@@ -110,6 +114,7 @@
* @return Information about the specified display, or null if it does not exist.
* This object belongs to an internal cache and should be treated as if it were immutable.
*/
+ @UnsupportedAppUsage
public DisplayInfo getDisplayInfo(int displayId) {
try {
synchronized (mLock) {
@@ -146,6 +151,7 @@
*
* @return An array containing all display ids.
*/
+ @UnsupportedAppUsage
public int[] getDisplayIds() {
try {
synchronized (mLock) {
@@ -209,6 +215,7 @@
* @param displayId The logical display id.
* @return The display object, or null if there is no display with the given id.
*/
+ @UnsupportedAppUsage
public Display getRealDisplay(int displayId) {
return getCompatibleDisplay(displayId, DisplayAdjustments.DEFAULT_DISPLAY_ADJUSTMENTS);
}
@@ -337,6 +344,7 @@
}
}
+ @UnsupportedAppUsage
public void disconnectWifiDisplay() {
try {
mDm.disconnectWifiDisplay();
@@ -369,6 +377,7 @@
}
}
+ @UnsupportedAppUsage
public WifiDisplayStatus getWifiDisplayStatus() {
try {
return mDm.getWifiDisplayStatus();
diff --git a/core/java/android/hardware/display/WifiDisplay.java b/core/java/android/hardware/display/WifiDisplay.java
index bb32c19..12486e8 100644
--- a/core/java/android/hardware/display/WifiDisplay.java
+++ b/core/java/android/hardware/display/WifiDisplay.java
@@ -16,6 +16,7 @@
package android.hardware.display;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -76,6 +77,7 @@
/**
* Gets the MAC address of the Wifi display device.
*/
+ @UnsupportedAppUsage
public String getDeviceAddress() {
return mDeviceAddress;
}
@@ -83,6 +85,7 @@
/**
* Gets the name of the Wifi display device.
*/
+ @UnsupportedAppUsage
public String getDeviceName() {
return mDeviceName;
}
@@ -94,6 +97,7 @@
* provided by the user when renaming the device.
* </p>
*/
+ @UnsupportedAppUsage
public String getDeviceAlias() {
return mDeviceAlias;
}
@@ -101,6 +105,7 @@
/**
* Returns true if device is available, false otherwise.
*/
+ @UnsupportedAppUsage
public boolean isAvailable() {
return mIsAvailable;
}
@@ -108,6 +113,7 @@
/**
* Returns true if device can be connected to (not in use), false otherwise.
*/
+ @UnsupportedAppUsage
public boolean canConnect() {
return mCanConnect;
}
@@ -115,6 +121,7 @@
/**
* Returns true if device has been remembered, false otherwise.
*/
+ @UnsupportedAppUsage
public boolean isRemembered() {
return mIsRemembered;
}
@@ -136,6 +143,7 @@
* Returns true if the two displays have the same identity (address, name and alias).
* This method does not compare the current status of the displays.
*/
+ @UnsupportedAppUsage
public boolean equals(WifiDisplay other) {
return other != null
&& mDeviceAddress.equals(other.mDeviceAddress)
diff --git a/core/java/android/hardware/display/WifiDisplayStatus.java b/core/java/android/hardware/display/WifiDisplayStatus.java
index b645662..c267834 100644
--- a/core/java/android/hardware/display/WifiDisplayStatus.java
+++ b/core/java/android/hardware/display/WifiDisplayStatus.java
@@ -16,6 +16,7 @@
package android.hardware.display;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -34,7 +35,9 @@
private final int mFeatureState;
private final int mScanState;
private final int mActiveDisplayState;
+ @UnsupportedAppUsage
private final WifiDisplay mActiveDisplay;
+ @UnsupportedAppUsage
private final WifiDisplay[] mDisplays;
/** Session info needed for Miracast Certification */
@@ -47,18 +50,23 @@
/** Feature state: Wifi display is turned off in settings. */
public static final int FEATURE_STATE_OFF = 2;
/** Feature state: Wifi display is turned on in settings. */
+ @UnsupportedAppUsage
public static final int FEATURE_STATE_ON = 3;
/** Scan state: Not currently scanning. */
+ @UnsupportedAppUsage
public static final int SCAN_STATE_NOT_SCANNING = 0;
/** Scan state: Currently scanning. */
public static final int SCAN_STATE_SCANNING = 1;
/** Display state: Not connected. */
+ @UnsupportedAppUsage
public static final int DISPLAY_STATE_NOT_CONNECTED = 0;
/** Display state: Connecting to active display. */
+ @UnsupportedAppUsage
public static final int DISPLAY_STATE_CONNECTING = 1;
/** Display state: Connected to active display. */
+ @UnsupportedAppUsage
public static final int DISPLAY_STATE_CONNECTED = 2;
public static final Creator<WifiDisplayStatus> CREATOR = new Creator<WifiDisplayStatus>() {
@@ -117,6 +125,7 @@
* connecting to displays have been met.
* </p>
*/
+ @UnsupportedAppUsage
public int getFeatureState() {
return mFeatureState;
}
@@ -126,6 +135,7 @@
*
* @return One of: {@link #SCAN_STATE_NOT_SCANNING} or {@link #SCAN_STATE_SCANNING}.
*/
+ @UnsupportedAppUsage
public int getScanState() {
return mScanState;
}
@@ -136,6 +146,7 @@
* @return One of: {@link #DISPLAY_STATE_NOT_CONNECTED}, {@link #DISPLAY_STATE_CONNECTING},
* or {@link #DISPLAY_STATE_CONNECTED}.
*/
+ @UnsupportedAppUsage
public int getActiveDisplayState() {
return mActiveDisplayState;
}
@@ -144,6 +155,7 @@
* Gets the Wifi display that is currently active. It may be connecting or
* connected.
*/
+ @UnsupportedAppUsage
public WifiDisplay getActiveDisplay() {
return mActiveDisplay;
}
@@ -153,6 +165,7 @@
* Wifi displays as reported by the most recent scan, and all remembered
* Wifi displays (not necessarily available at the time).
*/
+ @UnsupportedAppUsage
public WifiDisplay[] getDisplays() {
return mDisplays;
}
diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java
index 9192652..bf5ab90 100644
--- a/core/java/android/hardware/fingerprint/FingerprintManager.java
+++ b/core/java/android/hardware/fingerprint/FingerprintManager.java
@@ -27,6 +27,7 @@
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -189,6 +190,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Fingerprint getFingerprint() { return mFingerprint; }
/**
@@ -718,6 +720,7 @@
* @hide
*/
@RequiresPermission(USE_FINGERPRINT)
+ @UnsupportedAppUsage
public List<Fingerprint> getEnrolledFingerprints(int userId) {
if (mService != null) try {
return mService.getEnrolledFingerprints(userId, mContext.getOpPackageName());
@@ -734,6 +737,7 @@
* @hide
*/
@RequiresPermission(USE_FINGERPRINT)
+ @UnsupportedAppUsage
public List<Fingerprint> getEnrolledFingerprints() {
return getEnrolledFingerprints(mContext.getUserId());
}
@@ -801,6 +805,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long getAuthenticatorId() {
if (mService != null) {
try {
diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java
index 4d2841d..6ca5f0c 100644
--- a/core/java/android/hardware/input/InputManager.java
+++ b/core/java/android/hardware/input/InputManager.java
@@ -20,6 +20,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.IInputForwarder;
import android.content.Context;
import android.media.AudioAttributes;
@@ -64,6 +65,7 @@
private static InputManager sInstance;
+ @UnsupportedAppUsage
private final IInputManager mIm;
// Guarded by mInputDevicesLock
@@ -181,6 +183,7 @@
* Waits for the event to be delivered to the application and handled.
* @hide
*/
+ @UnsupportedAppUsage
public static final int INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH = 2; // see InputDispatcher.h
/** @hide */
@@ -223,6 +226,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static InputManager getInstance() {
synchronized (InputManager.class) {
if (sInstance == null) {
@@ -866,6 +870,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean injectInputEvent(InputEvent event, int mode) {
if (event == null) {
throw new IllegalArgumentException("event must not be null");
@@ -891,6 +896,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setPointerIconType(int iconId) {
try {
mIm.setPointerIconType(iconId);
@@ -938,6 +944,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public IInputForwarder createInputForwarder(int displayId) {
try {
return mIm.createInputForwarder(displayId);
diff --git a/core/java/android/hardware/location/GeofenceHardware.java b/core/java/android/hardware/location/GeofenceHardware.java
index 66dd9fc..23d8d01 100644
--- a/core/java/android/hardware/location/GeofenceHardware.java
+++ b/core/java/android/hardware/location/GeofenceHardware.java
@@ -16,6 +16,7 @@
package android.hardware.location;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.location.Location;
import android.os.Build;
import android.os.RemoteException;
@@ -168,6 +169,7 @@
GeofenceHardwareMonitorCallbackWrapper>();
/** @hide */
+ @UnsupportedAppUsage
public GeofenceHardware(IGeofenceHardware service) {
mService = service;
}
diff --git a/core/java/android/hardware/soundtrigger/SoundTrigger.java b/core/java/android/hardware/soundtrigger/SoundTrigger.java
index dde8a33..007f4bc 100644
--- a/core/java/android/hardware/soundtrigger/SoundTrigger.java
+++ b/core/java/android/hardware/soundtrigger/SoundTrigger.java
@@ -24,6 +24,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.media.AudioFormat;
import android.os.Handler;
import android.os.Parcel;
@@ -72,6 +73,7 @@
****************************************************************************/
public static class ModuleProperties implements Parcelable {
/** Unique module ID provided by the native service */
+ @UnsupportedAppUsage
public final int id;
/** human readable voice detection engine implementor */
@@ -81,12 +83,14 @@
public final String description;
/** Unique voice engine Id (changes with each version) */
+ @UnsupportedAppUsage
public final UUID uuid;
/** Voice detection engine version */
public final int version;
/** Maximum number of active sound models */
+ @UnsupportedAppUsage
public final int maxSoundModels;
/** Maximum number of key phrases */
@@ -114,6 +118,7 @@
* recognition callback event */
public final boolean returnsTriggerInEvent;
+ @UnsupportedAppUsage
ModuleProperties(int id, String implementor, String description,
String uuid, int version, int maxSoundModels, int maxKeyphrases,
int maxUsers, int recognitionModes, boolean supportsCaptureTransition,
@@ -225,15 +230,18 @@
public static final int TYPE_GENERIC_SOUND = 1;
/** Unique sound model identifier */
+ @UnsupportedAppUsage
public final UUID uuid;
/** Sound model type (e.g. TYPE_KEYPHRASE); */
public final int type;
/** Unique sound model vendor identifier */
+ @UnsupportedAppUsage
public final UUID vendorUuid;
/** Opaque data. For use by vendor implementation and enrollment application */
+ @UnsupportedAppUsage
public final byte[] data;
public SoundModel(UUID uuid, UUID vendorUuid, int type, byte[] data) {
@@ -289,21 +297,27 @@
****************************************************************************/
public static class Keyphrase implements Parcelable {
/** Unique identifier for this keyphrase */
+ @UnsupportedAppUsage
public final int id;
/** Recognition modes supported for this key phrase in the model */
+ @UnsupportedAppUsage
public final int recognitionModes;
/** Locale of the keyphrase. JAVA Locale string e.g en_US */
+ @UnsupportedAppUsage
public final String locale;
/** Key phrase text */
+ @UnsupportedAppUsage
public final String text;
/** Users this key phrase has been trained for. countains sound trigger specific user IDs
* derived from system user IDs {@link android.os.UserHandle#getIdentifier()}. */
+ @UnsupportedAppUsage
public final int[] users;
+ @UnsupportedAppUsage
public Keyphrase(int id, int recognitionModes, String locale, String text, int[] users) {
this.id = id;
this.recognitionModes = recognitionModes;
@@ -412,8 +426,10 @@
****************************************************************************/
public static class KeyphraseSoundModel extends SoundModel implements Parcelable {
/** Key phrases in this sound model */
+ @UnsupportedAppUsage
public final Keyphrase[] keyphrases; // keyword phrases in model
+ @UnsupportedAppUsage
public KeyphraseSoundModel(
UUID uuid, UUID vendorUuid, byte[] data, Keyphrase[] keyphrases) {
super(uuid, vendorUuid, TYPE_KEYPHRASE, data);
@@ -511,6 +527,7 @@
}
};
+ @UnsupportedAppUsage
public GenericSoundModel(UUID uuid, UUID vendorUuid, byte[] data) {
super(uuid, vendorUuid, TYPE_GENERIC_SOUND, data);
}
@@ -606,6 +623,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final int status;
/**
*
@@ -613,12 +631,14 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final int soundModelHandle;
/**
* True if it is possible to capture audio from this utterance buffered by the hardware
*
* @hide
*/
+ @UnsupportedAppUsage
public final boolean captureAvailable;
/**
* Audio session ID to be used when capturing the utterance with an AudioRecord
@@ -626,6 +646,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final int captureSession;
/**
* Delay in ms between end of model detection and start of audio available for capture.
@@ -659,9 +680,11 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final byte[] data;
/** @hide */
+ @UnsupportedAppUsage
public RecognitionEvent(int status, int soundModelHandle, boolean captureAvailable,
int captureSession, int captureDelayMs, int capturePreambleMs,
boolean triggerInData, AudioFormat captureFormat, byte[] data) {
@@ -865,6 +888,7 @@
public static class RecognitionConfig implements Parcelable {
/** True if the DSP should capture the trigger sound and make it available for further
* capture. */
+ @UnsupportedAppUsage
public final boolean captureRequested;
/**
* True if the service should restart listening after the DSP triggers.
@@ -873,11 +897,14 @@
public final boolean allowMultipleTriggers;
/** List of all keyphrases in the sound model for which recognition should be performed with
* options for each keyphrase. */
+ @UnsupportedAppUsage
public final KeyphraseRecognitionExtra keyphrases[];
/** Opaque data for use by system applications who know about voice engine internals,
* typically during enrollment. */
+ @UnsupportedAppUsage
public final byte[] data;
+ @UnsupportedAppUsage
public RecognitionConfig(boolean captureRequested, boolean allowMultipleTriggers,
KeyphraseRecognitionExtra[] keyphrases, byte[] data) {
this.captureRequested = captureRequested;
@@ -938,9 +965,12 @@
* @hide
*/
public static class ConfidenceLevel implements Parcelable {
+ @UnsupportedAppUsage
public final int userId;
+ @UnsupportedAppUsage
public final int confidenceLevel;
+ @UnsupportedAppUsage
public ConfidenceLevel(int userId, int confidenceLevel) {
this.userId = userId;
this.confidenceLevel = confidenceLevel;
@@ -1014,19 +1044,24 @@
*/
public static class KeyphraseRecognitionExtra implements Parcelable {
/** The keyphrase ID */
+ @UnsupportedAppUsage
public final int id;
/** Recognition modes matched for this event */
+ @UnsupportedAppUsage
public final int recognitionModes;
/** Confidence level for mode RECOGNITION_MODE_VOICE_TRIGGER when user identification
* is not performed */
+ @UnsupportedAppUsage
public final int coarseConfidenceLevel;
/** Confidence levels for all users recognized (KeyphraseRecognitionEvent) or to
* be recognized (RecognitionConfig) */
+ @UnsupportedAppUsage
public final ConfidenceLevel[] confidenceLevels;
+ @UnsupportedAppUsage
public KeyphraseRecognitionExtra(int id, int recognitionModes, int coarseConfidenceLevel,
ConfidenceLevel[] confidenceLevels) {
this.id = id;
@@ -1114,8 +1149,10 @@
*/
public static class KeyphraseRecognitionEvent extends RecognitionEvent implements Parcelable {
/** Indicates if the key phrase is present in the buffered audio available for capture */
+ @UnsupportedAppUsage
public final KeyphraseRecognitionExtra[] keyphraseExtras;
+ @UnsupportedAppUsage
public KeyphraseRecognitionEvent(int status, int soundModelHandle, boolean captureAvailable,
int captureSession, int captureDelayMs, int capturePreambleMs,
boolean triggerInData, AudioFormat captureFormat, byte[] data,
@@ -1236,6 +1273,7 @@
* @hide
*/
public static class GenericRecognitionEvent extends RecognitionEvent implements Parcelable {
+ @UnsupportedAppUsage
public GenericRecognitionEvent(int status, int soundModelHandle,
boolean captureAvailable, int captureSession, int captureDelayMs,
int capturePreambleMs, boolean triggerInData, AudioFormat captureFormat,
@@ -1305,6 +1343,7 @@
/** New sound model data */
public final byte[] data;
+ @UnsupportedAppUsage
SoundModelEvent(int status, int soundModelHandle, byte[] data) {
this.status = status;
this.soundModelHandle = soundModelHandle;
@@ -1405,6 +1444,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static native int listModules(ArrayList <ModuleProperties> modules);
/**
@@ -1418,6 +1458,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static SoundTriggerModule attachModule(int moduleId,
StatusListener listener,
Handler handler) {
diff --git a/core/java/android/hardware/soundtrigger/SoundTriggerModule.java b/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
index e23a2bb..838765b 100644
--- a/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
+++ b/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
@@ -16,6 +16,7 @@
package android.hardware.soundtrigger;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -28,8 +29,10 @@
* @hide
*/
public class SoundTriggerModule {
+ @UnsupportedAppUsage
private long mNativeContext;
+ @UnsupportedAppUsage
private int mId;
private NativeEventHandlerDelegate mEventHandlerDelegate;
@@ -56,6 +59,7 @@
* Detach from this module. The {@link SoundTrigger.StatusListener} callback will not be called
* anymore and associated resources will be released.
* */
+ @UnsupportedAppUsage
public native void detach();
/**
@@ -73,6 +77,7 @@
* service fails
* - {@link SoundTrigger#STATUS_INVALID_OPERATION} if the call is out of sequence
*/
+ @UnsupportedAppUsage
public native int loadSoundModel(SoundTrigger.SoundModel model, int[] soundModelHandle);
/**
@@ -87,6 +92,7 @@
* - {@link SoundTrigger#STATUS_DEAD_OBJECT} if the binder transaction to the native
* service fails
*/
+ @UnsupportedAppUsage
public native int unloadSoundModel(int soundModelHandle);
/**
@@ -106,6 +112,7 @@
* service fails
* - {@link SoundTrigger#STATUS_INVALID_OPERATION} if the call is out of sequence
*/
+ @UnsupportedAppUsage
public native int startRecognition(int soundModelHandle, SoundTrigger.RecognitionConfig config);
/**
@@ -121,6 +128,7 @@
* service fails
* - {@link SoundTrigger#STATUS_INVALID_OPERATION} if the call is out of sequence
*/
+ @UnsupportedAppUsage
public native int stopRecognition(int soundModelHandle);
private class NativeEventHandlerDelegate {
@@ -181,6 +189,7 @@
}
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private static void postEventFromNative(Object module_ref,
int what, int arg1, int arg2, Object obj) {
SoundTriggerModule module = (SoundTriggerModule)((WeakReference)module_ref).get();
diff --git a/core/java/android/hardware/usb/UsbDevice.java b/core/java/android/hardware/usb/UsbDevice.java
index 1e98301..26c5a95 100644
--- a/core/java/android/hardware/usb/UsbDevice.java
+++ b/core/java/android/hardware/usb/UsbDevice.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import com.android.internal.util.Preconditions;
@@ -60,6 +61,7 @@
private @Nullable Parcelable[] mConfigurations;
/** All interfaces on the device. Initialized on first call to getInterfaceList */
+ @UnsupportedAppUsage
private @Nullable UsbInterface[] mInterfaces;
/**
diff --git a/core/java/android/hardware/usb/UsbDeviceConnection.java b/core/java/android/hardware/usb/UsbDeviceConnection.java
index 9e5174a..71297c1 100644
--- a/core/java/android/hardware/usb/UsbDeviceConnection.java
+++ b/core/java/android/hardware/usb/UsbDeviceConnection.java
@@ -20,6 +20,7 @@
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Build;
import android.os.ParcelFileDescriptor;
@@ -46,6 +47,7 @@
private Context mContext;
// used by the JNI code
+ @UnsupportedAppUsage
private long mNativeContext;
private final CloseGuard mCloseGuard = CloseGuard.get();
diff --git a/core/java/android/hardware/usb/UsbManager.java b/core/java/android/hardware/usb/UsbManager.java
index 46142e3..3141be4 100644
--- a/core/java/android/hardware/usb/UsbManager.java
+++ b/core/java/android/hardware/usb/UsbManager.java
@@ -25,6 +25,7 @@
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
@@ -87,6 +88,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String ACTION_USB_STATE =
"android.hardware.usb.action.USB_STATE";
@@ -163,6 +165,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String USB_CONNECTED = "connected";
/**
@@ -189,6 +192,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String USB_DATA_UNLOCKED = "unlocked";
/**
@@ -197,6 +201,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String USB_FUNCTION_NONE = "none";
/**
@@ -363,6 +368,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public UsbManager(Context context, IUsbManager service) {
mContext = context;
mService = service;
@@ -645,6 +651,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public boolean isFunctionEnabled(String function) {
try {
return mService.isFunctionEnabled(function);
@@ -693,6 +700,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public void setCurrentFunction(String functions, boolean usbDataUnlocked) {
try {
mService.setCurrentFunction(functions, usbDataUnlocked);
@@ -774,6 +782,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public UsbPort[] getPorts() {
if (mService == null) {
return null;
@@ -793,6 +802,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public UsbPortStatus getPortStatus(UsbPort port) {
Preconditions.checkNotNull(port, "port must not be null");
@@ -822,6 +832,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setPortRoles(UsbPort port, int powerRole, int dataRole) {
Preconditions.checkNotNull(port, "port must not be null");
UsbPort.checkRoles(powerRole, dataRole);
diff --git a/core/java/android/hardware/usb/UsbPortStatus.java b/core/java/android/hardware/usb/UsbPortStatus.java
index 5c0e81a..2cd8209 100644
--- a/core/java/android/hardware/usb/UsbPortStatus.java
+++ b/core/java/android/hardware/usb/UsbPortStatus.java
@@ -16,6 +16,7 @@
package android.hardware.usb;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -47,6 +48,7 @@
*
* @return True if there is anything connected to the port.
*/
+ @UnsupportedAppUsage
public boolean isConnected() {
return mCurrentMode != 0;
}
@@ -57,6 +59,7 @@
* @return The current mode: {@link UsbPort#MODE_DFP}, {@link UsbPort#MODE_UFP},
* or 0 if nothing is connected.
*/
+ @UnsupportedAppUsage
public int getCurrentMode() {
return mCurrentMode;
}
@@ -67,6 +70,7 @@
* @return The current power role: {@link UsbPort#POWER_ROLE_SOURCE},
* {@link UsbPort#POWER_ROLE_SINK}, or 0 if nothing is connected.
*/
+ @UnsupportedAppUsage
public int getCurrentPowerRole() {
return mCurrentPowerRole;
}
@@ -77,6 +81,7 @@
* @return The current data role: {@link UsbPort#DATA_ROLE_HOST},
* {@link UsbPort#DATA_ROLE_DEVICE}, or 0 if nothing is connected.
*/
+ @UnsupportedAppUsage
public int getCurrentDataRole() {
return mCurrentDataRole;
}
@@ -90,12 +95,14 @@
* @param dataRole The data role to check: either {@link UsbPort#DATA_ROLE_HOST}
* or {@link UsbPort#DATA_ROLE_DEVICE}, or 0 if no data role.
*/
+ @UnsupportedAppUsage
public boolean isRoleCombinationSupported(int powerRole, int dataRole) {
return (mSupportedRoleCombinations &
UsbPort.combineRolesAsBit(powerRole, dataRole)) != 0;
}
/** @hide */
+ @UnsupportedAppUsage
public int getSupportedRoleCombinations() {
return mSupportedRoleCombinations;
}
diff --git a/core/java/android/hardware/usb/UsbRequest.java b/core/java/android/hardware/usb/UsbRequest.java
index f59c87e..7abf3e9 100644
--- a/core/java/android/hardware/usb/UsbRequest.java
+++ b/core/java/android/hardware/usb/UsbRequest.java
@@ -17,6 +17,7 @@
package android.hardware.usb;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.util.Log;
@@ -47,14 +48,17 @@
static final int MAX_USBFS_BUFFER_SIZE = 16384;
// used by the JNI code
+ @UnsupportedAppUsage
private long mNativeContext;
private UsbEndpoint mEndpoint;
/** The buffer that is currently being read / written */
+ @UnsupportedAppUsage
private ByteBuffer mBuffer;
/** The amount of data to read / write when using {@link #queue} */
+ @UnsupportedAppUsage
private int mLength;
// for client use