Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f2385b9 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Respond to various API council feedback."

parents c3ace549 b91eaa54
Loading
Loading
Loading
Loading
+6 −10
Original line number Original line Diff line number Diff line
@@ -9409,7 +9409,6 @@ package android.content {
    method @Nullable public android.os.Bundle call(@NonNull String, @NonNull String, @Nullable String, @Nullable android.os.Bundle) throws android.os.RemoteException;
    method @Nullable public android.os.Bundle call(@NonNull String, @NonNull String, @Nullable String, @Nullable android.os.Bundle) throws android.os.RemoteException;
    method @Nullable public final android.net.Uri canonicalize(@NonNull android.net.Uri) throws android.os.RemoteException;
    method @Nullable public final android.net.Uri canonicalize(@NonNull android.net.Uri) throws android.os.RemoteException;
    method public void close();
    method public void close();
    method public static void closeQuietly(android.content.ContentProviderClient);
    method public int delete(@NonNull android.net.Uri, @Nullable String, @Nullable String[]) throws android.os.RemoteException;
    method public int delete(@NonNull android.net.Uri, @Nullable String, @Nullable String[]) throws android.os.RemoteException;
    method @Nullable public android.content.ContentProvider getLocalContentProvider();
    method @Nullable public android.content.ContentProvider getLocalContentProvider();
    method @Nullable public String[] getStreamTypes(@NonNull android.net.Uri, @NonNull String) throws android.os.RemoteException;
    method @Nullable public String[] getStreamTypes(@NonNull android.net.Uri, @NonNull String) throws android.os.RemoteException;
@@ -9593,10 +9592,10 @@ package android.content {
  public class ContentUris {
  public class ContentUris {
    ctor public ContentUris();
    ctor public ContentUris();
    method public static android.net.Uri.Builder appendId(android.net.Uri.Builder, long);
    method @NonNull public static android.net.Uri.Builder appendId(@NonNull android.net.Uri.Builder, long);
    method public static long parseId(android.net.Uri);
    method public static long parseId(@NonNull android.net.Uri);
    method public static android.net.Uri removeId(android.net.Uri);
    method @NonNull public static android.net.Uri removeId(@NonNull android.net.Uri);
    method public static android.net.Uri withAppendedId(android.net.Uri, long);
    method @NonNull public static android.net.Uri withAppendedId(@NonNull android.net.Uri, long);
  }
  }
  public final class ContentValues implements android.os.Parcelable {
  public final class ContentValues implements android.os.Parcelable {
@@ -10223,8 +10222,7 @@ package android.content {
    field public static final String ACTION_MEDIA_NOFS = "android.intent.action.MEDIA_NOFS";
    field public static final String ACTION_MEDIA_NOFS = "android.intent.action.MEDIA_NOFS";
    field public static final String ACTION_MEDIA_REMOVED = "android.intent.action.MEDIA_REMOVED";
    field public static final String ACTION_MEDIA_REMOVED = "android.intent.action.MEDIA_REMOVED";
    field public static final String ACTION_MEDIA_SCANNER_FINISHED = "android.intent.action.MEDIA_SCANNER_FINISHED";
    field public static final String ACTION_MEDIA_SCANNER_FINISHED = "android.intent.action.MEDIA_SCANNER_FINISHED";
    field public static final String ACTION_MEDIA_SCANNER_SCAN_FILE = "android.intent.action.MEDIA_SCANNER_SCAN_FILE";
    field @Deprecated public static final String ACTION_MEDIA_SCANNER_SCAN_FILE = "android.intent.action.MEDIA_SCANNER_SCAN_FILE";
    field public static final String ACTION_MEDIA_SCANNER_SCAN_VOLUME = "android.intent.action.MEDIA_SCANNER_SCAN_VOLUME";
    field public static final String ACTION_MEDIA_SCANNER_STARTED = "android.intent.action.MEDIA_SCANNER_STARTED";
    field public static final String ACTION_MEDIA_SCANNER_STARTED = "android.intent.action.MEDIA_SCANNER_STARTED";
    field public static final String ACTION_MEDIA_SHARED = "android.intent.action.MEDIA_SHARED";
    field public static final String ACTION_MEDIA_SHARED = "android.intent.action.MEDIA_SHARED";
    field public static final String ACTION_MEDIA_UNMOUNTABLE = "android.intent.action.MEDIA_UNMOUNTABLE";
    field public static final String ACTION_MEDIA_UNMOUNTABLE = "android.intent.action.MEDIA_UNMOUNTABLE";
@@ -34607,11 +34605,9 @@ package android.os {
    ctor public FileUriExposedException(String);
    ctor public FileUriExposedException(String);
  }
  }
  public class FileUtils {
  public final class FileUtils {
    method public static void closeQuietly(@Nullable AutoCloseable);
    method public static void closeQuietly(@Nullable AutoCloseable);
    method public static void closeQuietly(@Nullable java.io.FileDescriptor);
    method public static void closeQuietly(@Nullable java.io.FileDescriptor);
    method public static long copy(@NonNull java.io.File, @NonNull java.io.File) throws java.io.IOException;
    method public static long copy(@NonNull java.io.File, @NonNull java.io.File, @Nullable android.os.CancellationSignal, @Nullable java.util.concurrent.Executor, @Nullable android.os.FileUtils.ProgressListener) throws java.io.IOException;
    method public static long copy(@NonNull java.io.InputStream, @NonNull java.io.OutputStream) throws java.io.IOException;
    method public static long copy(@NonNull java.io.InputStream, @NonNull java.io.OutputStream) throws java.io.IOException;
    method public static long copy(@NonNull java.io.InputStream, @NonNull java.io.OutputStream, @Nullable android.os.CancellationSignal, @Nullable java.util.concurrent.Executor, @Nullable android.os.FileUtils.ProgressListener) throws java.io.IOException;
    method public static long copy(@NonNull java.io.InputStream, @NonNull java.io.OutputStream, @Nullable android.os.CancellationSignal, @Nullable java.util.concurrent.Executor, @Nullable android.os.FileUtils.ProgressListener) throws java.io.IOException;
    method public static long copy(@NonNull java.io.FileDescriptor, @NonNull java.io.FileDescriptor) throws java.io.IOException;
    method public static long copy(@NonNull java.io.FileDescriptor, @NonNull java.io.FileDescriptor) throws java.io.IOException;
+2 −2
Original line number Original line Diff line number Diff line
@@ -1300,9 +1300,9 @@ package android.content {
  }
  }
  public abstract class ContentResolver {
  public abstract class ContentResolver {
    method public android.os.Bundle getCache(android.net.Uri);
    method @Nullable public android.os.Bundle getCache(@NonNull android.net.Uri);
    method public android.graphics.drawable.Drawable getTypeDrawable(String);
    method public android.graphics.drawable.Drawable getTypeDrawable(String);
    method public void putCache(android.net.Uri, android.os.Bundle);
    method public void putCache(@NonNull android.net.Uri, @Nullable android.os.Bundle);
  }
  }
  public abstract class Context {
  public abstract class Context {
+1 −1
Original line number Original line Diff line number Diff line
@@ -1301,7 +1301,7 @@ package android.os {
    method public static java.io.File getStorageDirectory();
    method public static java.io.File getStorageDirectory();
  }
  }


  public class FileUtils {
  public final class FileUtils {
    method public static boolean contains(java.io.File, java.io.File);
    method public static boolean contains(java.io.File, java.io.File);
  }
  }


+3 −4
Original line number Original line Diff line number Diff line
@@ -626,15 +626,14 @@ public class ContentProviderClient implements ContentInterface, AutoCloseable {
        return ContentProvider.coerceToLocalContentProvider(mContentProvider);
        return ContentProvider.coerceToLocalContentProvider(mContentProvider);
    }
    }


    /**
    /** {@hide} */
     * Closes the given object quietly, ignoring any checked exceptions. Does
    @Deprecated
     * nothing if the given object is {@code null}.
     */
    public static void closeQuietly(ContentProviderClient client) {
    public static void closeQuietly(ContentProviderClient client) {
        IoUtils.closeQuietly(client);
        IoUtils.closeQuietly(client);
    }
    }


    /** {@hide} */
    /** {@hide} */
    @Deprecated
    public static void releaseQuietly(ContentProviderClient client) {
    public static void releaseQuietly(ContentProviderClient client) {
        IoUtils.closeQuietly(client);
        IoUtils.closeQuietly(client);
    }
    }
+15 −11
Original line number Original line Diff line number Diff line
@@ -3148,14 +3148,17 @@ public abstract class ContentResolver implements ContentInterface {
    }
    }


    /**
    /**
     * Put the cache with the key.
     * Store the given {@link Bundle} as a long-lived cached object within the
     * system. This can be useful to avoid expensive re-parsing when apps are
     * restarted multiple times on low-RAM devices.
     * <p>
     * The {@link Bundle} is automatically invalidated when a
     * {@link #notifyChange(Uri, ContentObserver)} event applies to the key.
     *
     *
     * @param key the key to add
     * @hide
     * @param value the value to add
     * {@hide}
     */
     */
    @SystemApi
    @SystemApi
    public void putCache(Uri key, Bundle value) {
    public void putCache(@NonNull Uri key, @Nullable Bundle value) {
        try {
        try {
            getContentService().putCache(mContext.getPackageName(), key, value,
            getContentService().putCache(mContext.getPackageName(), key, value,
                    mContext.getUserId());
                    mContext.getUserId());
@@ -3165,15 +3168,16 @@ public abstract class ContentResolver implements ContentInterface {
    }
    }


    /**
    /**
     * Get the cache with the key.
     * Retrieve the last {@link Bundle} stored as a long-lived cached object
     * within the system.
     *
     *
     * @param key the key to get the value
     * @return {@code null} if no cached object has been stored, or if the
     * @return the matched value. If the key doesn't exist, will return null.
     *         stored object has been invalidated due to a
     * @see #putCache(Uri, Bundle)
     *         {@link #notifyChange(Uri, ContentObserver)} event.
     * {@hide}
     * @hide
     */
     */
    @SystemApi
    @SystemApi
    public Bundle getCache(Uri key) {
    public @Nullable Bundle getCache(@NonNull Uri key) {
        try {
        try {
            final Bundle bundle = getContentService().getCache(mContext.getPackageName(), key,
            final Bundle bundle = getContentService().getCache(mContext.getPackageName(), key,
                    mContext.getUserId());
                    mContext.getUserId());
Loading