From: peli0101 Date: Sat, 17 Jan 2009 13:27:41 +0000 (+0000) Subject: OI Safe: Only show "About" dialog, if OI About (or compatible) is already installed. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=cabc12248bfce2285c94b36b2d9a7284d73c389a;p=android-vcpass-oisafe OI Safe: Only show "About" dialog, if OI About (or compatible) is already installed. git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1752 72b678ce-9140-0410-bee8-679b907dd61a --- diff --git a/src/org/openintents/safe/CategoryList.java b/src/org/openintents/safe/CategoryList.java index fe9ff76..b3fe460 100644 --- a/src/org/openintents/safe/CategoryList.java +++ b/src/org/openintents/safe/CategoryList.java @@ -29,8 +29,10 @@ import java.util.List; import java.util.Set; import org.openintents.distribution.AboutDialog; +import org.openintents.intents.AboutMiniIntents; import org.openintents.intents.CryptoIntents; import org.openintents.safe.service.ServiceDispatchImpl; +import org.openintents.util.IntentUtils; import android.app.AlertDialog; @@ -430,9 +432,13 @@ public class CategoryList extends ListActivity { menu.add(0, RESTORE_INDEX, 0, R.string.restore); menu.add(0, PREFERENCES_INDEX, 0, R.string.preferences); - menu.add(0, ABOUT_INDEX, 0, R.string.about).setIcon( - android.R.drawable.ic_menu_info_details); - + + if (IntentUtils.isIntentAvailable(this, new Intent(AboutMiniIntents.ACTION_SHOW_ABOUT_DIALOG))) { + // Only show "About" dialog, if OI About (or compatible) is installed. + menu.add(0, ABOUT_INDEX, 0, R.string.about).setIcon( + android.R.drawable.ic_menu_info_details); + } + return super.onCreateOptionsMenu(menu); }