From aa164dd0903c17a886232c7fcbe7d26c49c02f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sun, 28 Jul 2013 09:23:53 +0200 Subject: [PATCH] Also open web repo links right away No fdid opens the app normally, listing all the apps. If fdid is present, that app is opened. --- AndroidManifest.xml | 12 ++++++++++++ src/org/fdroid/fdroid/FDroid.java | 12 +++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 261ba4ae3..0ddb01cfa 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -39,6 +39,18 @@ + + + + + + + + + + diff --git a/src/org/fdroid/fdroid/FDroid.java b/src/org/fdroid/fdroid/FDroid.java index 4dc1deee4..1476719b9 100644 --- a/src/org/fdroid/fdroid/FDroid.java +++ b/src/org/fdroid/fdroid/FDroid.java @@ -83,7 +83,17 @@ public class FDroid extends FragmentActivity { setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); Intent i = getIntent(); - if (i.hasExtra("uri")) { + Uri data = getIntent().getData(); + if (data != null) { + String appid = data.getQueryParameter("fdid"); + // If appid == null, we just browse all the apps. + // If appid != null, we browse the app specified. + if (appid != null) { + Intent call = new Intent(this, AppDetails.class); + call.putExtra("appid", appid); + startActivityForResult(call, REQUEST_APPDETAILS); + } + } else if (i.hasExtra("uri")) { Intent call = new Intent(this, ManageRepo.class); call.putExtra("uri", i.getStringExtra("uri")); startActivityForResult(call, REQUEST_MANAGEREPOS);