Miscellaneous code analysis warning fixes
This commit is contained in:
parent
58c9e820ed
commit
b619a12ae3
@ -3,7 +3,6 @@ package acr.browser.lightning.utils;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Build;
|
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package acr.browser.lightning.activity;
|
package acr.browser.lightning.activity;
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class WebAddress {
|
|||||||
/*
|
/*
|
||||||
* Get port from scheme or scheme from port, if necessary and possible
|
* Get port from scheme or scheme from port, if necessary and possible
|
||||||
*/
|
*/
|
||||||
if (mPort == 443 && "".equals(mScheme)) {
|
if (mPort == 443 && mScheme != null && mScheme.isEmpty()) {
|
||||||
mScheme = "https";
|
mScheme = "https";
|
||||||
} else if (mPort == -1) {
|
} else if (mPort == -1) {
|
||||||
if ("https".equals(mScheme)) {
|
if ("https".equals(mScheme)) {
|
||||||
@ -106,7 +106,7 @@ public class WebAddress {
|
|||||||
mPort = 80; // default
|
mPort = 80; // default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ("".equals(mScheme)) {
|
if (mScheme != null && mScheme.isEmpty()) {
|
||||||
mScheme = "http";
|
mScheme = "http";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ import android.preference.Preference;
|
|||||||
import android.preference.PreferenceFragment;
|
import android.preference.PreferenceFragment;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ import android.preference.PreferenceFragment;
|
|||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
@ -238,7 +238,7 @@ public class ArticleTextExtractor {
|
|||||||
content = content.substring(1, content.length() - 1);
|
content = content.substring(1, content.length() - 1);
|
||||||
|
|
||||||
String[] split = content.split("\\s*,\\s*");
|
String[] split = content.split("\\s*,\\s*");
|
||||||
if (split.length > 1 || (split.length > 0 && !"".equals(split[0])))
|
if (split.length > 1 || (split.length > 0 && split[0] != null && !split[0].isEmpty()))
|
||||||
return Arrays.asList(split);
|
return Arrays.asList(split);
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public class MapEntry<K, V> implements Map.Entry<K, V>, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getKey() + ", " + getValue();
|
return key + ", " + value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package acr.browser.lightning.utils;
|
package acr.browser.lightning.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
@ -10,7 +9,6 @@ import android.graphics.ColorFilter;
|
|||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.PorterDuffColorFilter;
|
import android.graphics.PorterDuffColorFilter;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.support.annotation.AttrRes;
|
import android.support.annotation.AttrRes;
|
||||||
|
Loading…
Reference in New Issue
Block a user