diff options
author | Raphael Moll <ralf@android.com> | 2010-10-18 16:16:09 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2010-10-18 17:04:54 -0700 |
commit | e3958399c5da4569f6ee795eabfb2b7607ca7f6e (patch) | |
tree | dd11bd00e0549fbd4077bbde5034b5087f6ce8da /sdkmanager | |
parent | 7181175ad101e53932d83ca7b6a794346e6e25e3 (diff) | |
download | sdk-e3958399c5da4569f6ee795eabfb2b7607ca7f6e.zip sdk-e3958399c5da4569f6ee795eabfb2b7607ca7f6e.tar.gz sdk-e3958399c5da4569f6ee795eabfb2b7607ca7f6e.tar.bz2 |
Integrate 11357696 into tools_r8. DO NOT MERGE
SDK Manager: Restart ADB after platform-tools update.
Change-Id: Ie59201a3f303e1a9a837e82cbf4a83f620b4e7f2
Diffstat (limited to 'sdkmanager')
-rwxr-xr-x | sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdaterData.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdaterData.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdaterData.java index a2092e0..4661833 100755 --- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdaterData.java +++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdaterData.java @@ -29,12 +29,12 @@ import com.android.sdklib.internal.repository.ITaskFactory; import com.android.sdklib.internal.repository.ITaskMonitor;
import com.android.sdklib.internal.repository.LocalSdkParser;
import com.android.sdklib.internal.repository.Package;
+import com.android.sdklib.internal.repository.PlatformToolPackage;
import com.android.sdklib.internal.repository.SdkAddonSource;
import com.android.sdklib.internal.repository.SdkRepoSource;
import com.android.sdklib.internal.repository.SdkSource;
import com.android.sdklib.internal.repository.SdkSourceCategory;
import com.android.sdklib.internal.repository.SdkSources;
-import com.android.sdklib.internal.repository.ToolPackage;
import com.android.sdklib.internal.repository.AddonsListFetcher.Site;
import com.android.sdklib.repository.SdkAddonConstants;
import com.android.sdklib.repository.SdkAddonsListConstants;
@@ -407,7 +407,7 @@ class UpdaterData implements IUpdaterData { monitor.setDescription("Preparing to install archives");
boolean installedAddon = false;
- boolean installedTools = false;
+ boolean installedPlatformTools = false;
// Mark all current local archives as already installed.
HashSet<Archive> installedArchives = new HashSet<Archive>();
@@ -463,11 +463,11 @@ class UpdaterData implements IUpdaterData { // is no longer installed.
installedArchives.remove(ai.getReplaced());
- // Check if we successfully installed a tool or add-on package.
+ // Check if we successfully installed a platform-tool or add-on package.
if (archive.getParentPackage() instanceof AddonPackage) {
installedAddon = true;
- } else if (archive.getParentPackage() instanceof ToolPackage) {
- installedTools = true;
+ } else if (archive.getParentPackage() instanceof PlatformToolPackage) {
+ installedPlatformTools = true;
}
}
@@ -511,7 +511,7 @@ class UpdaterData implements IUpdaterData { }
}
- if (installedAddon || installedTools) {
+ if (installedAddon || installedPlatformTools) {
// We need to restart ADB. Actually since we don't know if it's even
// running, maybe we should just kill it and not start it.
// Note: it turns out even under Windows we don't need to kill adb
@@ -521,7 +521,7 @@ class UpdaterData implements IUpdaterData { askForAdbRestart(monitor);
}
- if (installedTools) {
+ if (installedPlatformTools) {
notifyToolsNeedsToBeRestarted();
}
@@ -558,9 +558,8 @@ class UpdaterData implements IUpdaterData { public void run() {
canRestart[0] = MessageDialog.openQuestion(getWindowShell(),
"ADB Restart",
- "A package that depends on ADB has been updated. It is recommended " +
- "to restart ADB. Is it OK to do it now? If not, you can restart it " +
- "manually later.");
+ "A package that depends on ADB has been updated. \n" +
+ "Do you want to restart ADB now?");
}
});
}
|