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; @@ -17,6 +17,7 @@ import acr.browser.lightning.R;
@SuppressWarnings("deprecation")
public class IncognitoActivity extends BrowserActivity {
@NonNull
@Override
public Completable updateCookiePreference() {
return Completable.create(new CompletableAction() {
@ -33,7 +34,7 @@ public class IncognitoActivity extends BrowserActivity { @@ -33,7 +34,7 @@ public class IncognitoActivity extends BrowserActivity {
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
getMenuInflater().inflate(R.menu.incognito, 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; @@ -17,6 +17,7 @@ import acr.browser.lightning.R;
@SuppressWarnings("deprecation")
public class MainActivity extends BrowserActivity {
@NonNull
@Override
public Completable updateCookiePreference() {
return Completable.create(new CompletableAction() {

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

@ -111,6 +111,7 @@ public class TabsManager { @@ -111,6 +111,7 @@ public class TabsManager {
* @param intent the intent that started the browser activity.
* @param incognito whether or not we are in incognito mode.
*/
@NonNull
public synchronized Completable initializeTabs(@NonNull final Activity activity,
@Nullable final Intent intent,
final boolean incognito) {

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

@ -60,7 +60,7 @@ public class BrowserApp extends Application { @@ -60,7 +60,7 @@ public class BrowserApp extends Application {
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
public void uncaughtException(Thread thread, @NonNull Throwable ex) {
if (BuildConfig.DEBUG) {
FileUtils.writeCrashToStorage(ex);

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

@ -73,7 +73,7 @@ public final class BookmarkPage { @@ -73,7 +73,7 @@ public final class BookmarkPage {
@Inject Application mApp;
@Inject BookmarkManager mManager;
private final Bitmap mFolderIcon;
@NonNull private final Bitmap mFolderIcon;
@NonNull private final String mTitle;
public BookmarkPage(@NonNull Activity activity) {

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

@ -43,6 +43,7 @@ public class BookmarkLocalSync { @@ -43,6 +43,7 @@ public class BookmarkLocalSync {
mContext = context;
}
@NonNull
private List<HistoryItem> getBookmarksFromContentUri(String contentUri) {
List<HistoryItem> list = new ArrayList<>();
Cursor cursor = getBrowserCursor(contentUri);

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

@ -181,7 +181,7 @@ public class LightningDialogBuilder { @@ -181,7 +181,7 @@ public class LightningDialogBuilder {
R.string.hint_title, item.getTitle(),
R.string.action_ok, new BrowserDialog.EditorListener() {
@Override
public void onClick(String text) {
public void onClick(@NonNull String text) {
if (!TextUtils.isEmpty(text)) {
final String oldTitle = item.getTitle();
final HistoryItem editedItem = new HistoryItem();
@ -274,7 +274,7 @@ public class LightningDialogBuilder { @@ -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,
new BrowserDialog.Item(R.string.dialog_open_new_tab) {
@Override

Loading…
Cancel
Save