Fix NPE
This commit is contained in:
parent
e46e4c37f9
commit
c571408815
2 changed files with 3 additions and 4 deletions
|
@ -108,7 +108,7 @@ public class ImportHelper {
|
|||
return false;
|
||||
}
|
||||
|
||||
public void handleFavouritesImport(Uri uri) {
|
||||
public void handleFavouritesImport(@NonNull Uri uri) {
|
||||
String scheme = uri.getScheme();
|
||||
boolean isFileIntent = "file".equals(scheme);
|
||||
boolean isContentIntent = "content".equals(scheme);
|
||||
|
|
|
@ -141,9 +141,8 @@ public class FavoritesActivity extends TabActivity {
|
|||
}
|
||||
}
|
||||
} else if (requestCode == IMPORT_FAVOURITES_REQUEST && resultCode == Activity.RESULT_OK) {
|
||||
if (data != null) {
|
||||
Uri uri = data.getData();
|
||||
importHelper.handleFavouritesImport(uri);
|
||||
if (data != null && data.getData() != null) {
|
||||
importHelper.handleFavouritesImport(data.getData());
|
||||
}
|
||||
} else {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
|
Loading…
Reference in a new issue