aboutsummaryrefslogtreecommitdiffstats
path: root/sdkmanager/app
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2009-05-19 23:25:54 -0700
committerRaphael <raphael@google.com>2009-05-20 11:58:16 -0700
commit9d29cd313cefe5a71042ec9be7117efea882c386 (patch)
treef668597010b5e7e3d056f5ebacf23e9d8aa82598 /sdkmanager/app
parent323ed862d6f0196ddb62e6f76fecf48b7b892244 (diff)
downloadsdk-9d29cd313cefe5a71042ec9be7117efea882c386.zip
sdk-9d29cd313cefe5a71042ec9be7117efea882c386.tar.gz
sdk-9d29cd313cefe5a71042ec9be7117efea882c386.tar.bz2
SDK Updater: Fetch source XML, display them in tree.
There's a notion of an asynchronous task with a progress bar & status UI. That's still just experimental. Will need some refactoring, etc.
Diffstat (limited to 'sdkmanager/app')
-rw-r--r--sdkmanager/app/src/com/android/sdkmanager/Main.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/sdkmanager/app/src/com/android/sdkmanager/Main.java b/sdkmanager/app/src/com/android/sdkmanager/Main.java
index a5550b5..f90b130 100644
--- a/sdkmanager/app/src/com/android/sdkmanager/Main.java
+++ b/sdkmanager/app/src/com/android/sdkmanager/Main.java
@@ -53,7 +53,7 @@ class Main {
/** Path to the SDK folder. This is the parent of {@link #TOOLSDIR}. */
- private String mSdkFolder;
+ private String mOsSdkFolder;
/** Logger object. Use this to print normal output, warnings or errors. */
private ISdkLog mSdkLog;
/** The SDK manager parses the SDK folder and gives access to the content. */
@@ -131,18 +131,18 @@ class Main {
File tools;
if (toolsDirProp.length() > 0) {
tools = new File(toolsDirProp);
- mSdkFolder = tools.getParent();
+ mOsSdkFolder = tools.getParent();
} else {
try {
tools = new File(".").getCanonicalFile();
- mSdkFolder = tools.getParent();
+ mOsSdkFolder = tools.getParent();
} catch (IOException e) {
// Will print an error below since mSdkFolder is not defined
}
}
}
- if (mSdkFolder == null) {
+ if (mOsSdkFolder == null) {
errorAndExit("The tools directory property is not set, please make sure you are executing %1$s",
SdkConstants.androidCmdName());
}
@@ -172,7 +172,7 @@ class Main {
* Does the basic SDK parsing required for all actions
*/
private void parseSdk() {
- mSdkManager = SdkManager.createManager(mSdkFolder, mSdkLog);
+ mSdkManager = SdkManager.createManager(mOsSdkFolder, mSdkLog);
if (mSdkManager == null) {
errorAndExit("Unable to parse SDK content.");
@@ -234,7 +234,9 @@ class Main {
*/
private void showMainWindow() {
try {
- UpdaterWindow window = new UpdaterWindow();
+ UpdaterWindow window = new UpdaterWindow(
+ mOsSdkFolder,
+ false /*userCanChangeSdkRoot*/);
window.open();
} catch (Exception e) {
e.printStackTrace();
@@ -254,7 +256,7 @@ class Main {
}
IAndroidTarget target = targets[targetId - 1];
- ProjectCreator creator = new ProjectCreator(mSdkFolder,
+ ProjectCreator creator = new ProjectCreator(mOsSdkFolder,
mSdkCommandLine.isVerbose() ? OutputLevel.VERBOSE :
mSdkCommandLine.isSilent() ? OutputLevel.SILENT :
OutputLevel.NORMAL,
@@ -316,7 +318,7 @@ class Main {
target = targets[targetId - 1];
}
- ProjectCreator creator = new ProjectCreator(mSdkFolder,
+ ProjectCreator creator = new ProjectCreator(mOsSdkFolder,
mSdkCommandLine.isVerbose() ? OutputLevel.VERBOSE :
mSdkCommandLine.isSilent() ? OutputLevel.SILENT :
OutputLevel.NORMAL,
@@ -766,7 +768,7 @@ class Main {
mSdkLog.printf("\n"); // empty line
// get the list of possible hardware properties
- File hardwareDefs = new File (mSdkFolder + File.separator +
+ File hardwareDefs = new File (mOsSdkFolder + File.separator +
SdkConstants.OS_SDK_TOOLS_LIB_FOLDER, SdkConstants.FN_HARDWARE_INI);
List<HardwareProperty> list = HardwareProperties.parseHardwareDefinitions(hardwareDefs,
null /*sdkLog*/);