Fix for Bug 11934 [C3 SDK - If devices.xml has a drive a rescan will created a second instance].
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java Mon Aug 30 14:54:10 2010 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java Mon Aug 30 16:39:11 2010 -0500
@@ -318,6 +318,9 @@
sdk = SymbianSDKFactory.createInstance(id,
entry.getEpocRoot(),
osVersion);
+ if (isInSDKList(sdk)) {
+ continue;
+ }
((SymbianSDK)sdk).setEnabled(entry.isEnabled());
synchronized (sdkList) {
sdkList.add(sdk);
@@ -348,6 +351,13 @@
}
/**
+ * Check whether an SDK already exist in SDK list.
+ * @param sdk - SDK to be checked
+ * @return true if SDK already exist in SDK list, false otherwise
+ */
+ abstract protected boolean isInSDKList(ISymbianSDK sdk);
+
+ /**
* Tell whether EPOCROOT can be changed for a given ISymbianSDK
* @return flag
*/
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java Mon Aug 30 14:54:10 2010 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java Mon Aug 30 16:39:11 2010 -0500
@@ -97,6 +97,9 @@
for (Iterator iter = devices.iterator(); iter.hasNext();) {
SymbianSDK sdk = new SymbianSDK((DeviceType) iter.next());
sdk.addSupportedFeature(ISymbianSDKFeatures.IS_FROM_DEVICES_XML);
+ if (isInSDKList(sdk)) {
+ continue;
+ }
sdkList.add(sdk);
}
}
@@ -484,7 +487,8 @@
}
}
- private boolean isInSDKList(ISymbianSDK sdk) {
+ @Override
+ protected boolean isInSDKList(ISymbianSDK sdk) {
for (ISymbianSDK entry : sdkList) {
if (entry.getEPOCROOT().equalsIgnoreCase(sdk.getEPOCROOT())) {
return true;
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManagerRaptorOnly.java Mon Aug 30 14:54:10 2010 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManagerRaptorOnly.java Mon Aug 30 16:39:11 2010 -0500
@@ -135,7 +135,17 @@
public void updateSDK(ISymbianSDK sdkId) {
updateCarbideSDKCache();
}
-
+
+ @Override
+ protected boolean isInSDKList(ISymbianSDK sdk) {
+ for (ISymbianSDK entry : sdkList) {
+ if (entry.getEPOCROOT().equalsIgnoreCase(sdk.getEPOCROOT())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
@Override
protected boolean isEPOCRootFixed() {
return false;