Explicitly require NonNull in areas where it shouldn't/never will be

Signed-off-by: June <june@eridan.me>
This commit is contained in:
June 2022-02-06 04:39:42 +00:00 committed by Daniel Micay
parent 259a2afe7a
commit 61247aaa6a

View File

@ -39,7 +39,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
public class PdfViewer extends AppCompatActivity implements LoaderManager.LoaderCallbacks<List<CharSequence>> {
public static final String TAG = "PdfViewer";
@ -321,19 +320,20 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader
}
}
@NonNull
@Override
public Loader<List<CharSequence>> onCreateLoader(int id, Bundle args) {
return new DocumentPropertiesLoader(this, args.getString(KEY_PROPERTIES), mNumPages, mUri);
}
@Override
public void onLoadFinished(Loader<List<CharSequence>> loader, List<CharSequence> data) {
public void onLoadFinished(@NonNull Loader<List<CharSequence>> loader, List<CharSequence> data) {
mDocumentProperties = data;
LoaderManager.getInstance(this).destroyLoader(DocumentPropertiesLoader.ID);
}
@Override
public void onLoaderReset(Loader<List<CharSequence>> loader) {
public void onLoaderReset(@NonNull Loader<List<CharSequence>> loader) {
mDocumentProperties = null;
}
@ -428,7 +428,7 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader
}
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
public void onSaveInstanceState(@NonNull Bundle savedInstanceState) {
super.onSaveInstanceState(savedInstanceState);
savedInstanceState.putParcelable(STATE_URI, mUri);
savedInstanceState.putInt(STATE_PAGE, mPage);