Browse Source

Inferring nullity

master
anthony restaino 8 years ago
parent
commit
4649d4b0b4
  1. 3
      app/src/main/java/acr/browser/lightning/activity/IncognitoActivity.java
  2. 1
      app/src/main/java/acr/browser/lightning/activity/MainActivity.java
  3. 1
      app/src/main/java/acr/browser/lightning/activity/TabsManager.java
  4. 2
      app/src/main/java/acr/browser/lightning/app/BrowserApp.java
  5. 2
      app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java
  6. 1
      app/src/main/java/acr/browser/lightning/database/BookmarkLocalSync.java
  7. 4
      app/src/main/java/acr/browser/lightning/dialog/LightningDialogBuilder.java

3
app/src/main/java/acr/browser/lightning/activity/IncognitoActivity.java

@ -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);
} }

1
app/src/main/java/acr/browser/lightning/activity/MainActivity.java

@ -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() {

1
app/src/main/java/acr/browser/lightning/activity/TabsManager.java

@ -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) {

2
app/src/main/java/acr/browser/lightning/app/BrowserApp.java

@ -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);

2
app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java

@ -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) {

1
app/src/main/java/acr/browser/lightning/database/BookmarkLocalSync.java

@ -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);

4
app/src/main/java/acr/browser/lightning/dialog/LightningDialogBuilder.java

@ -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…
Cancel
Save