fix some lint warnings

This commit is contained in:
Konrad Pozniak 2019-04-20 22:36:44 +02:00 committed by Konrad Pozniak
commit ef66deeae7
36 changed files with 52 additions and 105 deletions

View file

@ -28,7 +28,6 @@ public class HtmlUtils {
return s.subSequence(0, i + 1);
}
@SuppressWarnings("deprecation")
public static Spanned fromHtml(String html) {
Spanned result;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
@ -41,7 +40,6 @@ public class HtmlUtils {
return (Spanned) trimTrailingWhitespace(result);
}
@SuppressWarnings("deprecation")
public static String toHtml(Spanned text) {
String result;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {

View file

@ -18,7 +18,6 @@ package com.keylesspalace.tusky.util;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.preference.PreferenceManager;
import androidx.annotation.Nullable;

View file

@ -244,7 +244,6 @@ public class NotificationHelper {
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
//noinspection ConstantConditions
notificationManager.notify(notificationId, builder.build());
if (currentNotifications.length() == 1) {
notificationManager.notify((int) account.getId(), builder.setGroupSummary(true).build());
@ -375,7 +374,6 @@ public class NotificationHelper {
channels.add(channel);
}
//noinspection ConstantConditions
notificationManager.createNotificationChannels(channels);
}

View file

@ -26,7 +26,7 @@ import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* A helper class for {@link androidx.paging.PagedList.BoundaryCallback BoundaryCallback}s and
* {@link DataSource}s to help with tracking network requests.
* {@link androidx.paging.DataSource}s to help with tracking network requests.
* <p>
* It is designed to support 3 types of requests, {@link RequestType#INITIAL INITIAL},
* {@link RequestType#BEFORE BEFORE} and {@link RequestType#AFTER AFTER} and runs only 1 request
@ -456,18 +456,18 @@ public class PagingRequestHelper {
*/
public enum RequestType {
/**
* Corresponds to an initial request made to a {@link DataSource} or the empty state for
* Corresponds to an initial request made to a {@link androidx.paging.DataSource} or the empty state for
* a {@link androidx.paging.PagedList.BoundaryCallback BoundaryCallback}.
*/
INITIAL,
/**
* Corresponds to the {@code loadBefore} calls in {@link DataSource} or
* Corresponds to the {@code loadBefore} calls in {@link androidx.paging.DataSource} or
* {@code onItemAtFrontLoaded} in
* {@link androidx.paging.PagedList.BoundaryCallback BoundaryCallback}.
*/
BEFORE,
/**
* Corresponds to the {@code loadAfter} calls in {@link DataSource} or
* Corresponds to the {@code loadAfter} calls in {@link androidx.paging.DataSource} or
* {@code onItemAtEndLoaded} in
* {@link androidx.paging.PagedList.BoundaryCallback BoundaryCallback}.
*/