Avoid a couple possible NullPointerExceptions
This commit is contained in:
parent
e070883934
commit
71be2d8e82
@ -214,13 +214,13 @@ public class AppDetails extends ListActivity {
|
|||||||
Uri data = i.getData();
|
Uri data = i.getData();
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
if (data.isHierarchical()) {
|
if (data.isHierarchical()) {
|
||||||
if (data.getHost().equals("details")) {
|
if (data.getHost() != null && data.getHost().equals("details")) {
|
||||||
// market://details?id=app.id
|
// market://details?id=app.id
|
||||||
appid = data.getQueryParameter("id");
|
appid = data.getQueryParameter("id");
|
||||||
} else {
|
} else {
|
||||||
// https://f-droid.org/app/app.id
|
// https://f-droid.org/app/app.id
|
||||||
appid = data.getLastPathSegment();
|
appid = data.getLastPathSegment();
|
||||||
if (appid.equals("app")) appid = null;
|
if (appid != null && appid.equals("app")) appid = null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// fdroid.app:app.id
|
// fdroid.app:app.id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user