OSDN Git Service

DDMS: Fix menu to not say "SWT". Do not merge.
authorRaphael <raphael@google.com>
Thu, 13 Oct 2011 17:36:44 +0000 (10:36 -0700)
committerRaphael Moll <raphael@google.com>
Mon, 17 Oct 2011 17:48:12 +0000 (10:48 -0700)
SDK Bug: 20615

(cherry picked from commit a84dcfef93b62171ede7e3743adb04e2ade5b290)

Change-Id: I14c2e3f3df52517b4511a700f67e1ada623cae1f

ddms/app/src/com/android/ddms/Main.java
ddms/app/src/com/android/ddms/UIThread.java

index 14ef910..583feb5 100644 (file)
@@ -74,10 +74,14 @@ public class Main {
 
         Log.d("ddms", "Initializing");
 
+        // Create an initial shell display with the correct app name.
+        Display.setAppName(UIThread.APP_NAME);
+        Shell shell = new Shell(Display.getDefault());
+
         // if this is the first time using ddms or adt, open up the stats service
         // opt out dialog, and request user for permissions.
         SdkStatsService stats = new SdkStatsService();
-        stats.checkUserPermissionForPing(new Shell(Display.getDefault()));
+        stats.checkUserPermissionForPing(shell);
 
         // the "ping" argument means to check in with the server and exit
         // the application name and version number must also be supplied
index 0a667d4..dc91014 100644 (file)
@@ -107,7 +107,7 @@ import java.util.ArrayList;
  * when {@link IDevice} / {@link Client} selection changes.
  */
 public class UIThread implements IUiSelectionListener, IClientChangeListener {
-    private static final String APP_NAME = "DDMS";
+    public static final String APP_NAME = "DDMS";
 
     /*
      * UI tab panel definitions. The constants here must match up with the array
@@ -444,7 +444,7 @@ public class UIThread implements IUiSelectionListener, IClientChangeListener {
     public void runUI(String ddmsParentLocation) {
         Display.setAppName(APP_NAME);
         mDisplay = Display.getDefault();
-        final Shell shell = new Shell(mDisplay);
+        final Shell shell = new Shell(mDisplay, SWT.SHELL_TRIM);
 
         // create the image loaders for DDMS and DDMUILIB
         mDdmUiLibLoader = ImageLoader.getDdmUiLibLoader();