Fixed a number of lint warnings
This commit is contained in:
parent
7f07edcdf7
commit
d5102b5e54
@ -49,7 +49,7 @@ public class BookmarksDialogBuilder {
|
||||
public void showLongPressedDialogForUrl(final Context context, final String url) {
|
||||
final HistoryItem item;
|
||||
if (url.startsWith(Constants.FILE) && url.endsWith(Constants.BOOKMARKS_FILENAME)) {
|
||||
// TODO this in so many ways is wrong, probably we need to redesign the folder mechanism
|
||||
// TODO hacky, make a better bookmark mechanism in the future
|
||||
final Uri uri = Uri.parse(url);
|
||||
final String filename = uri.getLastPathSegment();
|
||||
final String folderTitle = filename.substring(0, filename.length() - Constants.BOOKMARKS_FILENAME.length() - 1);
|
||||
@ -125,7 +125,6 @@ public class BookmarksDialogBuilder {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
HistoryItem editedItem = new HistoryItem();
|
||||
String currentFolder = item.getFolder();
|
||||
editedItem.setTitle(getTitle.getText().toString());
|
||||
editedItem.setUrl(getUrl.getText().toString());
|
||||
editedItem.setUrl(getUrl.getText().toString());
|
||||
|
@ -33,7 +33,6 @@ public class BookmarkSettingsFragment extends PreferenceFragment implements Pref
|
||||
@Inject BookmarkManager mBookmarkManager;
|
||||
private File[] mFileList;
|
||||
private String[] mFileNameList;
|
||||
private PermissionsManager mPermissionsManager;
|
||||
private static final String[] REQUIRED_PERMISSIONS = new String[]{
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
@ -51,9 +50,9 @@ public class BookmarkSettingsFragment extends PreferenceFragment implements Pref
|
||||
|
||||
initPrefs();
|
||||
|
||||
mPermissionsManager = PermissionsManager.getInstance();
|
||||
PermissionsManager permissionsManager = PermissionsManager.getInstance();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
mPermissionsManager.requestPermissionsIfNecessary(getActivity(), REQUIRED_PERMISSIONS);
|
||||
permissionsManager.requestPermissionsIfNecessary(getActivity(), REQUIRED_PERMISSIONS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ public class BookmarksFragment extends Fragment implements View.OnClickListener,
|
||||
private Bitmap mWebpageBitmap, mFolderBitmap;
|
||||
|
||||
// Bookmarks
|
||||
private List<HistoryItem> mBookmarks = new ArrayList<>();
|
||||
private final List<HistoryItem> mBookmarks = new ArrayList<>();
|
||||
|
||||
// Views
|
||||
private ListView mBookmarksListView;
|
||||
@ -222,7 +222,6 @@ public class BookmarksFragment extends Fragment implements View.OnClickListener,
|
||||
|
||||
@Subscribe
|
||||
public void bookmarkDeleted(final BookmarkEvents.Deleted event) {
|
||||
final HistoryItem item = event.item;
|
||||
// final int size = mBookmarks.size();
|
||||
mBookmarks.remove(event.item);
|
||||
// assert mBookmarks.size() < size;
|
||||
|
@ -228,7 +228,6 @@ public class GeneralSettingsFragment extends PreferenceFragment implements Prefe
|
||||
}
|
||||
|
||||
private void setProxyChoice(int choice) {
|
||||
ProxyUtils utils = ProxyUtils.getInstance(mActivity);
|
||||
switch (choice) {
|
||||
case Constants.PROXY_ORBOT:
|
||||
choice = ProxyUtils.setProxyChoice(choice, mActivity);
|
||||
|
@ -402,7 +402,7 @@ public class SearchAdapter extends BaseAdapter implements Filterable {
|
||||
return connectivity.getActiveNetworkInfo();
|
||||
}
|
||||
|
||||
//TODO Write simpler algorithm
|
||||
// The old suggestions algorithm, leaving here just for reference
|
||||
// private List<HistoryItem> getSuggestions() {
|
||||
// List<HistoryItem> filteredList = new ArrayList<>();
|
||||
//
|
||||
|
@ -736,8 +736,7 @@ public class ArticleTextExtractor {
|
||||
}
|
||||
|
||||
private static String extractType(Document doc) {
|
||||
String type = SHelper.innerTrim(doc.select("head meta[property=og:type]").attr("content"));
|
||||
return type;
|
||||
return SHelper.innerTrim(doc.select("head meta[property=og:type]").attr("content"));
|
||||
}
|
||||
|
||||
private static String extractSitename(Document doc) {
|
||||
|
@ -16,7 +16,7 @@ import java.util.Set;
|
||||
public class PermissionsManager {
|
||||
|
||||
private static PermissionsManager mInstance;
|
||||
private Set<String> mPendingRequests = new HashSet<>();
|
||||
private final Set<String> mPendingRequests = new HashSet<>();
|
||||
|
||||
public static PermissionsManager getInstance() {
|
||||
if (mInstance == null) {
|
||||
|
@ -72,8 +72,8 @@ public class LightningView {
|
||||
private final Title mTitle;
|
||||
private WebView mWebView;
|
||||
private final boolean mIsIncognitoTab;
|
||||
private BrowserController mBrowserController;
|
||||
private GestureDetector mGestureDetector;
|
||||
private final BrowserController mBrowserController;
|
||||
private final GestureDetector mGestureDetector;
|
||||
private final Activity mActivity;
|
||||
private static String mHomepage;
|
||||
private static String mDefaultUserAgent;
|
||||
@ -81,7 +81,7 @@ public class LightningView {
|
||||
private final Bitmap mWebpageBitmap;
|
||||
private static PreferenceManager mPreferences;
|
||||
private final AdBlock mAdBlock;
|
||||
private IntentUtils mIntentUtils;
|
||||
private final IntentUtils mIntentUtils;
|
||||
private final Paint mPaint = new Paint();
|
||||
private boolean isForegroundTab;
|
||||
private boolean mTextReflow = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user