OSDN Git Service

Add missing annotations
authorJohn Reck <jreck@google.com>
Wed, 11 Oct 2017 17:47:12 +0000 (10:47 -0700)
committerJohn Reck <jreck@google.com>
Wed, 11 Oct 2017 17:47:12 +0000 (10:47 -0700)
Bug: 67608144
Test: make offline-sdk-docs verified docstring shows up
Change-Id: I22bcfcc58888fa2d4c479e4687afb2fabd5b2f71

graphics/java/android/graphics/Bitmap.java
graphics/java/android/graphics/BitmapFactory.java

index 57c7549..0072012 100644 (file)
@@ -21,6 +21,7 @@ import android.annotation.ColorInt;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.Size;
+import android.annotation.WorkerThread;
 import android.content.res.ResourcesImpl;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -1233,6 +1234,7 @@ public final class Bitmap implements Parcelable {
      * @param stream   The outputstream to write the compressed data.
      * @return true if successfully compressed to the specified stream.
      */
+    @WorkerThread
     public boolean compress(CompressFormat format, int quality, OutputStream stream) {
         checkRecycled("Can't compress a recycled bitmap");
         // do explicit check before calling the native method
index ffb39e3..f5bf754 100644 (file)
@@ -354,6 +354,7 @@ public class BitmapFactory {
          * decode, in the case of which a more accurate, but slightly slower,
          * IDCT method will be used instead.
          */
+        @Deprecated
         public boolean inPreferQualityOverSpeed;
 
         /**
@@ -412,6 +413,7 @@ public class BitmapFactory {
          * can check, inbetween the bounds decode and the image decode, to see
          * if the operation is canceled.
          */
+        @Deprecated
         public boolean mCancel;
 
         /**
@@ -426,6 +428,7 @@ public class BitmapFactory {
          *  or if inJustDecodeBounds is true, will set outWidth/outHeight
          *  to -1
          */
+        @Deprecated
         public void requestCancelDecode() {
             mCancel = true;
         }