Inferring nullity
This commit is contained in:
parent
72e5b0fa91
commit
4649d4b0b4
@ -17,6 +17,7 @@ import acr.browser.lightning.R;
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class IncognitoActivity extends BrowserActivity {
|
public class IncognitoActivity extends BrowserActivity {
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Completable updateCookiePreference() {
|
public Completable updateCookiePreference() {
|
||||||
return Completable.create(new CompletableAction() {
|
return Completable.create(new CompletableAction() {
|
||||||
@ -33,7 +34,7 @@ public class IncognitoActivity extends BrowserActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
|
||||||
getMenuInflater().inflate(R.menu.incognito, menu);
|
getMenuInflater().inflate(R.menu.incognito, menu);
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import acr.browser.lightning.R;
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class MainActivity extends BrowserActivity {
|
public class MainActivity extends BrowserActivity {
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Completable updateCookiePreference() {
|
public Completable updateCookiePreference() {
|
||||||
return Completable.create(new CompletableAction() {
|
return Completable.create(new CompletableAction() {
|
||||||
|
@ -111,6 +111,7 @@ public class TabsManager {
|
|||||||
* @param intent the intent that started the browser activity.
|
* @param intent the intent that started the browser activity.
|
||||||
* @param incognito whether or not we are in incognito mode.
|
* @param incognito whether or not we are in incognito mode.
|
||||||
*/
|
*/
|
||||||
|
@NonNull
|
||||||
public synchronized Completable initializeTabs(@NonNull final Activity activity,
|
public synchronized Completable initializeTabs(@NonNull final Activity activity,
|
||||||
@Nullable final Intent intent,
|
@Nullable final Intent intent,
|
||||||
final boolean incognito) {
|
final boolean incognito) {
|
||||||
|
@ -60,7 +60,7 @@ public class BrowserApp extends Application {
|
|||||||
|
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void uncaughtException(Thread thread, Throwable ex) {
|
public void uncaughtException(Thread thread, @NonNull Throwable ex) {
|
||||||
|
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
FileUtils.writeCrashToStorage(ex);
|
FileUtils.writeCrashToStorage(ex);
|
||||||
|
@ -73,7 +73,7 @@ public final class BookmarkPage {
|
|||||||
@Inject Application mApp;
|
@Inject Application mApp;
|
||||||
@Inject BookmarkManager mManager;
|
@Inject BookmarkManager mManager;
|
||||||
|
|
||||||
private final Bitmap mFolderIcon;
|
@NonNull private final Bitmap mFolderIcon;
|
||||||
@NonNull private final String mTitle;
|
@NonNull private final String mTitle;
|
||||||
|
|
||||||
public BookmarkPage(@NonNull Activity activity) {
|
public BookmarkPage(@NonNull Activity activity) {
|
||||||
|
@ -43,6 +43,7 @@ public class BookmarkLocalSync {
|
|||||||
mContext = context;
|
mContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
private List<HistoryItem> getBookmarksFromContentUri(String contentUri) {
|
private List<HistoryItem> getBookmarksFromContentUri(String contentUri) {
|
||||||
List<HistoryItem> list = new ArrayList<>();
|
List<HistoryItem> list = new ArrayList<>();
|
||||||
Cursor cursor = getBrowserCursor(contentUri);
|
Cursor cursor = getBrowserCursor(contentUri);
|
||||||
|
@ -181,7 +181,7 @@ public class LightningDialogBuilder {
|
|||||||
R.string.hint_title, item.getTitle(),
|
R.string.hint_title, item.getTitle(),
|
||||||
R.string.action_ok, new BrowserDialog.EditorListener() {
|
R.string.action_ok, new BrowserDialog.EditorListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text) {
|
public void onClick(@NonNull String text) {
|
||||||
if (!TextUtils.isEmpty(text)) {
|
if (!TextUtils.isEmpty(text)) {
|
||||||
final String oldTitle = item.getTitle();
|
final String oldTitle = item.getTitle();
|
||||||
final HistoryItem editedItem = new HistoryItem();
|
final HistoryItem editedItem = new HistoryItem();
|
||||||
@ -274,7 +274,7 @@ public class LightningDialogBuilder {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showLongPressLinkDialog(@NonNull final Activity activity, final String url) {
|
public void showLongPressLinkDialog(@NonNull final Activity activity, @NonNull final String url) {
|
||||||
BrowserDialog.show(activity, url,
|
BrowserDialog.show(activity, url,
|
||||||
new BrowserDialog.Item(R.string.dialog_open_new_tab) {
|
new BrowserDialog.Item(R.string.dialog_open_new_tab) {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user