Skip to content

Commit

Permalink
Use new UnsupportedAppUsage annotation.
Browse files Browse the repository at this point in the history
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
      git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'

Change-Id: I853372f3c6fef905553bb31be4f1bb48df735f7a
  • Loading branch information
Artur-Satayev committed Jan 8, 2020
1 parent c3fa568 commit 2ebb31c
Show file tree
Hide file tree
Showing 77 changed files with 105 additions and 141 deletions.
1 change: 1 addition & 0 deletions apex/jobscheduler/framework/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ java_library {
},
libs: [
"framework-minus-apex",
"unsupportedappusage",
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.ComponentName;
import android.net.NetworkRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.app.job.IJobCallback;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.net.Network;
import android.net.Uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import static android.app.job.JobInfo.NETWORK_BYTES_UNKNOWN;

import android.annotation.BytesLong;
import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.os.Build;
import android.os.Parcel;
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/content/ContentProviderOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import static android.os.Trace.TRACE_TAG_PACKAGE_MANAGER;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringRes;
import android.annotation.UnsupportedAppUsage;
import android.app.ActivityTaskManager;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Intent;
import android.content.IntentFilter;
Expand Down
2 changes: 1 addition & 1 deletion media/java/android/media/MediaScannerConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package android.media;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.hardware.soundtrigger.IRecognitionStatusCallback;
import android.hardware.soundtrigger.SoundTrigger;
import android.hardware.soundtrigger.SoundTrigger.RecognitionConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.hardware.soundtrigger.ModelParams;
Expand Down
2 changes: 1 addition & 1 deletion media/java/android/media/tv/TvInputInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import android.annotation.NonNull;
import android.annotation.StringRes;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
Expand Down
2 changes: 1 addition & 1 deletion media/java/android/media/tv/TvInputService.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.Service;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.graphics.PixelFormat;
Expand Down
3 changes: 2 additions & 1 deletion media/java/android/mtp/MtpPropertyList.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

package android.mtp;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;

import java.util.ArrayList;
import java.util.List;

Expand Down
3 changes: 1 addition & 2 deletions media/java/android/mtp/MtpStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@

package android.mtp;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.storage.StorageVolume;
import android.provider.MediaStore;

/**
* This class represents a storage unit on an MTP device.
Expand Down
2 changes: 1 addition & 1 deletion media/java/android/service/media/MediaBrowserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.UnsupportedAppUsage;
import android.app.Service;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ParceledListSlice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@

package android.media.effect;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterFactory;
import android.filterfw.core.FilterFunction;
import android.filterfw.core.Frame;
import android.media.effect.EffectContext;

/**
* Effect subclass for effects based on a single Filter. Subclasses need only invoke the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

package android.filterfw;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.filterfw.core.AsyncRunner;
import android.filterfw.core.FilterGraph;
import android.filterfw.core.FilterContext;
import android.filterfw.core.FilterGraph;
import android.filterfw.core.FrameManager;
import android.filterfw.core.GraphRunner;
import android.filterfw.core.RoundRobinScheduler;
Expand Down
10 changes: 3 additions & 7 deletions media/mca/filterfw/java/android/filterfw/core/Filter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.FilterContext;
import android.filterfw.core.FilterPort;
import android.filterfw.core.KeyValueMap;
import android.filterfw.io.TextGraphReader;
import android.filterfw.io.GraphIOException;
import android.compat.annotation.UnsupportedAppUsage;
import android.filterfw.format.ObjectFormat;
import android.filterfw.io.GraphIOException;
import android.filterfw.io.TextGraphReader;
import android.util.Log;

import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.Thread;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Filter;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameManager;
import android.filterfw.core.GLEnvironment;
import android.compat.annotation.UnsupportedAppUsage;

import java.util.HashMap;
import java.util.HashSet;
Expand Down
13 changes: 5 additions & 8 deletions media/mca/filterfw/java/android/filterfw/core/FilterGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

package android.filterfw.core;

import android.compat.annotation.UnsupportedAppUsage;
import android.filterpacks.base.FrameBranch;
import android.filterpacks.base.NullFilter;
import android.util.Log;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
Expand All @@ -25,14 +30,6 @@
import java.util.Set;
import java.util.Stack;

import android.filterfw.core.FilterContext;
import android.filterfw.core.KeyValueMap;
import android.filterpacks.base.FrameBranch;
import android.filterpacks.base.NullFilter;

import android.annotation.UnsupportedAppUsage;
import android.util.Log;

/**
* @hide
*/
Expand Down
4 changes: 1 addition & 3 deletions media/mca/filterfw/java/android/filterfw/core/Frame.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.FrameManager;
import android.compat.annotation.UnsupportedAppUsage;
import android.graphics.Bitmap;

import java.nio.ByteBuffer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
import android.compat.annotation.UnsupportedAppUsage;

import java.util.Arrays;
import java.util.Map.Entry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.MutableFrameFormat;
import android.compat.annotation.UnsupportedAppUsage;

/**
* @hide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.NativeAllocatorTag;
import android.compat.annotation.UnsupportedAppUsage;
import android.graphics.SurfaceTexture;
import android.media.MediaRecorder;
import android.os.Looper;
import android.util.Log;
import android.view.Surface;
import android.media.MediaRecorder;

/**
* @hide
Expand Down
9 changes: 2 additions & 7 deletions media/mca/filterfw/java/android/filterfw/core/GLFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.FrameManager;
import android.filterfw.core.NativeFrame;
import android.filterfw.core.StopWatchMap;
import android.compat.annotation.UnsupportedAppUsage;
import android.graphics.Bitmap;
import android.opengl.GLES20;
import android.graphics.Rect;
import android.opengl.GLES20;

import java.nio.ByteBuffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;

/**
* @hide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.KeyValueMap;
import android.compat.annotation.UnsupportedAppUsage;

import java.util.Arrays;

Expand Down
3 changes: 1 addition & 2 deletions media/mca/filterfw/java/android/filterfw/core/Program.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Frame;
import android.compat.annotation.UnsupportedAppUsage;

/**
* @hide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@

package android.filterfw.core;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Frame;
import android.filterfw.core.NativeAllocatorTag;
import android.filterfw.core.Program;
import android.filterfw.core.StopWatchMap;
import android.filterfw.core.VertexFrame;
import android.compat.annotation.UnsupportedAppUsage;
import android.filterfw.geometry.Quad;
import android.opengl.GLES20;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package android.filterfw.format;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.MutableFrameFormat;
import android.graphics.Bitmap;
Expand Down
3 changes: 1 addition & 2 deletions media/mca/filterfw/java/android/filterfw/geometry/Point.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

package android.filterfw.geometry;

import android.annotation.UnsupportedAppUsage;
import java.lang.Math;
import android.compat.annotation.UnsupportedAppUsage;

/**
* @hide
Expand Down
4 changes: 1 addition & 3 deletions media/mca/filterfw/java/android/filterfw/geometry/Quad.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@

package android.filterfw.geometry;

import android.annotation.UnsupportedAppUsage;
import android.filterfw.geometry.Point;
import android.compat.annotation.UnsupportedAppUsage;

import java.lang.Float;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
Expand Down
4 changes: 2 additions & 2 deletions opengl/java/android/opengl/EGL14.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

package android.opengl;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.graphics.SurfaceTexture;
import android.view.Surface;
import android.view.SurfaceView;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

/**
* EGL 1.4
Expand Down
2 changes: 1 addition & 1 deletion opengl/java/android/opengl/GLES20.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package android.opengl;

import android.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;

/** OpenGL ES 2.0
*/
Expand Down
Loading

0 comments on commit 2ebb31c

Please sign in to comment.