OSDN Git Service

android-x86/sdk.git
13 years agoFix undo problems in the XML editor (issue #15901)
Tor Norbye [Fri, 15 Jul 2011 03:16:52 +0000 (20:16 -0700)]
Fix undo problems in the XML editor (issue #15901)

We've had a recurring problem where in difficult-to-reproduce
circumstances the Undo button doesn't seem to work: After making some
edits like dropping a button, each press of the Undo button will each
individual edit of the compound operation, such as undoing each
attribute set, each element add, and so on -- just as if the entire
edit operation did not run under an undo lock.

This changeset fixes this issue - or at least one scenario of it
(tracked in http://code.google.com/p/android/issues/detail?id=15901 )

It turns out that Eclipse in some cases decides to "cancel" the current
Undo operation. This is done in reaction to selection changes, and the
logic for that is related to a user using a form editor to switch
between various attribute fields, and expecting each text field edit
to be separate. In the above issue I've listed a thread dump which
shows one such cancellation which is definitely not desirable.

To fix this bug we add a workaround: In our code which sets up the
undo recording, we call "beginRecording" -repeatedly- (say 4 times).
Since undo units are allowed to be nested, this means we're nesting
our own undos 4 times, and when we're finished with the editing
operation we simply call endRecording a corresponding number of
times. This means that when the offending code comes around and calls
StructuredTextUndoManager.forceEndOfPendingCommand it will subtract
the command count by one, but we'll still be in one of our nested
contexts (and the editor does allow extra endRecording calls to be
called).

Change-Id: Ic4dde029efcb18def3c9daa5d3676c49a815d804

13 years agoSort XML attributes logically
Tor Norbye [Thu, 14 Jul 2011 22:35:14 +0000 (15:35 -0700)]
Sort XML attributes logically

This changeset modifies the layout editor such that it writes
attributes in a certain order:

* id
* style
* layout_width
* layout_height
* other layout_ attributes, sorted alphabetically
* other attributes, sorted alphabetically

The layout editor will produce attributes in this order when
- New widgets are dragged into the layout
- Widgets are moved in the layout
- It will also insert attributes in the right place when they are set
  as the result of (for example) using the context menu actions.

Note that this ordering is applied unconditionally - there is no user
setting to turn it off. However, note that the current behavior is
random - moving a view for example will scramble the attributes (in an
order which is related to hashkeys in a map), so the option would be
"sort attributes logically" versus "sort attributes randomly"; if we
want an option to "leave attribute order alone" that will need to be
implemented.

Limitations:
- This does not yet modify the formatter to reorganize attributes.
  Thus, Ctrl-Shift-F to reformat the XML will not change attribute
  order.
- It does not fix the problem that the XML model updater does not
  respect the formatting settings (such as one newline per attribute)
  when manipulating attributes.

This will be addressed/worked around in subsequent CLs.

Implementation Note:
The Eclipse XML model updater will unconditionally *append* any new
attributes. We take advantage of this to perform attribute sorting by
ensuring that we always insert new attributes in the right order. We
also check for existing attributes and any which fall
lexicographically later than the new attributes are removed and
reinserted in the right sequence. In order to avoid performing these
removals and additions repeatedly on a node when we set multiple
attributes, and to avoid flushing attribute changes *immediately*
(which was the case until this), we now queue up all pending attribute
values in the nodes and apply them at the end when all attribute
changes for a given node are known.
Change-Id: If39f8c29f26e281f7c6622a31e11ba49724d274a

13 years agoAdd new InsertType for widget moves within the same layout
Tor Norbye [Thu, 14 Jul 2011 18:26:45 +0000 (11:26 -0700)]
Add new InsertType for widget moves within the same layout

For some layouts, such as LinearLayout, when you drag widgets into the
layout, we automatically adjust the widths and heights of some
widgets, such as text fields (to make them fill the full width in a
vertical linear layout, and so on).

However, this was also done when dragging a widget from one place to
another within that same layout. In that case, we should leave the
dimensions and weights alone, since the user may have deliberately
changed these.

This requires splitting the InsertType.MOVE into two, since we still
want to apply default sizing when you move a widget from a different
layout into this one. The InsertTypes are now MOVE_INTO and
MOVE_WITHIN, and we only apply default size styling if we are not
moving within the same layout.

Change-Id: I73ace89aff8111417bd6635e13397e7f027bab0a

13 years agoMerge "Adjust the match position description to be relative to the layout"
Tor Norbye [Wed, 13 Jul 2011 23:24:39 +0000 (16:24 -0700)]
Merge "Adjust the match position description to be relative to the layout"

13 years agoAdjust the match position description to be relative to the layout
Tor Norbye [Wed, 13 Jul 2011 15:53:12 +0000 (08:53 -0700)]
Adjust the match position description to be relative to the layout

Currently the matches displayed for absolute X and Y locations will
list the coordinates relative to the entire screen, not to the
surrounding GridLayout. This CL changes the feedback to be relative to
the GridLayout bounds.

Also fix a bug in updating tooltips/messages which would call tooltip
flicker (because the message update method was called too early,
before the message object was ready, causing the tooltip to be
removed, then reshown.)

Change-Id: I665586dbcb1f3f6cdcb3a3f475cf363cd258bf83

13 years agoMerge "Fix android.bat for Windows SDK."
Raphael Moll [Wed, 13 Jul 2011 02:38:34 +0000 (19:38 -0700)]
Merge "Fix android.bat for Windows SDK."

13 years agoMerge "Support XML closed elements"
Tor Norbye [Wed, 13 Jul 2011 02:38:03 +0000 (19:38 -0700)]
Merge "Support XML closed elements"

13 years agoMerge "Properly support spaces in ant project directories."
Raphael Moll [Wed, 13 Jul 2011 02:23:18 +0000 (19:23 -0700)]
Merge "Properly support spaces in ant project directories."

13 years agoMerge "Fix resize feedback for cell spanning mode"
Tor Norbye [Wed, 13 Jul 2011 01:28:25 +0000 (18:28 -0700)]
Merge "Fix resize feedback for cell spanning mode"

13 years agoMerge "Describe GridLayout matches in drag tooltip"
Tor Norbye [Wed, 13 Jul 2011 01:28:18 +0000 (18:28 -0700)]
Merge "Describe GridLayout matches in drag tooltip"

13 years agoSupport XML closed elements
Tor Norbye [Tue, 12 Jul 2011 22:32:26 +0000 (15:32 -0700)]
Support XML closed elements

When you create new elements (by for example dragging a view into a
layout), ADT would *always* create an open element, e.g.
    <Button ...></Button>

This CL uses the element descriptors to create closed elements like
this:
    <Button .../>

For elements that support children it will continue to create open
elements:
    <LinearLayout ...></LinearLayout>

Change-Id: I885fc4bb2611e20d511a3a40c81e202de00b7ac2

13 years agoFix resize feedback for cell spanning mode
Tor Norbye [Tue, 12 Jul 2011 18:11:04 +0000 (11:11 -0700)]
Fix resize feedback for cell spanning mode

When resizing in a GridLayout you can toggle whether you are resizing
the widget or the cell bounds with the Shift key (and the resize
feedback tells you this).

However, the drawn resize feedback was always showing the widget
bounds. This CL fixes this such that when you are resizing the cell
bounds, the current cell bounds are displayed instead.

(Also contains a simple fix to ensure feedback is drawn when you
click and hold (without dragging yet) on a resize handle.)

Change-Id: I7cf24f4508aa5bbafd45f36b13be41e66ecbc6cc

13 years agoDescribe GridLayout matches in drag tooltip
Tor Norbye [Tue, 12 Jul 2011 17:59:59 +0000 (10:59 -0700)]
Describe GridLayout matches in drag tooltip

This CL adds a description of the current best match (horizontal and
vertical) in a drag tooltip, such as "Insert into bottom of row 5" or
"Align right at x=120".

Change-Id: I08d6b158c5e48d1881ec946037389609d8be9d83

13 years agoProperly support spaces in ant project directories.
Raphael Moll [Tue, 12 Jul 2011 02:11:32 +0000 (22:11 -0400)]
Properly support spaces in ant project directories.

After applying https://review.source.android.com/24515 for
the dalvik/dx change, this allows ant project to build
correctly on Windows if there's a space in their directory
path.

Change-Id: I4c6d5f87fae2dcf2955698633a16a0bde501694f

13 years agoMerge "Grid Layout Support."
Tor Norbye [Mon, 11 Jul 2011 23:04:51 +0000 (16:04 -0700)]
Merge "Grid Layout Support."

13 years agoGrid Layout Support.
Tor Norbye [Thu, 7 Jul 2011 19:07:02 +0000 (12:07 -0700)]
Grid Layout Support.

This changeset adds basic support for grid layouts:

- Freeform mode where you can drag & drop anywhere in the layout, and
  guidelines are offered to align with other left boundaries, right
  boundaries, baseline vertical alignment and center layout horizontal
  alingment.  In addition, it also offers "preferred spacing"
  positioning, using the recommended distance between widgets.

  Also, during a drag a regular 16x16 grid is also (faintly) shown and
  (when there are no alignment matches as explained above) the
  position snaps to this grid.

  We also show the grid-structure (rows and columns, not the regular
  snapping grid) during drags to make it more obvious that behind the
  scenes there is a grid (because some other operations might shift
  rows and columns so it's important to present the right user model.)

  The freeform grid layout editor will automatically create rows and
  columns and size them using spacers which are hidden from the user,
  and on deletion these are automatically cleaned up as well.

- Grid mode where you can drag to any given cell, or between any two
  rows or columns.

- Some layout actions for manipulating the grid (add/remove row and
  column, adjust the gravity, toggle modes.)

This CL also contains various diagnostics code for the grid mode, and
does not yet correctly support dragging multiple views simultaneously.

Change-Id: Ie9ec54805039645e3db78d19095da86b04e44ca0

13 years agoMerge "Fix merge error"
Tor Norbye [Mon, 11 Jul 2011 22:26:09 +0000 (15:26 -0700)]
Merge "Fix merge error"

13 years agoFix merge error
Tor Norbye [Mon, 11 Jul 2011 22:25:24 +0000 (15:25 -0700)]
Fix merge error

Change-Id: Iac2dcc3a504ab2dbc500bcd882d61b460879c7eb

13 years agoMerge "Add AdapterView handling for Spinners"
Tor Norbye [Mon, 11 Jul 2011 22:18:16 +0000 (15:18 -0700)]
Merge "Add AdapterView handling for Spinners"

13 years agoAdd AdapterView handling for Spinners
Tor Norbye [Mon, 11 Jul 2011 19:53:58 +0000 (12:53 -0700)]
Add AdapterView handling for Spinners

This CL adds AdapterView handling similar to what we already provide
for ListViews and GridViews for Spinners.  This means that it will
provide an adapterbinding which provides a layout to use at
designtime. It also adds the ability to pick a different layout to use
at designtime.

More importantly, this fixes rendering of Spinners on Theme.Holo.

Change-Id: I30cef98d22ed57b2e698c4590948e25bf3fecedd

13 years agoMerge "Add resize feedback tooltip"
Tor Norbye [Mon, 11 Jul 2011 22:14:07 +0000 (15:14 -0700)]
Merge "Add resize feedback tooltip"

13 years agoAdd resize feedback tooltip
Tor Norbye [Mon, 11 Jul 2011 05:22:08 +0000 (22:22 -0700)]
Add resize feedback tooltip

This changeset adds a "tooltip" during resize operations close to the
mouse cursor which displays feedback about the current resize
dimensions.

The feedback window is similar in appearance to a tooltip, but unlike
SWT tooltips it moves with the cursor and updates the text
dynamically, and appears immediately rather than being tied to mouse
motion timeouts. It is also partially translucent and uses a slightly
smaller font.

Change-Id: I6b663510f078f325d2f7b168c887aeff14de31b8

13 years agoMerge "Only set the text attribute on views that define it"
Tor Norbye [Mon, 11 Jul 2011 22:07:06 +0000 (15:07 -0700)]
Merge "Only set the text attribute on views that define it"

13 years agoMerge "Add support for hidden views"
Tor Norbye [Mon, 11 Jul 2011 22:06:41 +0000 (15:06 -0700)]
Merge "Add support for hidden views"

13 years agoMerge "Simple insets support"
Tor Norbye [Mon, 11 Jul 2011 22:06:32 +0000 (15:06 -0700)]
Merge "Simple insets support"

13 years agoOnly set the text attribute on views that define it
Tor Norbye [Mon, 11 Jul 2011 19:49:40 +0000 (12:49 -0700)]
Only set the text attribute on views that define it

Ensure that we only set the text attribute on widgets that define
it. Now that we preserve unknown attributes this meant that we'd end
up setting text attributes on all widgets rather than just those that
define it.

Change-Id: Ief67a777ca40149e0be370b7a561f80fbffa3d5d

13 years agoMerge "When using prerelease SDK versions, use codename instead of API level"
Tor Norbye [Sat, 9 Jul 2011 03:36:32 +0000 (20:36 -0700)]
Merge "When using prerelease SDK versions, use codename instead of API level"

13 years agoAdd support for hidden views
Tor Norbye [Thu, 7 Jul 2011 19:05:20 +0000 (12:05 -0700)]
Add support for hidden views

There are some views which should hide in the UI to avoid clutter,
such as <Space> widgets. This changeset adds support for hidden views,
such that they don't show up in the outline, don't show up for hovers,
aren't included in drag selections and so on.

Change-Id: Icb18f4530b8aff584e72280f5bd09e776af9204c

13 years agoSimple insets support
Tor Norbye [Thu, 7 Jul 2011 18:57:59 +0000 (11:57 -0700)]
Simple insets support

This changeset adds the basic plumbing for supporting insets, such
that selection handles can reflect the true bounds of a widget, and
such that guidelines which show adjacent matches can show and measure
the correct visual distance between the widgets.

The actual insets data is not available (though there are some
commented out measurements for some of the most important widgets,
like buttons), so the purpose of this changeset is to put the APIs in
place such that the various view rules can correctly account for these
deltas when they become available.

Change-Id: I326bfa22f0d239d76685b371d38bb8eac594a53b

13 years agoWhen using prerelease SDK versions, use codename instead of API level
Tor Norbye [Thu, 7 Jul 2011 18:44:18 +0000 (11:44 -0700)]
When using prerelease SDK versions, use codename instead of API level

The New Project wizard now automatically fills in the Minimum SDK text
field based on the selection in the SDK target chooser. However, it
was hardcoded to always pick the API level number. That's not correct
when using SDK versions with a code name; for example, when used with
a dev SDK build the minimum SDK version should be "AOSP".

Change-Id: I28273007be7e56f3a34b683f01234d5d1046aa0a

13 years agoMerge "Change scheme for picking tablet or phone configurations"
Tor Norbye [Sat, 9 Jul 2011 03:17:36 +0000 (20:17 -0700)]
Merge "Change scheme for picking tablet or phone configurations"

13 years agoMerge "Add deletion hooks for view rules"
Tor Norbye [Sat, 9 Jul 2011 02:57:15 +0000 (19:57 -0700)]
Merge "Add deletion hooks for view rules"

13 years agoMerge "Add "android create avd --abi" parameter."
Raphael Moll [Sat, 9 Jul 2011 01:17:48 +0000 (18:17 -0700)]
Merge "Add "android create avd --abi" parameter."

13 years agoAdd "android create avd --abi" parameter.
Raphael Moll [Fri, 8 Jul 2011 21:48:17 +0000 (17:48 -0400)]
Add "android create avd --abi" parameter.

SDK bug 4965341

Change-Id: Iaff42d1272a9c10ba62534c5d478e35e6c2df6e5

13 years agoMerge "Remove System.exit from traceview code running in Eclipse."
Xavier Ducrohet [Fri, 8 Jul 2011 20:48:19 +0000 (13:48 -0700)]
Merge "Remove System.exit from traceview code running in Eclipse."

13 years agoRemove System.exit from traceview code running in Eclipse.
Xavier Ducrohet [Fri, 8 Jul 2011 20:34:12 +0000 (13:34 -0700)]
Remove System.exit from traceview code running in Eclipse.

These are remnants of the standalone traceview version and they
can bring Eclipse down if the trace file can't be read.

Change-Id: Ic9a0171f307bc991cd000fa4d35d5c37b47e93b2

13 years agoMerge "Fix locale handling of linear layout weights"
Raphaël Moll [Fri, 8 Jul 2011 17:16:17 +0000 (10:16 -0700)]
Merge "Fix locale handling of linear layout weights"

13 years agoFix locale handling of linear layout weights
Tor Norbye [Fri, 8 Jul 2011 00:32:46 +0000 (17:32 -0700)]
Fix locale handling of linear layout weights

Fix 18298: ADT r12 layout editor uses locale specific decimal
    separator leading to unparsable XML

Change-Id: Ideae319e41f8a7e34075065c63247d50cdf830c5

13 years agoChange scheme for picking tablet or phone configurations
Tor Norbye [Thu, 7 Jul 2011 18:38:48 +0000 (11:38 -0700)]
Change scheme for picking tablet or phone configurations

Change the code which automatically picks tablet configurations when
the target SDK is 11+ such that it only does this for API 11 and API
12.

Change-Id: Ic59cdd4d7ac2d616069bf79e517987e5ce2517cc

13 years agoAdd deletion hooks for view rules
Tor Norbye [Thu, 7 Jul 2011 18:36:11 +0000 (11:36 -0700)]
Add deletion hooks for view rules

This changeset adds a deletion hook to the view rule interface which
lets specific layouts perform cleanup when some of its children are
removed. This is vital for GridLayout where various rows and columns
need to be cleaned up.

In this changeset, this is used by RelativeLayout to remove constraint
references to widgets that have been deleted. Without this, you could
have Button2 reference Button1, then delete Button1, and when you drop
a new button, it will be assigned the now available name "Button1" and
the old constraint would kick back in!

Change-Id: Ic5829228cff38bfdc291988b1a2ef172e9aa4de5

13 years agoFix android.bat for Windows SDK.
Raphael Moll [Thu, 7 Jul 2011 11:40:06 +0000 (07:40 -0400)]
Fix android.bat for Windows SDK.

android.bat was not properly copying swtmenbar.jar
to the temp folder, so it wasn't found at runtime.

Also added some debug info wrapping the menu bar usage
and a comment on how to remotely debug the swtmanager.

Change-Id: Ibe3d4ad0534b0e276808a77a051ae279a315da06

13 years agoMerge "Fix some override issues."
Xavier Ducrohet [Thu, 7 Jul 2011 01:18:38 +0000 (18:18 -0700)]
Merge "Fix some override issues."

13 years agoFix some override issues.
Xavier Ducrohet [Thu, 7 Jul 2011 00:28:42 +0000 (17:28 -0700)]
Fix some override issues.

SDK tools must compile using Java 1.5

Change-Id: I39b708fcb6f1e225bece6b12c1b5909865825ac9

13 years agoMerge "Integrate unknown attributes in the normal UiElementNode workflow."
Raphael Moll [Wed, 6 Jul 2011 21:30:24 +0000 (14:30 -0700)]
Merge "Integrate unknown attributes in the normal UiElementNode workflow."

13 years agoIntegrate unknown attributes in the normal UiElementNode workflow.
Raphael Moll [Tue, 5 Jul 2011 19:06:54 +0000 (15:06 -0400)]
Integrate unknown attributes in the normal UiElementNode workflow.

Somehow this should have been the default.
There's a few cases where this will allow us to simplify the code
and that will be for another CL.

Also fixes http://code.google.com/p/android/issues/detail?id=17762

Change-Id: Ieccd36f5f4042f414311f09339ed18fc73d7b122

13 years agoMerge "SdkManager: pretty-print the 'android' command line help."
Raphael Moll [Wed, 6 Jul 2011 13:13:29 +0000 (06:13 -0700)]
Merge "SdkManager: pretty-print the 'android' command line help."

13 years agoSdkManager: pretty-print the 'android' command line help.
Raphael Moll [Fri, 1 Jul 2011 15:51:36 +0000 (11:51 -0400)]
SdkManager: pretty-print the 'android' command line help.

This reflows the command line help so that it wraps nicely
at 78 chars. Also properly finish sentences with dots.
Mere details...

Also added a proper unit test to test various edge cases.

Change-Id: Id2f9eab5014ea9c5f4aae5ed4427b9aebc3c70bf

13 years agoMerge "Switch to "android sdk" and "android avd" command line."
Raphael Moll [Tue, 5 Jul 2011 23:31:16 +0000 (16:31 -0700)]
Merge "Switch to "android sdk" and "android avd" command line."

13 years agoMerge "SdkMan2: Links to select new/updates or deselect all."
Raphael Moll [Tue, 5 Jul 2011 23:30:54 +0000 (16:30 -0700)]
Merge "SdkMan2: Links to select new/updates or deselect all."

13 years agoMerge changes I82eb0776,I72fdca12
Raphael Moll [Tue, 5 Jul 2011 23:30:26 +0000 (16:30 -0700)]
Merge changes I82eb0776,I72fdca12

* changes:
  Use GridData/LayoutBuilder in PackagesPage.
  SdkManager2: fixes for asynchronous sources UI.

13 years agoSwitch to "android sdk" and "android avd" command line.
Raphael Moll [Fri, 1 Jul 2011 14:29:36 +0000 (10:29 -0400)]
Switch to "android sdk" and "android avd" command line.

The default with no argument is "android sdk".

Change-Id: I208d7b78dcbeab44a135e4d5bbb4b568b9ce09d7

13 years agoSdkMan2: Links to select new/updates or deselect all.
Raphael Moll [Fri, 1 Jul 2011 03:49:11 +0000 (23:49 -0400)]
SdkMan2: Links to select new/updates or deselect all.

Change-Id: I9c831138342574b0462e39055be86bde7114f54a

13 years agoUse GridData/LayoutBuilder in PackagesPage.
Raphael Moll [Fri, 1 Jul 2011 02:38:13 +0000 (22:38 -0400)]
Use GridData/LayoutBuilder in PackagesPage.

Change-Id: I82eb07760e264884c510250245405aa2dfc1cdbe

13 years agoSdkManager2: fixes for asynchronous sources UI.
Raphael Moll [Thu, 30 Jun 2011 19:32:54 +0000 (15:32 -0400)]
SdkManager2: fixes for asynchronous sources UI.

- Properly refresh display list when installing/deleting
  a package.
- Gray install/delete buttons during an install/delete
  to avoid nesting operations.

Change-Id: I72fdca1252c447b046040afb70e67dfae77188e4

13 years agoMerge "Fix SDK Manager unit tests."
Raphael Moll [Fri, 1 Jul 2011 01:37:15 +0000 (18:37 -0700)]
Merge "Fix SDK Manager unit tests."

13 years agoFix SDK Manager unit tests.
Raphael Moll [Fri, 1 Jul 2011 01:29:54 +0000 (21:29 -0400)]
Fix SDK Manager unit tests.

These got broken after I've fixed the sort order
of extra packages in SDK Manager 2.

Change-Id: Ie18f3fb74f800ac855680be29a7932f8c8d9f54c

13 years agoMerge "Fix instrumentation repetition parsing and multi listener handling."
Brett Chabot [Thu, 30 Jun 2011 23:26:56 +0000 (16:26 -0700)]
Merge "Fix instrumentation repetition parsing and multi listener handling."

13 years agoMerge "Sdkman2: Load sources asynchronously."
Raphael Moll [Thu, 30 Jun 2011 17:31:50 +0000 (10:31 -0700)]
Merge "Sdkman2: Load sources asynchronously."

13 years agoMerge "Add a preference for the profiler buffer size."
Jeff Brown [Wed, 29 Jun 2011 02:10:51 +0000 (19:10 -0700)]
Merge "Add a preference for the profiler buffer size."

13 years agoMerge "Add support for tracking cpu and real time."
Jeff Brown [Wed, 29 Jun 2011 02:10:35 +0000 (19:10 -0700)]
Merge "Add support for tracking cpu and real time."

13 years agoFix instrumentation repetition parsing and multi listener handling.
Brett Chabot [Tue, 28 Jun 2011 02:15:11 +0000 (19:15 -0700)]
Fix instrumentation repetition parsing and multi listener handling.

Change-Id: Ib295bb21c45dd2f52f547f86a5b3c4aaa959c139

13 years agoMerge "Add a basic properties dialog."
Jeff Brown [Wed, 29 Jun 2011 02:10:14 +0000 (19:10 -0700)]
Merge "Add a basic properties dialog."

13 years agomerge from tools_r12
The Android Open-Source Project [Wed, 29 Jun 2011 01:24:40 +0000 (18:24 -0700)]
merge from tools_r12

Change-Id: I83911d9ee56e5d44045a5ecbd28647a551f8ea79

13 years agoMerge "Guard against a possible NPE when the rendering fails." into tools_r12
Xavier Ducrohet [Wed, 29 Jun 2011 01:22:56 +0000 (18:22 -0700)]
Merge "Guard against a possible NPE when the rendering fails." into tools_r12

13 years agoGuard against a possible NPE when the rendering fails.
Xavier Ducrohet [Wed, 29 Jun 2011 01:20:06 +0000 (18:20 -0700)]
Guard against a possible NPE when the rendering fails.

Change-Id: I8b0a0c65f2b0d7b7faf10224ac2945081605c5c4

13 years agoMerge "pullFile exception handling."
Brett Chabot [Wed, 29 Jun 2011 01:16:56 +0000 (18:16 -0700)]
Merge "pullFile exception handling."

13 years agoMerge "Add a horizontal scrollbar."
Jeff Brown [Tue, 28 Jun 2011 03:08:15 +0000 (20:08 -0700)]
Merge "Add a horizontal scrollbar."

13 years agoAdd a preference for the profiler buffer size.
Jeff Brown [Tue, 28 Jun 2011 00:29:32 +0000 (17:29 -0700)]
Add a preference for the profiler buffer size.

8MB is getting to be too small for some purposes.

Change-Id: Ic711c426febf2e42634bd73a5be6211cfe66f4c0

13 years agoMerge "Refactored MonkeyRunner to use ChimpChat"
Bill Napier [Mon, 27 Jun 2011 23:05:26 +0000 (16:05 -0700)]
Merge "Refactored MonkeyRunner to use ChimpChat"

13 years agoAdd support for tracking cpu and real time.
Jeff Brown [Thu, 23 Jun 2011 02:48:45 +0000 (19:48 -0700)]
Add support for tracking cpu and real time.

Enhanced TraceView to support extracting cpu and real time profile
data from traces and plotting them accordingly.

In contrast, the original thread-cpu algorithm incorrectly assumed
that threads could not execute in parallel so it would produce
inaccurate representations of the global execution timeline on SMP
systems.

To use this feature, Dalvik must be restarted with appropriate
profiling options.

Collect CPU time only (default).  Global timeline must be inferred.
  adb shell setprop dalvik.vm.extra-opts -Xprofile:threadcpuclock

Collect real time only.  CPU usage information is not available.
  adb shell setprop dalvik.vm.extra-opts -Xprofile:wallclock

Collect CPU time and real time information.  Most accurate but
requires a newer VM.
  adb shell setprop dalvik.vm.extra-opts -Xprofile:dualclock

TraceView remains compatible with traces gathered on older devices
and produces identical output when analyzing traces gathered with
the thread-cpu clock.

Added a feature that displays the exclusive and inclusive time
information while hovering over a method.

Added a feature that displays the time spent in a context switch
by a simple 1 pixel underline within the body of the method call.
This makes it much easier to identify long running methods that
spend most of their time blocked on a wait.

Fixed a bug in the way that the method call highlights were
displayed which could cause them to be truncated down to a
single-pixel width depending on the pixel alignment of the
start and end of each segment.

Change-Id: Id2e6d101d9c604a0029e0920127871f88013faa0

13 years agoSdkman2: Load sources asynchronously.
Raphael Moll [Fri, 24 Jun 2011 23:57:23 +0000 (16:57 -0700)]
Sdkman2: Load sources asynchronously.

Change-Id: Ic79b987ce8594e7bfe30b32e961b9384e2538b6b

13 years agoAdd a basic properties dialog.
Jeff Brown [Wed, 22 Jun 2011 23:58:49 +0000 (16:58 -0700)]
Add a basic properties dialog.

Shows some information about the trace that can be of interest,
such as which timing mode (thread time or wall time) was used.

Change-Id: I0f00b69dc5d3982f346cfc08e12eb5b379430a96

13 years agoAdd a horizontal scrollbar.
Jeff Brown [Wed, 22 Jun 2011 23:07:06 +0000 (16:07 -0700)]
Add a horizontal scrollbar.

Change-Id: I077240805c45f71c8e270cada39bad3168061dfa

13 years agoMerge "Sdkman2: Simplify packages names, fix extra package sort."
Raphael Moll [Fri, 24 Jun 2011 19:22:00 +0000 (12:22 -0700)]
Merge "Sdkman2: Simplify packages names, fix extra package sort."

13 years agoMerge "Sdkman2: Rename "Sort by Source" to "Sort by Repository""
Raphael Moll [Fri, 24 Jun 2011 19:21:19 +0000 (12:21 -0700)]
Merge "Sdkman2: Rename "Sort by Source" to "Sort by Repository""

13 years agoMerge "SdkMan2: sort Tool category at the top."
Raphael Moll [Fri, 24 Jun 2011 19:20:58 +0000 (12:20 -0700)]
Merge "SdkMan2: sort Tool category at the top."

13 years agoMerge "Fix value parser to handle attr values not in declare-styleable."
Xavier Ducrohet [Fri, 24 Jun 2011 19:09:45 +0000 (12:09 -0700)]
Merge "Fix value parser to handle attr values not in declare-styleable."

13 years agoFix value parser to handle attr values not in declare-styleable.
Xavier Ducrohet [Fri, 24 Jun 2011 18:42:32 +0000 (11:42 -0700)]
Fix value parser to handle attr values not in declare-styleable.

Also change the layoutlib sample code to properly get the list
of framework attr flag/enum values.

Change-Id: Ie0bf126a0fab574d94d0f86b7b2f8581cf4eaae3

13 years agoSdkman2: Simplify packages names, fix extra package sort.
Raphael Moll [Fri, 24 Jun 2011 00:18:52 +0000 (17:18 -0700)]
Sdkman2: Simplify packages names, fix extra package sort.

Simplify package names when sorted by API, that is
don't repeat "API nn" or "Android x.y" in the package
names if it matches to category.

Fix sorting of packages to properly sort extras
by vendor+path. The previous sort was broken as
it was making the revision number more important
than the vendor+path for extras.

Change-Id: I51ed0114ab9c77ef5d94710fc2449e5be9cd2ad9

13 years agopullFile exception handling.
Brett Chabot [Thu, 23 Jun 2011 21:45:51 +0000 (14:45 -0700)]
pullFile exception handling.

Make SyncService.pullFile throw SyncException instead of IOException
if it cannot write to local file.

Bug 4600585

Change-Id: Ic3ab9fd7d1a05280ee14a310b9c8053371bb4e37

13 years agoSdkman2: Rename "Sort by Source" to "Sort by Repository"
Raphael Moll [Thu, 23 Jun 2011 21:48:12 +0000 (14:48 -0700)]
Sdkman2: Rename "Sort by Source" to "Sort by Repository"

Change-Id: I3f1f0f8781cae29400f7b49d2c92e6f2b83783c2

13 years agoSdkMan2: sort Tool category at the top.
Raphael Moll [Thu, 23 Jun 2011 21:43:55 +0000 (14:43 -0700)]
SdkMan2: sort Tool category at the top.

Change-Id: I8bc57a04a48cd540e6457a0b69b4911475989d8c

13 years agoMerge "Sample code to use the layout rendering library."
Xavier Ducrohet [Thu, 23 Jun 2011 21:18:58 +0000 (14:18 -0700)]
Merge "Sample code to use the layout rendering library."

13 years agoSample code to use the layout rendering library.
Xavier Ducrohet [Fri, 1 Apr 2011 21:11:47 +0000 (14:11 -0700)]
Sample code to use the layout rendering library.

This is very basic sample code showing how to render
a layout.

This explains how to load the resources, create Folderconfig,
ResourceResolver, and how to call the LayoutLibrary to do an
actual render.

There are some big limitations:
- can't render custom views because there's nothing
  compiling them and generating the compiled R.class
  file.
- not all features of ADT are present because there
  are things that don't make sense outside of an editor
  (render in context, expand empty layouts, etc...)

Change-Id: I0c8676ebfbff27f0e9412bb4b13193ce64082372

13 years agoMerge "Enable SdkManager2 and AvdManager1 windows in ADT."
Raphael Moll [Wed, 22 Jun 2011 23:04:46 +0000 (16:04 -0700)]
Merge "Enable SdkManager2 and AvdManager1 windows in ADT."

13 years agoMerge "SdkManager2: window can be closed during load."
Raphael Moll [Wed, 22 Jun 2011 13:40:52 +0000 (06:40 -0700)]
Merge "SdkManager2: window can be closed during load."

13 years agoEnable SdkManager2 and AvdManager1 windows in ADT.
Raphael Moll [Tue, 21 Jun 2011 23:59:49 +0000 (16:59 -0700)]
Enable SdkManager2 and AvdManager1 windows in ADT.

Change-Id: I041fe4f6888dcc44f6f81319d05caed9311cc6ff

13 years agoSdkManager2: window can be closed during load.
Raphael Moll [Tue, 21 Jun 2011 23:57:58 +0000 (16:57 -0700)]
SdkManager2: window can be closed during load.

Since the sdkmanager2 loads its packages whilst
not blocking the UI, it's entirely possible for the
user to request the app to close whilst it load.
This makes sure we test for disposed widgets after
loading before trying to update them.

Change-Id: I9f0a82f0da5275996fd7275bd55de36986685dad

13 years agoMerge "Move tools to 13."
Xavier Ducrohet [Tue, 21 Jun 2011 20:59:04 +0000 (13:59 -0700)]
Merge "Move tools to 13."

13 years agoMove tools to 13.
Xavier Ducrohet [Tue, 21 Jun 2011 20:23:51 +0000 (13:23 -0700)]
Move tools to 13.

Change-Id: Ibedcb5627170d107cacf5e9d212f9da11c8d1f3e

13 years agoMerge "Extracted ChimpChat from MonkeyRunner"
Bill Napier [Mon, 20 Jun 2011 23:36:58 +0000 (16:36 -0700)]
Merge "Extracted ChimpChat from MonkeyRunner"

13 years agoRefactored MonkeyRunner to use ChimpChat
Michael Wright [Mon, 13 Jun 2011 16:17:03 +0000 (09:17 -0700)]
Refactored MonkeyRunner to use ChimpChat

Change-Id: Icbe5bcb066021d578faae43aa49b58ab1595870b

13 years agoExtracted ChimpChat from MonkeyRunner
Michael Wright [Mon, 13 Jun 2011 16:15:08 +0000 (09:15 -0700)]
Extracted ChimpChat from MonkeyRunner

Extracted ChimpChat, the library for communication with Monkey from
MonkeyRunner

Change-Id: Ia9f966549d27abc9f494b2b001099d8130dea376

13 years agomerge from tools_r12
The Android Open-Source Project [Thu, 16 Jun 2011 18:14:09 +0000 (11:14 -0700)]
merge from tools_r12

Change-Id: Ic2a9844fe74da7c873c7264e38d50d568f190530

13 years agoMerge "Merge bc434d73 from master to r12. do not merge." into tools_r12
Xavier Ducrohet [Thu, 16 Jun 2011 18:00:49 +0000 (11:00 -0700)]
Merge "Merge bc434d73 from master to r12. do not merge." into tools_r12

13 years agoMerge bc434d73 from master to r12. do not merge.
Xavier Ducrohet [Wed, 15 Jun 2011 23:22:12 +0000 (16:22 -0700)]
Merge bc434d73 from master to r12. do not merge.

Add cpu.model to AVD running armeabi-v7a system images.

Change-Id: I2e94a3bed50936a39eebaffa014427d6ce40983d

13 years agoMerge "Add cpu.model to AVD running armeabi-v7a system images."
Xavier Ducrohet [Thu, 16 Jun 2011 17:55:20 +0000 (10:55 -0700)]
Merge "Add cpu.model to AVD running armeabi-v7a system images."

13 years agoAdd cpu.model to AVD running armeabi-v7a system images.
Xavier Ducrohet [Wed, 15 Jun 2011 23:22:12 +0000 (16:22 -0700)]
Add cpu.model to AVD running armeabi-v7a system images.

Change-Id: I5b97b115ada432e284ad2dd3c69bcf7009677aec

13 years agomerge from tools_r12
The Android Open-Source Project [Wed, 15 Jun 2011 22:44:40 +0000 (15:44 -0700)]
merge from tools_r12

Change-Id: I60f32f625de3ea932c87747e25366377c07e74a5

13 years agoMerge "Merge df07f53c from master to r12. do not merge." into tools_r12
Xavier Ducrohet [Wed, 15 Jun 2011 22:32:18 +0000 (15:32 -0700)]
Merge "Merge df07f53c from master to r12. do not merge." into tools_r12