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

Commit bb68a650 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Respond to various API council feedback.

Handle many simple, smaller changes in a single CL.  Hide
CPC.closeQuietly(), now that it implements AutoCloseable.  Add more
details to CR.set/getCache() docs.  Add many @Nullable/@NonNull
annotations.

Bug: 124507578, 124447751, 124302519, 123697622
Bug: 123661322, 122887179, 122528742, 122527812, 116224797
Test: manual
Change-Id: I78faf4c51d7818b60c0c12699e0add71f1f548dd
parent 2c0b485d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.content.DialogInterface.OnClickListener;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.FileUtils;
import android.provider.DocumentsContract;
import android.provider.DocumentsContract.Document;
import androidx.annotation.Nullable;
@@ -156,7 +157,7 @@ public class CreateDirectoryFragment extends DialogFragment {
                Log.w(TAG, "Failed to create directory", e);
                return null;
            } finally {
                ContentProviderClient.closeQuietly(client);
                FileUtils.closeQuietly(client);
            }
        }

+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class DirectoryLoader extends AsyncTaskLoader<DirectoryResult> {
                mSignal = null;
            }
            // TODO: Remove this call.
            ContentProviderClient.closeQuietly(client);
            FileUtils.closeQuietly(client);
        }

        return result;
+1 −1
Original line number Diff line number Diff line
@@ -416,7 +416,7 @@ public abstract class MultiRootDocumentsLoader extends AsyncTaskLoader<Directory
            } catch (Exception e) {
                Log.w(TAG, "Failed to acquire content resolver for authority: " + authority);
            } finally {
                ContentProviderClient.closeQuietly(client);
                FileUtils.closeQuietly(client);
            }

            set(mCursors);
+2 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.ContentResolver;
import android.content.Context;
import android.net.Uri;
import android.os.CancellationSignal;
import android.os.FileUtils;
import android.util.Log;

import com.android.documentsui.base.ApplicationScope;
@@ -97,7 +98,7 @@ public class RefreshTask extends TimeoutTask<Void, Boolean> {
        } catch (Exception e) {
            Log.w(TAG, "Failed to refresh", e);
        } finally {
            ContentProviderClient.closeQuietly(client);
            FileUtils.closeQuietly(client);
        }
        return refreshSupported;
    }
+2 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.graphics.Point;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.CancellationSignal;
import android.os.FileUtils;
import android.os.OperationCanceledException;
import android.provider.DocumentsContract;
import android.util.Log;
@@ -117,7 +118,7 @@ public final class ThumbnailLoader extends AsyncTask<Uri, Void, Bitmap> implemen
                Log.w(TAG, "Failed to load thumbnail for " + mUri + ": " + e);
            }
        } finally {
            ContentProviderClient.closeQuietly(client);
            FileUtils.closeQuietly(client);
        }
        return result;
    }
Loading