mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Small (non) null fixes
This commit is contained in:
parent
1f302d894e
commit
b2f9da7fd7
4 changed files with 8 additions and 10 deletions
|
@ -29,7 +29,6 @@ import org.bouncycastle.asn1.DEROctetString;
|
||||||
import org.bouncycastle.asn1.x509.Extension;
|
import org.bouncycastle.asn1.x509.Extension;
|
||||||
import org.bouncycastle.asn1.x509.GeneralName;
|
import org.bouncycastle.asn1.x509.GeneralName;
|
||||||
import org.bouncycastle.asn1.x509.SubjectKeyIdentifier;
|
import org.bouncycastle.asn1.x509.SubjectKeyIdentifier;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
|
@ -1062,7 +1061,7 @@ public class EmailService implements AutoCloseable {
|
||||||
return fingerprint;
|
return fingerprint;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public synchronized String toString() {
|
public synchronized String toString() {
|
||||||
return getCause().toString();
|
return getCause().toString();
|
||||||
|
|
|
@ -92,7 +92,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.openintents.openpgp.util.OpenPgpApi;
|
import org.openintents.openpgp.util.OpenPgpApi;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
@ -301,7 +300,7 @@ public class Helper {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public T get(long timeout, @NotNull TimeUnit unit) throws ExecutionException, InterruptedException, TimeoutException {
|
public T get(long timeout, @NonNull TimeUnit unit) throws ExecutionException, InterruptedException, TimeoutException {
|
||||||
return wrapped.get(timeout, unit);
|
return wrapped.get(timeout, unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1630,6 +1630,7 @@ public class HtmlHelper {
|
||||||
return preview + "…";
|
return preview + "…";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
static String getText(Context context, String html) {
|
static String getText(Context context, String html) {
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ import android.provider.ContactsContract;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.app.Person;
|
import androidx.core.app.Person;
|
||||||
import androidx.core.content.pm.ShortcutInfoCompat;
|
import androidx.core.content.pm.ShortcutInfoCompat;
|
||||||
import androidx.core.content.pm.ShortcutManagerCompat;
|
import androidx.core.content.pm.ShortcutManagerCompat;
|
||||||
|
@ -43,8 +44,6 @@ import androidx.core.graphics.drawable.IconCompat;
|
||||||
import androidx.lifecycle.LifecycleOwner;
|
import androidx.lifecycle.LifecycleOwner;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -118,7 +117,7 @@ class Shortcuts {
|
||||||
}.execute(context, owner, new Bundle(), "shortcuts:update");
|
}.execute(context, owner, new Bundle(), "shortcuts:update");
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NonNull
|
||||||
static ShortcutInfoCompat.Builder getShortcut(Context context, InternetAddress address) {
|
static ShortcutInfoCompat.Builder getShortcut(Context context, InternetAddress address) {
|
||||||
String name = address.getPersonal();
|
String name = address.getPersonal();
|
||||||
String email = address.getAddress();
|
String email = address.getAddress();
|
||||||
|
@ -154,17 +153,17 @@ class Shortcuts {
|
||||||
return getShortcut(context, email, name, lookupUri);
|
return getShortcut(context, email, name, lookupUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NonNull
|
||||||
static ShortcutInfoCompat.Builder getShortcut(Context context, EntityContact contact) {
|
static ShortcutInfoCompat.Builder getShortcut(Context context, EntityContact contact) {
|
||||||
return getShortcut(context, contact.email, contact.name, contact.avatar);
|
return getShortcut(context, contact.email, contact.name, contact.avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NonNull
|
||||||
private static ShortcutInfoCompat.Builder getShortcut(Context context, String email, String name, String avatar) {
|
private static ShortcutInfoCompat.Builder getShortcut(Context context, String email, String name, String avatar) {
|
||||||
return getShortcut(context, email, name, avatar == null ? null : Uri.parse(avatar));
|
return getShortcut(context, email, name, avatar == null ? null : Uri.parse(avatar));
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NonNull
|
||||||
private static ShortcutInfoCompat.Builder getShortcut(Context context, String email, String name, Uri avatar) {
|
private static ShortcutInfoCompat.Builder getShortcut(Context context, String email, String name, Uri avatar) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean identicons = prefs.getBoolean("identicons", false);
|
boolean identicons = prefs.getBoolean("identicons", false);
|
||||||
|
|
Loading…
Reference in a new issue