Code analysis - address @NotNull/@Nullable issues.

This commit is contained in:
Alan Evans
2019-05-22 13:51:56 -03:00
committed by GitHub
parent 7db1588578
commit 9445555d66
113 changed files with 238 additions and 232 deletions

View File

@@ -615,7 +615,7 @@ public class ConversationFragment extends Fragment
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
public @NonNull Loader<Cursor> onCreateLoader(int id, Bundle args) {
Log.i(TAG, "onCreateLoader");
loaderStartTime = System.currentTimeMillis();
@@ -630,7 +630,7 @@ public class ConversationFragment extends Fragment
}
@Override
public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
public void onLoadFinished(@NonNull Loader<Cursor> cursorLoader, Cursor cursor) {
long loadTime = System.currentTimeMillis() - loaderStartTime;
int count = cursor.getCount();
Log.i(TAG, "onLoadFinished - took " + loadTime + " ms to load a cursor of size " + count);
@@ -705,7 +705,7 @@ public class ConversationFragment extends Fragment
}
@Override
public void onLoaderReset(Loader<Cursor> arg0) {
public void onLoaderReset(@NonNull Loader<Cursor> arg0) {
if (list.getAdapter() != null) {
getListAdapter().changeCursor(null);
}
@@ -828,7 +828,7 @@ public class ConversationFragment extends Fragment
}
@Override
public void onScrolled(final RecyclerView rv, final int dx, final int dy) {
public void onScrolled(@NonNull final RecyclerView rv, final int dx, final int dy) {
boolean currentlyAtBottom = isAtBottom();
boolean currentlyAtZoomScrollHeight = isAtZoomScrollHeight();
int positionId = getHeaderPositionId();
@@ -854,7 +854,7 @@ public class ConversationFragment extends Fragment
}
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
if (newState == RecyclerView.SCROLL_STATE_DRAGGING) {
conversationDateHeader.show();
} else if (newState == RecyclerView.SCROLL_STATE_IDLE) {

View File

@@ -149,12 +149,12 @@ public class ConversationItem extends LinearLayout
private ViewGroup container;
private @NonNull Set<MessageRecord> batchSelected = new HashSet<>();
private @NonNull Recipient conversationRecipient;
private @NonNull Stub<ConversationItemThumbnail> mediaThumbnailStub;
private @NonNull Stub<AudioView> audioViewStub;
private @NonNull Stub<DocumentView> documentViewStub;
private @NonNull Stub<SharedContactView> sharedContactStub;
private @NonNull Stub<LinkPreviewView> linkPreviewStub;
private Recipient conversationRecipient;
private Stub<ConversationItemThumbnail> mediaThumbnailStub;
private Stub<AudioView> audioViewStub;
private Stub<DocumentView> documentViewStub;
private Stub<SharedContactView> sharedContactStub;
private Stub<LinkPreviewView> linkPreviewStub;
private @Nullable EventListener eventListener;
private int defaultBubbleColor;