Merge branch 'readonly-p4-master'
This commit is contained in:
committed by
The Android Open Source Project
commit
038ef186ae
@@ -177,6 +177,8 @@ public class AdtPlugin extends AbstractUIPlugin {
|
|||||||
private ArrayList<ITargetChangeListener> mTargetChangeListeners =
|
private ArrayList<ITargetChangeListener> mTargetChangeListeners =
|
||||||
new ArrayList<ITargetChangeListener>();
|
new ArrayList<ITargetChangeListener>();
|
||||||
|
|
||||||
|
protected boolean mSdkIsLoading;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom PrintStream for Dx output. This class overrides the method
|
* Custom PrintStream for Dx output. This class overrides the method
|
||||||
* <code>println()</code> and adds the standard output tag with the
|
* <code>println()</code> and adds the standard output tag with the
|
||||||
@@ -1011,6 +1013,14 @@ public class AdtPlugin extends AbstractUIPlugin {
|
|||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
if (mSdkIsLoading) {
|
||||||
|
return new Status(IStatus.WARNING, PLUGIN_ID,
|
||||||
|
"An Android SDK is already being loaded. Please try again later.");
|
||||||
|
}
|
||||||
|
|
||||||
|
mSdkIsLoading = true;
|
||||||
|
|
||||||
SubMonitor progress = SubMonitor.convert(monitor,
|
SubMonitor progress = SubMonitor.convert(monitor,
|
||||||
"Initialize SDK Manager", 100);
|
"Initialize SDK Manager", 100);
|
||||||
|
|
||||||
@@ -1093,6 +1103,7 @@ public class AdtPlugin extends AbstractUIPlugin {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
|
mSdkIsLoading = false;
|
||||||
if (monitor != null) {
|
if (monitor != null) {
|
||||||
monitor.done();
|
monitor.done();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user