OSDN Git Service

DDMS: Fix menu to not say "SWT"
authorRaphael <raphael@google.com>
Thu, 13 Oct 2011 17:36:44 +0000 (10:36 -0700)
committerRaphael <raphael@google.com>
Thu, 13 Oct 2011 18:06:21 +0000 (11:06 -0700)
SDK Bug: 20615

Change-Id: Id59b96bb8b1beb92c3887b1581bd7969cae4262f

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 213f6bf..a5a3867 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();