Merge "Add @UnsupportedAppUsage annotations"

This commit is contained in:
Andrei-Valentin Onea
2019-03-21 19:11:51 +00:00
committed by Android (Google) Code Review
21 changed files with 47 additions and 33 deletions

View File

@@ -20,6 +20,7 @@ import android.app.PendingIntent;
/** @hide */
interface IFindDeviceCallback {
@UnsupportedAppUsage
void onSuccess(in PendingIntent launcher);
void onFailure(in CharSequence reason);
}

View File

@@ -16,6 +16,8 @@
package android.hardware.camera2.utils;
import android.annotation.UnsupportedAppUsage;
/**
* Provide hashing functions using the Modified Bernstein hash
*/
@@ -30,6 +32,7 @@ public final class HashCodeHelpers {
*
* @return the numeric hash code
*/
@UnsupportedAppUsage
public static int hashCode(int... array) {
if (array == null) {
return 0;

View File

@@ -16,6 +16,7 @@
package android.inputmethodservice;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Rect;
import android.os.Bundle;
@@ -53,6 +54,7 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub
private static final int DO_VIEW_CLICKED = 115;
private static final int DO_NOTIFY_IME_HIDDEN = 120;
@UnsupportedAppUsage
HandlerCaller mCaller;
InputMethodSession mInputMethodSession;
InputChannel mChannel;

View File

@@ -18,6 +18,7 @@ package android.inputmethodservice;
import android.annotation.BinderThread;
import android.annotation.MainThread;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Binder;
@@ -74,6 +75,7 @@ class IInputMethodWrapper extends IInputMethod.Stub
final WeakReference<AbstractInputMethodService> mTarget;
final Context mContext;
@UnsupportedAppUsage
final HandlerCaller mCaller;
final WeakReference<InputMethod> mInputMethod;
final int mTargetSdkVersion;

View File

@@ -25,6 +25,7 @@ import android.os.Messenger;
*/
interface INsdManager
{
@UnsupportedAppUsage
Messenger getMessenger();
void setEnabled(boolean enable);
}

View File

@@ -34,6 +34,7 @@ interface IPowerManager
String historyTag);
void acquireWakeLockWithUid(IBinder lock, int flags, String tag, String packageName,
int uidtoblame);
@UnsupportedAppUsage
void releaseWakeLock(IBinder lock, int flags);
void updateWakeLockUids(IBinder lock, in int[] uids);
oneway void powerHint(int hintId, int data);

View File

@@ -16,6 +16,7 @@
package android.preference;
import android.annotation.UnsupportedAppUsage;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.preference.Preference.OnPreferenceChangeInternalListener;
@@ -215,6 +216,7 @@ public class PreferenceGroupAdapter extends BaseAdapter
return mPreferenceList.size();
}
@UnsupportedAppUsage
public Preference getItem(int position) {
if (position < 0 || position >= getCount()) return null;
return mPreferenceList.get(position);

View File

@@ -16,14 +16,17 @@
package android.security.keymaster;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
/**
* @hide
*/
class KeymasterBlobArgument extends KeymasterArgument {
@UnsupportedAppUsage
public final byte[] blob;
@UnsupportedAppUsage
public KeymasterBlobArgument(int tag, byte[] blob) {
super(tag);
switch (KeymasterDefs.getTagType(tag)) {
@@ -36,6 +39,7 @@ class KeymasterBlobArgument extends KeymasterArgument {
this.blob = blob;
}
@UnsupportedAppUsage
public KeymasterBlobArgument(int tag, Parcel in) {
super(tag);
blob = in.createByteArray();

View File

@@ -16,6 +16,7 @@
package android.security.keymaster;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
/**
@@ -36,6 +37,7 @@ class KeymasterBooleanArgument extends KeymasterArgument {
}
}
@UnsupportedAppUsage
public KeymasterBooleanArgument(int tag, Parcel in) {
super(tag);
}

View File

@@ -16,6 +16,7 @@
package android.security.keymaster;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import java.util.Date;
@@ -36,6 +37,7 @@ class KeymasterDateArgument extends KeymasterArgument {
this.date = date;
}
@UnsupportedAppUsage
public KeymasterDateArgument(int tag, Parcel in) {
super(tag);
date = new Date(in.readLong());

View File

@@ -16,14 +16,17 @@
package android.security.keymaster;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
/**
* @hide
*/
class KeymasterIntArgument extends KeymasterArgument {
@UnsupportedAppUsage
public final int value;
@UnsupportedAppUsage
public KeymasterIntArgument(int tag, int value) {
super(tag);
switch (KeymasterDefs.getTagType(tag)) {
@@ -38,6 +41,7 @@ class KeymasterIntArgument extends KeymasterArgument {
this.value = value;
}
@UnsupportedAppUsage
public KeymasterIntArgument(int tag, Parcel in) {
super(tag);
value = in.readInt();

View File

@@ -16,14 +16,17 @@
package android.security.keymaster;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
/**
* @hide
*/
class KeymasterLongArgument extends KeymasterArgument {
@UnsupportedAppUsage
public final long value;
@UnsupportedAppUsage
public KeymasterLongArgument(int tag, long value) {
super(tag);
switch (KeymasterDefs.getTagType(tag)) {
@@ -36,6 +39,7 @@ class KeymasterLongArgument extends KeymasterArgument {
this.value = value;
}
@UnsupportedAppUsage
public KeymasterLongArgument(int tag, Parcel in) {
super(tag);
value = in.readLong();

View File

@@ -23,12 +23,16 @@ import android.os.IBinder;
/** @hide */
interface IDreamManager {
@UnsupportedAppUsage
void dream();
@UnsupportedAppUsage
void awaken();
@UnsupportedAppUsage
void setDreamComponents(in ComponentName[] componentNames);
ComponentName[] getDreamComponents();
ComponentName getDefaultDreamComponent();
void testDream(in ComponentName componentName);
@UnsupportedAppUsage
boolean isDreaming();
void finishSelf(in IBinder token, boolean immediate);
void startDozing(in IBinder token, int screenState, int screenBrightness);

View File

@@ -18,6 +18,7 @@ package android.util;
import org.xmlpull.v1.XmlPullParser;
import android.annotation.UnsupportedAppUsage;
import android.util.AttributeSet;
import com.android.internal.util.XmlUtils;
@@ -26,6 +27,7 @@ import com.android.internal.util.XmlUtils;
* Provides an implementation of AttributeSet on top of an XmlPullParser.
*/
class XmlPullAttributes implements AttributeSet {
@UnsupportedAppUsage
public XmlPullAttributes(XmlPullParser parser) {
mParser = parser;
}
@@ -147,5 +149,6 @@ class XmlPullAttributes implements AttributeSet {
return getAttributeResourceValue(null, "style", 0);
}
@UnsupportedAppUsage
/*package*/ XmlPullParser mParser;
}

View File

@@ -33,6 +33,7 @@ oneway interface IAccessibilityInteractionConnectionCallback {
* @param infos The result {@link AccessibilityNodeInfo}.
* @param interactionId The interaction id to match the result with the request.
*/
@UnsupportedAppUsage
void setFindAccessibilityNodeInfoResult(in AccessibilityNodeInfo info, int interactionId);
/**
@@ -41,6 +42,7 @@ oneway interface IAccessibilityInteractionConnectionCallback {
* @param infos The result {@link AccessibilityNodeInfo}s.
* @param interactionId The interaction id to match the result with the request.
*/
@UnsupportedAppUsage
void setFindAccessibilityNodeInfosResult(in List<AccessibilityNodeInfo> infos,
int interactionId);
@@ -50,5 +52,6 @@ oneway interface IAccessibilityInteractionConnectionCallback {
* @param Whether the action was performed.
* @param interactionId The interaction id to match the result with the request.
*/
@UnsupportedAppUsage
void setPerformAccessibilityActionResult(boolean succeeded, int interactionId);
}

View File

@@ -42,6 +42,7 @@ interface IAccessibilityManager {
List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList(int userId);
@UnsupportedAppUsage
List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(int feedbackType, int userId);
int addAccessibilityInteractionConnection(IWindow windowToken,