aboutsummaryrefslogtreecommitdiffstats
path: root/sdkmanager/libs/sdkuilib/src
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2012-02-06 13:25:16 -0800
committerRaphael <raphael@google.com>2012-02-06 15:27:11 -0800
commit72b588de47324540a1989fcc7d1b820b56045371 (patch)
tree8531b69047f4979692a2da89dbb7daa1c3794228 /sdkmanager/libs/sdkuilib/src
parent3c16d164a654ac15466c7476388f6b5fa2519798 (diff)
downloadsdk-72b588de47324540a1989fcc7d1b820b56045371.zip
sdk-72b588de47324540a1989fcc7d1b820b56045371.tar.gz
sdk-72b588de47324540a1989fcc7d1b820b56045371.tar.bz2
SDK Manager: extract source packages as r-o.
Extract Java sources from source packages as read-only. When such sources are added to the target build path in Eclipse it prevents users from modifying them by mistake. Change-Id: I271d1d55e35ba275494b9d5d899817a7d0ad0361
Diffstat (limited to 'sdkmanager/libs/sdkuilib/src')
-rwxr-xr-xsdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/SdkUpdaterWindowImpl2.java28
1 files changed, 16 insertions, 12 deletions
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/SdkUpdaterWindowImpl2.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/SdkUpdaterWindowImpl2.java
index 5801aca..9cf96f3 100755
--- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/SdkUpdaterWindowImpl2.java
+++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/SdkUpdaterWindowImpl2.java
@@ -502,17 +502,19 @@ public class SdkUpdaterWindowImpl2 implements ISdkUpdaterWindow {
// on a sub-thread but that doesn't seem cross-platform safe. We shouldn't
// have a lot of error logging, so this should be acceptable. If not, we could
// cache the visibility state.
- mShell.getDisplay().syncExec(new Runnable() {
- @Override
- public void run() {
- if (!mLogWindow.isVisible()) {
- // Don't toggle the window visibility directly.
- // Instead use the same action as the log-toggle button
- // so that the button's state be kept in sync.
- onToggleLogWindow();
+ if (mShell != null && !mShell.isDisposed()) {
+ mShell.getDisplay().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (!mLogWindow.isVisible()) {
+ // Don't toggle the window visibility directly.
+ // Instead use the same action as the log-toggle button
+ // so that the button's state be kept in sync.
+ onToggleLogWindow();
+ }
}
- }
- });
+ });
+ }
}
};
@@ -606,8 +608,10 @@ public class SdkUpdaterWindowImpl2 implements ISdkUpdaterWindow {
private void onToggleLogWindow() {
// toggle visibility
- mLogWindow.setVisible(!mLogWindow.isVisible());
- mButtonShowLog.setState(mLogWindow.isVisible() ? 1 : 0);
+ if (!mButtonShowLog.isDisposed()) {
+ mLogWindow.setVisible(!mLogWindow.isVisible());
+ mButtonShowLog.setState(mLogWindow.isVisible() ? 1 : 0);
+ }
}
private void onStopSelected() {