aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorXavier Ducrohet <>2009-04-18 12:23:40 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-18 12:23:40 -0700
commit3247f2e3a96f82aac0f43f7b75e59a8ea414abe6 (patch)
tree4dca02e022fd821376879de571ff687a407af7e2 /eclipse
parent115934e27630cb0b8c45883cc90e33f72f0bf826 (diff)
downloadsdk-3247f2e3a96f82aac0f43f7b75e59a8ea414abe6.zip
sdk-3247f2e3a96f82aac0f43f7b75e59a8ea414abe6.tar.gz
sdk-3247f2e3a96f82aac0f43f7b75e59a8ea414abe6.tar.bz2
AI 146847: am: CL 146845 Fix detecting "home" activities when parsing the Android Manifest
Original author: xav Merged from: //branches/cupcake/... Automated import of CL 146847
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/MainLaunchConfigTab.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/AndroidManifestParser.java13
2 files changed, 9 insertions, 6 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/MainLaunchConfigTab.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/MainLaunchConfigTab.java
index a32c2ee..f2a30de 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/MainLaunchConfigTab.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/MainLaunchConfigTab.java
@@ -414,7 +414,7 @@ public class MainLaunchConfigTab extends AbstractLaunchConfigurationTab {
mActivityCombo.removeAll();
for (Activity activity : activities) {
- if (activity.getExported() && activity.hasAction()) {
+ if (activity.isExported() && activity.hasAction()) {
mActivities.add(activity);
mActivityCombo.add(activity.getName());
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/AndroidManifestParser.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/AndroidManifestParser.java
index 69982fc..3b5c823 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/AndroidManifestParser.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/AndroidManifestParser.java
@@ -110,22 +110,22 @@ public class AndroidManifestParser {
*/
public static class Activity {
private final String mName;
- private final boolean mExported;
+ private final boolean mIsExported;
private boolean mHasAction = false;
private boolean mHasMainAction = false;
private boolean mHasLauncherCategory = false;
public Activity(String name, boolean exported) {
mName = name;
- mExported = exported;
+ mIsExported = exported;
}
public String getName() {
return mName;
}
- public boolean getExported() {
- return mExported;
+ public boolean isExported() {
+ return mIsExported;
}
public boolean hasAction() {
@@ -430,7 +430,10 @@ public class AndroidManifestParser {
case LEVEL_INTENT_FILTER:
// if we found both a main action and a launcher category, this is our
// launcher activity!
- if (mCurrentActivity != null && mCurrentActivity.isHomeActivity()) {
+ if (mLauncherActivity == null &&
+ mCurrentActivity != null &&
+ mCurrentActivity.isHomeActivity() &&
+ mCurrentActivity.isExported()) {
mLauncherActivity = mCurrentActivity;
}
break;