From 578ecf62a07b7c38c818a8dcec6038f2827c9bc6 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 13 Oct 2011 10:36:44 -0700 Subject: [PATCH] DDMS: Fix menu to not say "SWT". Do not merge. SDK Bug: 20615 (cherry picked from commit a84dcfef93b62171ede7e3743adb04e2ade5b290) Change-Id: I14c2e3f3df52517b4511a700f67e1ada623cae1f --- ddms/app/src/com/android/ddms/Main.java | 6 +++++- ddms/app/src/com/android/ddms/UIThread.java | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ddms/app/src/com/android/ddms/Main.java b/ddms/app/src/com/android/ddms/Main.java index 14ef910c9..583feb5e9 100644 --- a/ddms/app/src/com/android/ddms/Main.java +++ b/ddms/app/src/com/android/ddms/Main.java @@ -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 diff --git a/ddms/app/src/com/android/ddms/UIThread.java b/ddms/app/src/com/android/ddms/UIThread.java index 0a667d41a..dc910148d 100644 --- a/ddms/app/src/com/android/ddms/UIThread.java +++ b/ddms/app/src/com/android/ddms/UIThread.java @@ -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(); -- 2.11.0