aboutsummaryrefslogtreecommitdiff
path: root/eclipse/plugins/com.android.ide.eclipse.ndk
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-07-26 15:41:15 -0700
committerSiva Velusamy <vsiva@google.com>2012-07-30 11:55:37 -0700
commit3685081c34cb5d240e38e714d6a0004cf4381928 (patch)
treed5041ef8d7a9454d128693d5afbde1a1fd584180 /eclipse/plugins/com.android.ide.eclipse.ndk
parent6a2d4d7796030c038ed0a59f1a68ae4d2108209f (diff)
downloadsdk-3685081c34cb5d240e38e714d6a0004cf4381928.tar.gz
Use minSdk for device/avd compatibility checks
When checking whether a device can run a certain project, the only valid conditionals are: - If the device API level is less than the minApiLevel, then the device cannot run the app. - If the app is built against a standard SDK, then the above check is sufficient. - If the app is built against an add-on, then we cannot determine for sure if a device can run the app. An AVD might provide some additional info that can be used to determine if the app cannot be run on a particular AVD. This CL fixes a bug where platforms with API level greater than the build target API level were being filtered out from the DeviceChooserDialog. It also fixes another bug where running devices that are clearly not capable of running an app were being displayed in the DeviceChooserDialog, albeit with a red check mark indicating that they cannot run the app. Selecting that device for deployment would error out in the next step. This CL filters out such devices. Fixes http://code.google.com/p/android/issues/detail?id=35367 Change-Id: Iba31a45572dabe3895c4e51707ed515d407caae0
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.ndk')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ndk/src/com/android/ide/eclipse/ndk/internal/launch/NdkGdbLaunchDelegate.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.ndk/src/com/android/ide/eclipse/ndk/internal/launch/NdkGdbLaunchDelegate.java b/eclipse/plugins/com.android.ide.eclipse.ndk/src/com/android/ide/eclipse/ndk/internal/launch/NdkGdbLaunchDelegate.java
index 1c463ab5b..57d96d7b1 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ndk/src/com/android/ide/eclipse/ndk/internal/launch/NdkGdbLaunchDelegate.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ndk/src/com/android/ide/eclipse/ndk/internal/launch/NdkGdbLaunchDelegate.java
@@ -17,16 +17,17 @@
package com.android.ide.eclipse.ndk.internal.launch;
import com.android.ddmlib.AdbCommandRejectedException;
+import com.android.ddmlib.AndroidDebugBridge;
import com.android.ddmlib.Client;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.IDevice.DeviceUnixSocketNamespace;
-import com.android.ddmlib.AndroidDebugBridge;
import com.android.ddmlib.IShellOutputReceiver;
import com.android.ddmlib.InstallException;
import com.android.ddmlib.ShellCommandUnresponsiveException;
import com.android.ddmlib.SyncException;
import com.android.ddmlib.TimeoutException;
import com.android.ide.eclipse.adt.AdtPlugin;
+import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestInfo;
import com.android.ide.eclipse.adt.internal.launch.DeviceChoiceCache;
import com.android.ide.eclipse.adt.internal.launch.DeviceChooserDialog;
import com.android.ide.eclipse.adt.internal.launch.DeviceChooserDialog.DeviceChooserResponse;
@@ -119,6 +120,10 @@ public class NdkGdbLaunchDelegate extends GdbLaunchDelegate {
}
final ManifestData manifestData = AndroidManifestHelper.parseForData(project);
+ final ManifestInfo manifestInfo = ManifestInfo.get(project);
+ final AndroidVersion minSdkVersion = new AndroidVersion(
+ manifestInfo.getMinSdkVersion(),
+ manifestInfo.getMinSdkCodeName());
// Get the activity name to launch
String activityName = getActivityToLaunch(
@@ -159,7 +164,7 @@ public class NdkGdbLaunchDelegate extends GdbLaunchDelegate {
AdtPlugin.getDisplay().getActiveShell(),
response,
manifestData.getPackage(),
- projectTarget);
+ projectTarget, minSdkVersion);
if (dialog.open() == Dialog.OK) {
DeviceChoiceCache.put(configName, response);
continueLaunch[0] = true;