From db88f86e0756ea44414a4da9353af36e39d511dc Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Thu, 9 May 2013 07:55:33 +0200 Subject: fix #1781: Remove help function --- main/res/drawable-hdpi/actionbar_manual.png | Bin 652 -> 0 bytes main/res/drawable-ldpi/actionbar_manual.png | Bin 501 -> 0 bytes main/res/drawable-mdpi/actionbar_manual.png | Bin 769 -> 0 bytes main/res/drawable-mdpi/helper_manual.png | Bin 50536 -> 0 bytes main/res/layout-land/coords.xml | 2 - main/res/layout-land/navigate.xml | 2 +- main/res/layout/actionbar_button_manual.xml | 14 - main/res/layout/actionbar_with_manual.xml | 9 - main/res/layout/caches.xml | 6 +- main/res/layout/cacheview.xml | 2 - main/res/layout/coords.xml | 2 +- main/res/layout/edit_waypoint_activity.xml | 2 +- main/res/layout/init.xml | 2 +- main/res/layout/main.xml | 39 +-- main/res/layout/map_google.xml | 6 +- main/res/layout/map_mapsforge.xml | 6 +- main/res/layout/map_mapsforge_old.xml | 6 +- main/res/layout/navigate.xml | 2 - main/res/layout/point.xml | 2 +- main/res/layout/popup.xml | 6 +- main/res/layout/search.xml | 2 +- main/res/layout/touch.xml | 4 +- main/res/layout/trackable_activity.xml | 2 +- main/res/layout/visit.xml | 4 +- main/res/layout/visit_image.xml | 10 +- main/res/layout/waypoint_popup.xml | 4 +- main/res/values-cs/strings.xml | 2 - main/res/values-de/strings.xml | 2 - main/res/values-es/strings.xml | 2 - main/res/values-fr/strings.xml | 2 - main/res/values-hu/strings.xml | 2 - main/res/values-it/strings.xml | 2 - main/res/values-ja/strings.xml | 2 - main/res/values-nl/strings.xml | 2 - main/res/values-pl/strings.xml | 2 - main/res/values-pt/strings.xml | 2 - main/res/values-sk/strings.xml | 2 - main/res/values-sv/strings.xml | 2 - main/res/values/strings.xml | 2 - .../cgeo/geocaching/AbstractLoggingActivity.java | 4 - .../src/cgeo/geocaching/AbstractPopupActivity.java | 9 +- main/src/cgeo/geocaching/CacheDetailActivity.java | 5 - main/src/cgeo/geocaching/CachePopup.java | 2 +- main/src/cgeo/geocaching/EditWaypointActivity.java | 6 - main/src/cgeo/geocaching/ImageSelectActivity.java | 4 - main/src/cgeo/geocaching/LogTrackableActivity.java | 4 - main/src/cgeo/geocaching/MainActivity.java | 27 -- .../cgeo/geocaching/NavigateAnyPointActivity.java | 4 - main/src/cgeo/geocaching/SearchActivity.java | 4 - main/src/cgeo/geocaching/SettingsActivity.java | 4 - main/src/cgeo/geocaching/TrackableActivity.java | 4 - main/src/cgeo/geocaching/UsefulAppsActivity.java | 13 - main/src/cgeo/geocaching/VisitCacheActivity.java | 4 - main/src/cgeo/geocaching/WaypointPopup.java | 2 +- .../cgeo/geocaching/activity/AbstractActivity.java | 16 +- .../geocaching/activity/AbstractListActivity.java | 13 +- .../activity/AbstractViewPagerActivity.java | 4 - .../cgeo/geocaching/activity/ActivityMixin.java | 18 - .../geocaching/activity/IAbstractActivity.java | 2 - main/src/cgeo/geocaching/cgeocaches.java | 16 - main/src/cgeo/geocaching/cgeonavigate.java | 2 +- main/src/cgeo/geocaching/maps/AbstractMap.java | 2 - main/src/cgeo/geocaching/maps/CGeoMap.java | 6 - .../geocaching/maps/google/GoogleMapActivity.java | 6 - .../maps/interfaces/MapActivityImpl.java | 2 - .../maps/mapsforge/MapsforgeMapActivity.java | 6 - .../mapsforge/v024/MapsforgeMapActivity024.java | 6 - .../ui/dialog/CoordinatesInputDialog.java | 8 - .../app/appmanualclient/AppManualReaderClient.java | 375 --------------------- 69 files changed, 32 insertions(+), 706 deletions(-) delete mode 100644 main/res/drawable-hdpi/actionbar_manual.png delete mode 100644 main/res/drawable-ldpi/actionbar_manual.png delete mode 100644 main/res/drawable-mdpi/actionbar_manual.png delete mode 100644 main/res/drawable-mdpi/helper_manual.png delete mode 100644 main/res/layout/actionbar_button_manual.xml delete mode 100644 main/res/layout/actionbar_with_manual.xml delete mode 100644 main/thirdparty/gnu/android/app/appmanualclient/AppManualReaderClient.java (limited to 'main') diff --git a/main/res/drawable-hdpi/actionbar_manual.png b/main/res/drawable-hdpi/actionbar_manual.png deleted file mode 100644 index 0b0c93c..0000000 Binary files a/main/res/drawable-hdpi/actionbar_manual.png and /dev/null differ diff --git a/main/res/drawable-ldpi/actionbar_manual.png b/main/res/drawable-ldpi/actionbar_manual.png deleted file mode 100644 index 14af11d..0000000 Binary files a/main/res/drawable-ldpi/actionbar_manual.png and /dev/null differ diff --git a/main/res/drawable-mdpi/actionbar_manual.png b/main/res/drawable-mdpi/actionbar_manual.png deleted file mode 100644 index a71acb3..0000000 Binary files a/main/res/drawable-mdpi/actionbar_manual.png and /dev/null differ diff --git a/main/res/drawable-mdpi/helper_manual.png b/main/res/drawable-mdpi/helper_manual.png deleted file mode 100644 index c3c43db..0000000 Binary files a/main/res/drawable-mdpi/helper_manual.png and /dev/null differ diff --git a/main/res/layout-land/coords.xml b/main/res/layout-land/coords.xml index 30cc6b5..88e5e76 100644 --- a/main/res/layout-land/coords.xml +++ b/main/res/layout-land/coords.xml @@ -10,8 +10,6 @@ - - - + - - - - - - - \ No newline at end of file diff --git a/main/res/layout/actionbar_with_manual.xml b/main/res/layout/actionbar_with_manual.xml deleted file mode 100644 index d56c14e..0000000 --- a/main/res/layout/actionbar_with_manual.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/main/res/layout/caches.xml b/main/res/layout/caches.xml index dea9357..5c3abbc 100644 --- a/main/res/layout/caches.xml +++ b/main/res/layout/caches.xml @@ -7,12 +7,10 @@ - + - - - + diff --git a/main/res/layout/cacheview.xml b/main/res/layout/cacheview.xml index ec30672..44765dc 100644 --- a/main/res/layout/cacheview.xml +++ b/main/res/layout/cacheview.xml @@ -11,8 +11,6 @@ - - - + - + - + - - - + - - - - - - - - - + - - - + diff --git a/main/res/layout/map_mapsforge.xml b/main/res/layout/map_mapsforge.xml index 27d6e0d..1833da3 100644 --- a/main/res/layout/map_mapsforge.xml +++ b/main/res/layout/map_mapsforge.xml @@ -6,13 +6,11 @@ - + - - - + diff --git a/main/res/layout/map_mapsforge_old.xml b/main/res/layout/map_mapsforge_old.xml index f2cb175..6ca98e1 100644 --- a/main/res/layout/map_mapsforge_old.xml +++ b/main/res/layout/map_mapsforge_old.xml @@ -6,13 +6,11 @@ - + - - - + diff --git a/main/res/layout/navigate.xml b/main/res/layout/navigate.xml index 4486884..ae51735 100644 --- a/main/res/layout/navigate.xml +++ b/main/res/layout/navigate.xml @@ -5,8 +5,6 @@ android:background="?background_color" android:orientation="vertical" > - - diff --git a/main/res/layout/point.xml b/main/res/layout/point.xml index 5297d6d..baa568c 100644 --- a/main/res/layout/point.xml +++ b/main/res/layout/point.xml @@ -5,7 +5,7 @@ android:background="?background_color" android:orientation="vertical" > - + - - - - + + - + - + - - - + - + - - - + - - - + android:entries="@array/log_image_scales" + android:prompt="@string/log_image_scale" /> + - - - + Zamítnout - Manuál - Komplexní příručka aplikace c:geo obsahující popis všech možností této aplikace (včetně těch skrytých). c:geo modul kalendáře c:geo modul kalendáře není nainstalován. Umožňuje exportovat události keší do tvého kalendáře. diff --git a/main/res/values-de/strings.xml b/main/res/values-de/strings.xml index 26fd2d3..5d19848 100644 --- a/main/res/values-de/strings.xml +++ b/main/res/values-de/strings.xml @@ -813,8 +813,6 @@ Ablehnen - Anleitung - Umfangreiche Anleitung für c:geo mit Beschreibung aller Möglichkeiten dieser App (auch versteckte). c:geo Kalender Add-on c:geo Kalender Add-on nicht installiert Ermöglicht die Übernahme von Event-Caches in den Kalender. diff --git a/main/res/values-es/strings.xml b/main/res/values-es/strings.xml index f029d9b..b618fb9 100644 --- a/main/res/values-es/strings.xml +++ b/main/res/values-es/strings.xml @@ -627,8 +627,6 @@ Descartar - Manual - Sencillo manual de c:geo que contiene todas las capacidades de este programa (incluidas las ocultas). Locus Sencilla aplicación que muestra mapas en línea y permite descargarlos para ser usados sin conexión (sólo mapas no vectoriales). También permite registrar el recorrido, gestionar puntos de interés y más funciones interesantes. diff --git a/main/res/values-fr/strings.xml b/main/res/values-fr/strings.xml index a0f86e6..2f5fccb 100644 --- a/main/res/values-fr/strings.xml +++ b/main/res/values-fr/strings.xml @@ -817,8 +817,6 @@ Rejeter - Manuel - Manuel complet pour c:geo contenant la description de toutes les fonctionnalités de cette application (y compris celle secrètes). Module supplémentaire c:geo agenda Module supplémentaire c:geo agenda non installé Permet d\'exporter les événements liés aux caches dans le calendrier Android. diff --git a/main/res/values-hu/strings.xml b/main/res/values-hu/strings.xml index e7018f9..689912c 100644 --- a/main/res/values-hu/strings.xml +++ b/main/res/values-hu/strings.xml @@ -759,8 +759,6 @@ Elutasítás - Kézikönyv - Részletes kézikönyv a c:geo-hoz amiben az összes lehetőség leírása szerepel. (még a rejtettek is). c:geo naptár add-on c:geo naptár add-on nincs telepítve. Lehetővé teszi a geoládák exportálását az eszközöd naptárába. diff --git a/main/res/values-it/strings.xml b/main/res/values-it/strings.xml index 9614526..a36493d 100644 --- a/main/res/values-it/strings.xml +++ b/main/res/values-it/strings.xml @@ -816,8 +816,6 @@ Chiudi - Manual - Manuale dettagliato di c:geo che contiene la descrizione di tutte le possibilità offerte da questa applicazione, comprese quelle nascoste (in inglese). c:geo calendario add-on c:geo calendario add-on non installato Permette di esportare gli eventi cache nel calendario del tuo dispositivo. diff --git a/main/res/values-ja/strings.xml b/main/res/values-ja/strings.xml index 5d7759e..42f16be 100644 --- a/main/res/values-ja/strings.xml +++ b/main/res/values-ja/strings.xml @@ -793,8 +793,6 @@ 閉じる - マニュアル - c:geoのマニュアル(英語)はこのアプリでできる事(隠れ機能も)の全てについて書いてあります。 c:geo - カレンダープラグイン c:geo - カレンダープラグインはインストールされていません。 イベントキャッシュをカレンダーアプリに登録することができます。 diff --git a/main/res/values-nl/strings.xml b/main/res/values-nl/strings.xml index 8ce95a5..f4dbd10 100644 --- a/main/res/values-nl/strings.xml +++ b/main/res/values-nl/strings.xml @@ -801,8 +801,6 @@ Afwijzen - Handleiding - Uitgebreide handleiding voor c:geo welke alle mogelijkheden van deze applicatie uitlegt (ook de verborgen mogelijkheden). c:geo kalender add-on c:geo kalender add-on niet geinstalleerd. Maakt het mogelijk om Geocaching events in je kalender op te slaan. diff --git a/main/res/values-pl/strings.xml b/main/res/values-pl/strings.xml index b4fbca7..1752d03 100644 --- a/main/res/values-pl/strings.xml +++ b/main/res/values-pl/strings.xml @@ -781,8 +781,6 @@ Odmów - Instrukcja obsługi - Obszerny przewodnik do c:geo wraz z opisem wszystkich możliwości tego programu (także ukrytych). Dodatek Kalendarz c:geo Dodatek Kalendarz c:geo nie jest zainstalowany. Umożliwia Tobie eksport skrzynek Wydarzenie do kalendarza w Twoim urządzeniu. diff --git a/main/res/values-pt/strings.xml b/main/res/values-pt/strings.xml index e4bcfd4..5916133 100644 --- a/main/res/values-pt/strings.xml +++ b/main/res/values-pt/strings.xml @@ -763,8 +763,6 @@ Dispensar - Manual - Manual prático do c:geo, que contém a descrição de todas as funcionalidades desta aplicação (mesmo as que estão escondidas). Add on calendário para c:geo Add on calendário para o c:geo não está instalado. Permite exportar caches evento para o calendário do seu dispositivo. diff --git a/main/res/values-sk/strings.xml b/main/res/values-sk/strings.xml index 616bd44..af796ba 100644 --- a/main/res/values-sk/strings.xml +++ b/main/res/values-sk/strings.xml @@ -764,8 +764,6 @@ Zamietnutie - Manuál - Obsiahly manuál pre c:geo, ktorý obsahuje popisy všetkých možností tejto aplikácie (dokonca i skrytých). Doplnok c:geo calendar Doplnok c:geo calendar nie je nainštalovaný Umožní vám exportovať skrýše udalostí do kalendára na vašom zariadení. diff --git a/main/res/values-sv/strings.xml b/main/res/values-sv/strings.xml index 0f23eed..0171288 100644 --- a/main/res/values-sv/strings.xml +++ b/main/res/values-sv/strings.xml @@ -816,8 +816,6 @@ Avbryt - Manual - En utförlig manual för c:geo som beskriver alla möjligheter och ger en hel del tips. Manualen finns enbart på engelska. c:geo kalendertillägg c:geo kalendertillägg är inte installerat Gör det möjligt att exportera event till din kalender. diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml index 42abb8f..b537b74 100644 --- a/main/res/values/strings.xml +++ b/main/res/values/strings.xml @@ -827,8 +827,6 @@ Dismiss - Manual - Comprehensive manual for c:geo that contains description of all possibilities of this application (even hidden ones). c:geo calendar add-on c:geo calendar add-on not installed. Enables you to export event caches into the calendar on your device. diff --git a/main/src/cgeo/geocaching/AbstractLoggingActivity.java b/main/src/cgeo/geocaching/AbstractLoggingActivity.java index 37c3643..3e66d5e 100644 --- a/main/src/cgeo/geocaching/AbstractLoggingActivity.java +++ b/main/src/cgeo/geocaching/AbstractLoggingActivity.java @@ -20,10 +20,6 @@ public abstract class AbstractLoggingActivity extends AbstractActivity { private static final int MENU_SIGNATURE = 1; private static final int MENU_SMILEY = 2; - protected AbstractLoggingActivity(String helpTopic) { - super(helpTopic); - } - @Override public boolean onCreateOptionsMenu(final Menu menu) { // signature menu diff --git a/main/src/cgeo/geocaching/AbstractPopupActivity.java b/main/src/cgeo/geocaching/AbstractPopupActivity.java index 5ad89fb..4dd9fd1 100644 --- a/main/src/cgeo/geocaching/AbstractPopupActivity.java +++ b/main/src/cgeo/geocaching/AbstractPopupActivity.java @@ -83,8 +83,7 @@ public abstract class AbstractPopupActivity extends AbstractActivity { public void onUpdateGeoData(final IGeoData geo) { } - protected AbstractPopupActivity(String helpTopic, int layout) { - super(helpTopic); + protected AbstractPopupActivity(int layout) { this.layout = layout; } @@ -112,12 +111,6 @@ public abstract class AbstractPopupActivity extends AbstractActivity { }).start(); } - @Override - public void goManual(View view) { - super.goManual(view); - finish(); - } - protected void init() { cache = cgData.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB); diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index 1e2377b..fe17c06 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -192,11 +192,6 @@ public class CacheDetailActivity extends AbstractViewPagerActivity= 0 ? "c:geo-waypoint-edit" : "c:geo-waypoint-new"); - } - public static void startActivityEditWaypoint(final Context context, final int waypointId) { context.startActivity(new Intent(context, EditWaypointActivity.class) .putExtra(Intents.EXTRA_WAYPOINT_ID, waypointId)); diff --git a/main/src/cgeo/geocaching/ImageSelectActivity.java b/main/src/cgeo/geocaching/ImageSelectActivity.java index 7c8df5a..4abf310 100644 --- a/main/src/cgeo/geocaching/ImageSelectActivity.java +++ b/main/src/cgeo/geocaching/ImageSelectActivity.java @@ -53,10 +53,6 @@ public class ImageSelectActivity extends AbstractActivity { private int scaleChoiceIndex; private Uri imageUri; - public ImageSelectActivity() { - super("c:geo-selectimage"); - } - @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState, R.layout.visit_image); diff --git a/main/src/cgeo/geocaching/LogTrackableActivity.java b/main/src/cgeo/geocaching/LogTrackableActivity.java index 6b68225..7aee6ae 100644 --- a/main/src/cgeo/geocaching/LogTrackableActivity.java +++ b/main/src/cgeo/geocaching/LogTrackableActivity.java @@ -104,10 +104,6 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat } }; - public LogTrackableActivity() { - super("c:geo-log-trackable"); - } - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState, R.layout.touch); diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java index 0843f66..cd573ba 100644 --- a/main/src/cgeo/geocaching/MainActivity.java +++ b/main/src/cgeo/geocaching/MainActivity.java @@ -4,7 +4,6 @@ import butterknife.InjectView; import butterknife.Views; import cgeo.geocaching.activity.AbstractActivity; -import cgeo.geocaching.activity.ActivityMixin; import cgeo.geocaching.connector.gc.Login; import cgeo.geocaching.enumerations.CacheType; import cgeo.geocaching.enumerations.StatusCode; @@ -38,7 +37,6 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; -import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; @@ -51,7 +49,6 @@ import java.util.Locale; public class MainActivity extends AbstractActivity { @InjectView(R.id.user_info) protected TextView userInfoView; @InjectView(R.id.nav_satellites) protected TextView navSatellites; - @InjectView(R.id.helper) protected RelativeLayout helper; @InjectView(R.id.filter_button_title)protected TextView filterTitle; @InjectView(R.id.map) protected View findOnMap; @InjectView(R.id.search_offline) protected View findByOffline; @@ -181,10 +178,6 @@ public class MainActivity extends AbstractActivity { } }; - public MainActivity() { - super("c:geo-main-screen"); - } - @Override public void onCreate(Bundle savedInstanceState) { // don't call the super implementation with the layout argument, as that would set the wrong theme @@ -203,26 +196,6 @@ public class MainActivity extends AbstractActivity { version = Version.getVersionCode(this); Log.i("Starting " + getPackageName() + ' ' + version + " a.k.a " + Version.getVersionName(this)); - try { - if (!Settings.isHelpShown()) { - if (helper != null) { - helper.setVisibility(View.VISIBLE); - helper.setClickable(true); - helper.setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(View view) { - ActivityMixin.goManual(MainActivity.this, "c:geo-intro"); - view.setVisibility(View.GONE); - } - }); - Settings.setHelpShown(); - } - } - } catch (Exception e) { - // nothing - } - init(); } diff --git a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java index 746842d..fbd2f1b 100644 --- a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java +++ b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java @@ -102,10 +102,6 @@ public class NavigateAnyPointActivity extends AbstractActivity { String distanceUnit = ""; - public NavigateAnyPointActivity() { - super("c:geo-navigate-any"); - } - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState, R.layout.point); diff --git a/main/src/cgeo/geocaching/SearchActivity.java b/main/src/cgeo/geocaching/SearchActivity.java index a3a0797..9c7e54e 100644 --- a/main/src/cgeo/geocaching/SearchActivity.java +++ b/main/src/cgeo/geocaching/SearchActivity.java @@ -37,10 +37,6 @@ public class SearchActivity extends AbstractActivity { private EditText latEdit = null; private EditText lonEdit = null; - public SearchActivity() { - super("c:geo-search"); - } - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/main/src/cgeo/geocaching/SettingsActivity.java b/main/src/cgeo/geocaching/SettingsActivity.java index d094358..bd99552 100644 --- a/main/src/cgeo/geocaching/SettingsActivity.java +++ b/main/src/cgeo/geocaching/SettingsActivity.java @@ -123,10 +123,6 @@ public class SettingsActivity extends AbstractActivity { } }; - public SettingsActivity() { - super("c:geo-configuration"); - } - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState, R.layout.init); diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java index 9f71f69..e5468f3 100644 --- a/main/src/cgeo/geocaching/TrackableActivity.java +++ b/main/src/cgeo/geocaching/TrackableActivity.java @@ -108,10 +108,6 @@ public class TrackableActivity extends AbstractViewPagerActivity> extends AbstractActivity { - protected AbstractViewPagerActivity(String helpTopic) { - super(helpTopic); - } - /** * A {@link List} of all available pages. * diff --git a/main/src/cgeo/geocaching/activity/ActivityMixin.java b/main/src/cgeo/geocaching/activity/ActivityMixin.java index bc524ec..12ab0be 100644 --- a/main/src/cgeo/geocaching/activity/ActivityMixin.java +++ b/main/src/cgeo/geocaching/activity/ActivityMixin.java @@ -9,7 +9,6 @@ import org.apache.commons.lang3.StringUtils; import android.app.Activity; import android.app.AlertDialog; -import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.drawable.Drawable; @@ -21,8 +20,6 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; -import gnu.android.app.appmanualclient.AppManualReaderClient; - public final class ActivityMixin { public final static void goHome(final Activity fromActivity) { @@ -33,21 +30,6 @@ public final class ActivityMixin { fromActivity.finish(); } - public static void goManual(final Context context, final String helpTopic) { - if (StringUtils.isBlank(helpTopic)) { - return; - } - try { - AppManualReaderClient.openManual( - "c-geo", - helpTopic, - context, - "http://manual.cgeo.org/"); - } catch (Exception e) { - // nothing - } - } - public static void setTitle(final Activity activity, final CharSequence text) { if (StringUtils.isBlank(text)) { return; diff --git a/main/src/cgeo/geocaching/activity/IAbstractActivity.java b/main/src/cgeo/geocaching/activity/IAbstractActivity.java index 04709c6..61c218b 100644 --- a/main/src/cgeo/geocaching/activity/IAbstractActivity.java +++ b/main/src/cgeo/geocaching/activity/IAbstractActivity.java @@ -6,8 +6,6 @@ public interface IAbstractActivity { public void goHome(View view); - public void goManual(View view); - public void showToast(String text); public void showShortToast(String text); diff --git a/main/src/cgeo/geocaching/cgeocaches.java b/main/src/cgeo/geocaching/cgeocaches.java index 811425c..33dea8f 100644 --- a/main/src/cgeo/geocaching/cgeocaches.java +++ b/main/src/cgeo/geocaching/cgeocaches.java @@ -2,7 +2,6 @@ package cgeo.geocaching; import cgeo.geocaching.activity.AbstractActivity; import cgeo.geocaching.activity.AbstractListActivity; -import cgeo.geocaching.activity.ActivityMixin; import cgeo.geocaching.activity.FilteredActivity; import cgeo.geocaching.activity.Progress; import cgeo.geocaching.apps.cache.navi.NavigationAppFactory; @@ -1574,21 +1573,6 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity CGeoMap.startActivitySearch(this, searchToUse, mapTitle); } - @Override - public void goManual(View view) { - switch (type) { - case OFFLINE: - ActivityMixin.goManual(this, "c:geo-stored"); - break; - case HISTORY: - ActivityMixin.goManual(this, "c:geo-history"); - break; - default: - ActivityMixin.goManual(this, "c:geo-nearby"); - break; - } - } - private void refreshCurrentList() { switchListById(listId); } diff --git a/main/src/cgeo/geocaching/cgeonavigate.java b/main/src/cgeo/geocaching/cgeonavigate.java index b5205a6..679e2f2 100644 --- a/main/src/cgeo/geocaching/cgeonavigate.java +++ b/main/src/cgeo/geocaching/cgeonavigate.java @@ -47,7 +47,7 @@ public class cgeonavigate extends AbstractActivity { private CompassView compassView = null; public cgeonavigate() { - super("c:geo-compass", true); + super(true); } @Override diff --git a/main/src/cgeo/geocaching/maps/AbstractMap.java b/main/src/cgeo/geocaching/maps/AbstractMap.java index c028e51..d9ee751 100644 --- a/main/src/cgeo/geocaching/maps/AbstractMap.java +++ b/main/src/cgeo/geocaching/maps/AbstractMap.java @@ -63,8 +63,6 @@ public abstract class AbstractMap { public abstract void goHome(View view); - public abstract void goManual(View view); - public abstract void onSaveInstanceState(final Bundle outState); } diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index 111f384..436fcce 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -1576,12 +1576,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto ActivityMixin.goHome(activity); } - // open manual entry - @Override - public void goManual(View view) { - ActivityMixin.goManual(activity, "c:geo-live-map"); - } - @Override public View makeView() { ImageView imageView = new ImageView(activity); diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapActivity.java b/main/src/cgeo/geocaching/maps/google/GoogleMapActivity.java index 5649d19..a98241f 100644 --- a/main/src/cgeo/geocaching/maps/google/GoogleMapActivity.java +++ b/main/src/cgeo/geocaching/maps/google/GoogleMapActivity.java @@ -122,12 +122,6 @@ public class GoogleMapActivity extends MapActivity implements MapActivityImpl, F mapBase.goHome(view); } - // open manual entry - @Override - public void goManual(View view) { - mapBase.goManual(view); - } - @Override public void showFilterMenu(View view) { // do nothing, the filter bar only shows the global filter diff --git a/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java index dc7dca5..e7deebd 100644 --- a/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java +++ b/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java @@ -35,6 +35,4 @@ public interface MapActivityImpl { public abstract void goHome(View view); - public abstract void goManual(View view); - } diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java index f850402..a0384b8 100644 --- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java +++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java @@ -117,12 +117,6 @@ public class MapsforgeMapActivity extends MapActivity implements MapActivityImpl mapBase.goHome(view); } - // open manual entry - @Override - public void goManual(View view) { - mapBase.goManual(view); - } - @Override public void showFilterMenu(View view) { // do nothing, the filter bar only shows the global filter diff --git a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java index ed8a7bc..33ed30e 100644 --- a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java +++ b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java @@ -117,12 +117,6 @@ public class MapsforgeMapActivity024 extends MapActivity implements MapActivityI mapBase.goHome(view); } - // open manual entry - @Override - public void goManual(View view) { - mapBase.goManual(view); - } - @Override public void showFilterMenu(View view) { // do nothing, the filter bar only shows the global filter diff --git a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java index 63a9b09..3d93a56 100644 --- a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java +++ b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java @@ -74,14 +74,6 @@ public class CoordinatesInputDialog extends Dialog { setContentView(R.layout.coords); - findViewById(R.id.action_bar_manual).setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(View view) { - ActivityMixin.goManual(context, "c:geo-geocoordinate-input"); - } - }); - final Spinner spinner = (Spinner) findViewById(R.id.spinnerCoordinateFormats); final ArrayAdapter adapter = ArrayAdapter.createFromResource(context, diff --git a/main/thirdparty/gnu/android/app/appmanualclient/AppManualReaderClient.java b/main/thirdparty/gnu/android/app/appmanualclient/AppManualReaderClient.java deleted file mode 100644 index af4c03e..0000000 --- a/main/thirdparty/gnu/android/app/appmanualclient/AppManualReaderClient.java +++ /dev/null @@ -1,375 +0,0 @@ -package gnu.android.app.appmanualclient; - -import android.content.ActivityNotFoundException; -import android.content.Context; -import android.content.Intent; -import android.content.pm.ActivityInfo; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.net.Uri; -import android.util.Log; - -import java.util.List; - -/** - * The "App Manual Reader" client is a class to be used in applications which - * want to offer their users manuals through the gnu.android.appmanualreader - * application. Such applications do not need to include the whole - * "App Manual Reader" app but instead just have to include only this little - * package. This package then provides the mechanism to open suitable installed - * manuals. It does not include any manuals itself. - *

