From 5aa2710362c36d32f399ab20fe746419a77880de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sun, 29 Sep 2013 20:27:49 +0200 Subject: [PATCH] Leave repo uri scheme handling for later, fix search schemes --- AndroidManifest.xml | 23 +++++++------------- src/org/fdroid/fdroid/AppDetails.java | 3 ++- src/org/fdroid/fdroid/FDroid.java | 31 +++++++++++---------------- src/org/fdroid/fdroid/ManageRepo.java | 7 ------ 4 files changed, 22 insertions(+), 42 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 0d56f16ce..a8b6ca39c 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -34,6 +34,7 @@ + @@ -56,15 +57,6 @@ android:pathPrefix="/repository/browse" /> - - - - - - - - - @@ -92,6 +84,7 @@ + @@ -108,13 +101,13 @@ + android:pathPrefix="/app/" /> + android:pathPrefix="/app/" /> + android:pathPrefix="/app/" /> + android:pathPrefix="/app/" /> - + @@ -153,7 +146,7 @@ - + 0) { - Intent call = new Intent(this, AppDetails.class); - call.putExtra("appid", appid); - startActivityForResult(call, REQUEST_APPDETAILS); - } - } else { - String repoUri = data.getEncodedSchemeSpecificPart(); - if (repoUri != null && repoUri.length() > 0) { - Intent call = new Intent(this, ManageRepo.class); - call.putExtra("repoUri", repoUri); - startActivityForResult(call, REQUEST_MANAGEREPOS); - } + // http(s)://f-droid.org/repository/browse?fdid=app.id + appid = data.getQueryParameter("fdid"); } } else if (i.hasExtra(EXTRA_TAB_UPDATE)) { boolean showUpdateTab = i.getBooleanExtra(EXTRA_TAB_UPDATE, false); @@ -108,6 +96,11 @@ public class FDroid extends FragmentActivity { getTabManager().selectTab(2); } } + if (appid != null && appid.length() > 0) { + Intent call = new Intent(this, AppDetails.class); + call.putExtra("appid", appid); + startActivityForResult(call, REQUEST_APPDETAILS); + } } @Override @@ -125,10 +118,10 @@ public class FDroid extends FragmentActivity { manager.repopulateLists(); } - public void onConfigurationChanged(Configuration newConfig) { - super.onConfigurationChanged(newConfig); - getTabManager().onConfigurationChanged(newConfig); - } + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + getTabManager().onConfigurationChanged(newConfig); + } @Override public boolean onCreateOptionsMenu(Menu menu) { diff --git a/src/org/fdroid/fdroid/ManageRepo.java b/src/org/fdroid/fdroid/ManageRepo.java index 1e3882c9f..20ef64f78 100644 --- a/src/org/fdroid/fdroid/ManageRepo.java +++ b/src/org/fdroid/fdroid/ManageRepo.java @@ -80,12 +80,6 @@ public class ManageRepo extends ListActivity { super.onCreate(savedInstanceState); setContentView(R.layout.repolist); - Intent i = getIntent(); - if (i.hasExtra("repoUri")) { - addRepo(i.getStringExtra("repoUri")); - finish(); - } - SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(getBaseContext()); @@ -196,7 +190,6 @@ public class ManageRepo extends ListActivity { } finally { DB.releaseDB(); } - changed = true; } @Override