- * - * (c) 2011 Geocrasher (geocrasher@gmx.eu) - *

- * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation, either version 3 of the License, or (at your option) any - * later version. - *

- * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - *

- * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * @author Geocrasher - */ -public class AppManualReaderClient { - - /** - * The URI scheme used to identify application manual URIs when flinging - * Intents around within an Android device, in the hope that there are - * activities registered which will handle such application manual URIs. - * Usually, there won't be just a single activity registered but instead - * many, depending on how many manuals are installed on an Android device. - */ - public static final String URI_SCHEME_APPMANUAL = "appmanual"; - - /** - * Standardized topic for opening a manual at its beginning. - * - * @see #openManual(String, String, Context) - * @see #openManual(String, String, Context, String) - */ - public static final String TOPIC_HOME = "andtw-home"; - /** - * Standardized topic for opening the index of a manual. - * - * @see #openManual(String, String, Context) - * @see #openManual(String, String, Context, String) - */ - public static final String TOPIC_INDEX = "andtw-index"; - /** - * Standardized topic for opening a manual's "about" topic. - * - * @see #openManual(String, String, Context) - * @see #openManual(String, String, Context, String) - */ - public static final String TOPIC_ABOUT_MANUAL = "andtw-about"; - - /** - * Convenience function to open a manual at a specific topic. See - * {@link #openManual(String, String, Context, String)} for a detailed - * description. - * - * @param manualIdentifier - * the identifier of the manual to open. This identifier must - * uniquely identify the manual as such, independent of the - * particular locale the manual is intended for. - * @param topic - * the topic to open. Please do not use spaces for topic names. - * With respect to the TiddlyWiki infrastructure used for manuals - * the topic needs to the tag of a (single) tiddler. This way - * manuals can be localized (especially their topic titles) - * without breaking an app's knowledge about topics. Some - * standardized topics are predefined, such as {@link #TOPIC_HOME}, {@link #TOPIC_INDEX}, and - * {@link #TOPIC_ABOUT_MANUAL}. - * @param context - * the context (usually an Activity) from which the manual is to - * be opened. In particular, this context is required to derive - * the proper current locale configuration in order to open - * appropriate localized manuals, if installed. - * - * @exception ActivityNotFoundException - * there is no suitable manual installed and all combinations - * of locale scope failed to activate any manual. - * - * @see #openManual(String, String, Context, String, boolean) - */ - public static void openManual(String manualIdentifier, String topic, - Context context) throws ActivityNotFoundException { - openManual(manualIdentifier, topic, context, null, false); - } - - /** - * Convenience function to open a manual at a specific topic. See - * {@link #openManual(String, String, Context, String)} for a detailed - * description. - * - * @param manualIdentifier - * the identifier of the manual to open. This identifier must - * uniquely identify the manual as such, independent of the - * particular locale the manual is intended for. - * @param topic - * the topic to open. Please do not use spaces for topic names. - * With respect to the TiddlyWiki infrastructure used for manuals - * the topic needs to the tag of a (single) tiddler. This way - * manuals can be localized (especially their topic titles) - * without breaking an app's knowledge about topics. Some - * standardized topics are predefined, such as {@link #TOPIC_HOME}, {@link #TOPIC_INDEX}, and - * {@link #TOPIC_ABOUT_MANUAL}. - * @param context - * the context (usually an Activity) from which the manual is to - * be opened. In particular, this context is required to derive - * the proper current locale configuration in order to open - * appropriate localized manuals, if installed. - * @param fallbackUri - * either null or a fallback URI to be used in case - * the user has not installed any suitable manual. - * - * @exception ActivityNotFoundException - * there is no suitable manual installed and all combinations - * of locale scope failed to activate any manual. - * - * @see #openManual(String, String, Context, String, boolean) - */ - public static void openManual(String manualIdentifier, String topic, - Context context, String fallbackUri) - throws ActivityNotFoundException { - openManual(manualIdentifier, topic, context, fallbackUri, false); - } - - /** - * Opens a manual at a specific topic. At least it tries to open a manual. - * As manuals are (usually) installed separately and we use late binding in - * form of implicit intents, a lot of things can go wrong. - * - * We use late binding and the intent architecture in particular as follows: - * first, we use our own URI scheme called "appmanual". Second, we use the - * host field as a unique manual identifier (such as "c-geo" for the app - * manuals for a map which must not be named by the powers that wanna be). - * Third, a localized manual is differentiated as a path with a single - * element in form of (in this precedence) "/lang_country_variant", - * "/lang__variant", "/lang_country", "/lang", or "/". Fourth, the topic to - * open is encoded as the a fragment "#topic=mytopic". - * - * In order to support localization, manuals can register themselves with - * different URIs. - * - * @param manualIdentifier - * the identifier of the manual to open. This identifier must - * uniquely identify the manual as such, independent of the - * particular locale the manual is intended for. - * @param topic - * the topic to open. Please do not use spaces for topic names. - * With respect to the TiddlyWiki infrastructure used for manuals - * the topic needs to the tag of a (single) tiddler. This way - * manuals can be localized (especially their topic titles) - * without breaking an app's knowledge about topics. Some - * standardized topics are predefined, such as - * {@link #TOPIC_HOME}, {@link #TOPIC_INDEX}, and - * {@link #TOPIC_ABOUT_MANUAL}. - * @param context - * the context (usually an Activity) from which the manual is to - * be opened. In particular, this context is required to derive - * the proper current locale configuration in order to open - * appropriate localized manuals, if installed. - * @param fallbackUri - * either null or a fallback URI to be used in case - * the user has not installed any suitable manual. - * @param contextAffinity - * if true, then we try to open the manual within - * the context, if possible. That is, if the package of the - * calling context also offers suitable activity registrations, - * then we will prefer them over any other registrations. If you - * don't know what this means, then you probably don't need this - * very special capability and should specify false - * for this parameter. - * - * @exception ActivityNotFoundException - * there is no suitable manual installed and all combinations - * of locale scope failed to activate any manual and no - * {@literal fallbackUri} was given. - */ - public static void openManual(String manualIdentifier, String topic, - Context context, String fallbackUri, boolean contextAffinity) - throws ActivityNotFoundException { - // - // The path of an "appmanual:" URI consists simply of the locale - // information. This allows manual packages to register themselves - // for both very specific locales as well as very broad ones. - // - String localePath = "/" - + context.getResources().getConfiguration().locale.toString(); - // - // We later need this intent in order to try to launch an appropriate - // manual (respectively its manual viewer). And yes, we need to set - // the intent's category explicitly, even as we will later use - // startActivity(): if we don't do this, the proper activity won't be - // started albeit the filter almost matches. That dirty behavior (it is - // documented wrong) had cost me half a day until I noticed some - // informational log entry generated from the ActivityManager. Grrrr! - // - Intent intent = new Intent(Intent.ACTION_VIEW); - int defaultIntentFlags = intent.getFlags(); - intent.addCategory(Intent.CATEGORY_DEFAULT); - // - // Try to open the manual in the following order (subject to - // availability): - // 1. manualIdentifier_lang_country_variant (can also be - // manualIdentifier_lang__variant in some cases) - // 2. manualIdentifier_lang_country - // 3. manualIdentifier_lang - // 4. manualIdentifier - // Of course, manuals are free to register more than one Intent, - // in particular, the should register also the plain manualIdentifier - // as a suitable fallback strategy. Even when installing multiple - // manuals this doesn't matter, as the user then can choose which - // one to use on a single or permanent basis. - // - while (true) { - Uri uri = Uri.parse(URI_SCHEME_APPMANUAL + "://" + manualIdentifier - + localePath + "#topic='" + topic + "'"); - // Note: we do not use a MIME type for this. - intent.setData(uri); - intent.setFlags(defaultIntentFlags); - if ( contextAffinity ) { - // - // What is happening here? Well, here we try something that we - // would like to call "package affinity activity resolving". - // Given an implicit(!) intent we try to figure out whether the - // package of the context which is trying to open the manual is - // able to resolve the intent. If this is the case, then we - // simply turn the implicit intent into an explicit(!) intent. - // We do this by setting the concrete module, that is: package - // name (eventually the one of the calling context) and class - // name within the package. - // - List capableActivities = context - .getPackageManager() - .queryIntentActivityOptions(null, null, intent, - PackageManager.MATCH_DEFAULT_ONLY); - int capables = capableActivities.size(); - if ( capables > 1 ) { - for ( int idx = 0; idx < capables; ++idx ) { - ActivityInfo activityInfo = capableActivities.get(idx).activityInfo; - if ( activityInfo.packageName.contentEquals(context - .getPackageName()) ) { - intent.setClassName(activityInfo.packageName, - activityInfo.name); - // - // First match is okay, so we quit searching and - // continue with the usual attempt to start the - // activity. This should not fail, as we already - // found a match; yet the code is very forgiving in - // this respect and would just try another round - // with "downsized" locale requirements. - // - break; - } - } - } - // FIXME - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); - } else { - // - // No context affinity required, thus we need to set some flags: - // - // ...NEW_TASK: we want to start the manual reader activity as a - // separate - // task so that it can be kept open, yet in the background when - // returning to the application from which the manual was - // opened. - // - // ...SINGLE_TOP: - // - // ...RESET_TASK_IF_NEEDED: clear the manual reader activities - // down to the root activity. We've set the required - // ...CLEAR_WHEN_TASK_RESET above when opening the meta-manual - // with the context affinity. - // - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK - | Intent.FLAG_ACTIVITY_SINGLE_TOP - | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); - } - try { - String logTag = "appmanualclient"; - if ( Log.isLoggable(logTag, Log.INFO) ) { - Log.i(logTag, - "Trying to activate manual: uri=" + uri.toString()); - } - context.startActivity(intent); - // - // We could successfully activate the manual activity, so no - // further trials are required. - // - return; - } catch ( ActivityNotFoundException noActivity ) { - // - // Ensure that we switch back to implicit intent resolving for - // the next round. - // - intent.setComponent(null); - // - // As long as we still have some locale information, reduce it - // and try again a broader locale. - // - if ( localePath.length() > 1 ) { - int underscore = localePath.lastIndexOf('_'); - if ( underscore > 0 ) { - localePath = localePath.substring(0, underscore); - // - // Handle the case where we have a locale variant, yet - // no locale country, thus two underscores in immediate - // series. Get rid of both. - // - if ( localePath.endsWith("_") ) { - localePath = localePath - .substring(0, underscore - 1); - } - } else { - // - // Ready for the last round: try without any locale - // modifiers. - // - localePath = "/"; - } - } else { - // - // We've tried all combinations, so we've run out of them - // and bail out. - // - break; - } - } - // - // Okay, go for the next round, we've updated (or rather trimmed) - // the localeIdent, so let us try this. - // - } - // - // If we reach this code point then no suitable activity could be found - // and activated. In case the caller specified a fallback URI we will - // try to open that. As this will activate a suitable browser and this - // is an asynchronous activity we won't get back any negative results, - // such as 404's. Here we will only see such problems that prevented the - // start of a suitable browsing activity. - // - if ( fallbackUri != null ) { - intent = new Intent(Intent.ACTION_VIEW, Uri.parse(fallbackUri)); - intent.addCategory(Intent.CATEGORY_BROWSABLE); - context.startActivity(intent); - } - // - // We could not activate any manual and there was no fallback URI to - // open, so we finally bail out unsuccessful with an exception. - // - throw new ActivityNotFoundException(); - } -} -- cgit v1.1