aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make lint process Java jar dependenciesTor Norbye2012-02-1315-24/+232
| | | | | | | This changeset makes lint properly handle the jar dependency scope for issues. It also tweaks the API in a few minor ways. Change-Id: Ibd7b943c9d3ce361e091af8f1e990709bb94d183
* Fix incorrect castTor Norbye2012-02-131-1/+1
| | | | Change-Id: I3edc1c6d5238aa157a91a781301985c79657c9d2
* Merge "SDK/ADT: Refactor grabProcessOutput."Raphael2012-02-107-495/+286
|\
| * SDK/ADT: Refactor grabProcessOutput.Raphael2012-02-087-495/+286
| | | | | | | | | | | | | | | | | | We have many implementations of grabProcessOutput. This introduces an utility in sdklib that takes an interface to capture out/err and uses this in various places instead of duplicating the code. Change-Id: I7e6eea443c592ae5670485369233e1cd002ff9cc
* | SDK Manager: fix duplicate when installing new package.Raphael2012-02-094-7/+19
|/ | | | | | | | | | This is a simple refresh issue on the display table. The internal diff properly detects that an uninstalled package is being replaced by a freshly installed package however it wasn't updating the table view to remove the obsolete uninstalled entry. Change-Id: I6ecb7be55848046d9843df2333a09013a2a551c1
* Merge "Lint detector warning about missing <uses-sdk> min or target SDK ↵Tor Norbye2012-02-075-5/+126
|\ | | | | | | settings"
| * Lint detector warning about missing <uses-sdk> min or target SDK settingsTor Norbye2012-02-075-5/+126
| | | | | | | | Change-Id: I9401318afe771d11ef6f211ee3f9cb6c62df8f83
* | Merge "Make the lint string-format check ignore date strings"Tor Norbye2012-02-076-47/+210
|\ \
| * | Make the lint string-format check ignore date stringsTor Norbye2012-02-076-47/+210
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The string format lint check might be processing strings not intended for String.format (but intended for example for android.text.format.Time#format), in which case it will be wrong about whether two conversions are incompatible. (This does not fix all scenarios; if a date string looks like a String.format in the sense that all of its formatting characters are defined by String.format then the string will assume to be intended for String.format.) This changeset attempts to recognize this, and also make the "is incompatible" check a bit more nuanced: it will now consider "d" compatible with "x" for example. Change-Id: I63ce082f40169e4033809d25cae3cf116c9e2044
* | Merge "Suppress UselessLeaf warnings for root layouts"Tor Norbye2012-02-073-0/+17
|\ \
| * | Suppress UselessLeaf warnings for root layoutsTor Norbye2012-02-073-0/+17
| |/ | | | | | | Change-Id: I997ad6f1348e9884b56a60ef453cd02754c936bb
* | Merge "Add a check for min SDK Tools in ADT."Xavier Ducrohet2012-02-074-8/+60
|\ \
| * | Add a check for min SDK Tools in ADT.Xavier Ducrohet2012-02-074-8/+60
| | | | | | | | | | | | | | | | | | this lets us enforce having updated Tools from ADT. Change-Id: Ica599546287157f01fbb056392a66162298eaa23
* | | Merge "Make ButtonOrder lint rule consider minSdk and targetSdk and v14"Tor Norbye2012-02-074-49/+202
|\ \ \
| * | | Make ButtonOrder lint rule consider minSdk and targetSdk and v14Tor Norbye2012-02-074-49/+202
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset enables the button order check by default, and makes the rule consider the minimum and target SDK more carefully. * If both the min and target SDK >= 14, the rule enforces the new button order. * If both the min and target SDK <= 14, then the rule does nothing. * Otherwise, if warns if the wrong button order is in a layout that is in a layout*-v14 or higher folder, or if it's in a non-v14 folder and there is no corresponding v14 layout. Change-Id: Idf54f86d7a004fdb073486160e4d5ff5fd1cd45c
* | | Merge "hierarchyviewer: Use System Font."Siva Velusamy2012-02-071-19/+0
|\ \ \
| * | | hierarchyviewer: Use System Font.Siva Velusamy2012-02-061-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hierarchy Viewer explicitly sets the property tree to use a size 8 font which happens to be too small on OSX Lion. This patch removes that setting - so the tree will just use the default system font. Change-Id: I98aba45937b34e612324803a7662f9a4b24b41a5
* | | | gltrace: Add a low cost way to maintain per call properties.Siva Velusamy2012-02-073-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For most GL Calls, we don't need to save anything but its string representation from its protocol buffer. But for a number of calls, additional data is required. But we don't want to save the entire protobuf (due to its high memory consumption). So this patch adds a generic properties holder to the GLCall structure. While the trace file is parsed, certain calls may save data from the protobuf in this structure and these can be retrieved at runtime. This patch also utilizes this feature to save the marker name for every glPushGroupMarker call. Only these markers are displayed in the trace view as opposed to the full gl call. Change-Id: If989b3a35704fd0017a944e58589d2122a9a0334
* | | | gltrace: Make fb view into a pagebookviewSiva Velusamy2012-02-078-202/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL makes the framebuffer view a subclass of a PageBookView. This allows the framebuffer view to maintain state across multiple open GL trace editors. Since the StateView is also a PageBookView, and both these views show content associated with the currently active GL Function Trace Viewer, the common code across both of them have been pulled into GLPageBookView. Change-Id: I48a2e8432d1c2aeafe13c0aa2789fef3afe8228e
* | | | Merge "gltrace: Use half-open ranges when defining frames."Siva Velusamy2012-02-074-11/+11
|\ \ \ \
| * | | | gltrace: Use half-open ranges when defining frames.Siva Velusamy2012-02-074-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A GLFrame maintains the start and end indices of the GL Calls composing that frame. Currently, the indices comprise a closed range (i.e. include both the call at the start index and the call at the end index). This patch makes it a half open range (the end index is excluded) to make things easy to follow. Change-Id: Ie44b56a32d002595493b11f496ebf123072f8962
* | | | | Merge "gltrace: always display eglSwapBuffer in duration mini map."Siva Velusamy2012-02-071-2/+16
|\ \ \ \ \ | |/ / / /
| * | | | gltrace: always display eglSwapBuffer in duration mini map.Siva Velusamy2012-02-071-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eglSwapBuffer call is takes a really short time on the device, and so doesn't show up at all in the duration minimap. This patch explicitly sets the duration to be a high enough value so that eglSwapBuffer is clearly visible. Change-Id: If59a7c869b5b3f5b39dd130714197c7efabdd0ae
* | | | | Merge "gltrace: Display Calls in a Hierarchy"Siva Velusamy2012-02-075-81/+399
|\ \ \ \ \ | |/ / / / | | | / / | |_|/ / |/| | |
| * | | gltrace: Display Calls in a HierarchySiva Velusamy2012-02-075-81/+399
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses the gl extensions glPushMarker and glPopMarker in the trace file to construct call hierarchies. The call hierarchies are then displayed in a tree view. In order to perform this, the main widget in the GLFunctionTraceViewer has been changed from a Table to a Tree. The model for the tree is GLCallNode, which is a thin wrapper on top of a GLCall. A hierarchy can only be displayed if there is a single context that is being viewed. If a trace file has multiple contexts, then a context selector Combo box is provided that controls which context is being viewed. Change-Id: I043db99c15dfcc179fcffb656f3ffd2d9864f848
* | | Merge "Add support for suppressing lint via XML attributes"Tor Norbye2012-02-0747-80/+608
|\ \ \
| * | | Add support for suppressing lint via XML attributesTor Norbye2012-02-0647-80/+608
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset adds support for suppressing in XML files: (1) Lint will ignore errors found in attributes and elements if the element (or any surrounding parent elements) specifies a tools:ignore="id-list" attribute where the id-list matches the id of the reported issue (or "all"). The "tools" prefix can be any prefix bound to the namespace "http://schemas.android.com/tools" (2) There's a new quickfix shown for XML lint warnings which offers to add a lint suppress attribute for a given lint warning (setting the id to the id of the warning, and adding the tools namespace binding if necessary). (3) The XML formatter now handles namespaces a bit better: after the preferred attributes (id, name, style, layout params, etc) have been handled, attributes are sorted by namespace prefix before they are sorted by local name -- which effectively will sort any new tools:ignore attributes to the end. Change-Id: Id7474cde5665d9bd29bdd4e0d0cc89ed4d422aea
* | | Merge "Add Galaxy Nexus to devices.xml"Xavier Ducrohet2012-02-071-0/+27
|\ \ \
| * | | Add Galaxy Nexus to devices.xmlXavier Ducrohet2012-02-061-0/+27
| |/ / | | | | | | | | | Change-Id: I22b4a05a2fee098aeb83b42101d5585a3933dce0
* | | Merge "SDK Manager: stop spamming eclipse log."Raphael2012-02-072-3/+10
|\ \ \
| * | | SDK Manager: stop spamming eclipse log.Raphael2012-02-062-3/+10
| |/ / | | | | | | | | | | | | | | | SDK Bug: 24235 Change-Id: I5276381416a800cca3a1adf415d2f73dd52b2615
* | | Fix Windows SDK build, add missing dependencyRaphael Moll2012-02-061-0/+1
|/ / | | | | | | Change-Id: Ic632ec6d526b7913edf90fcca3b8409ebc2ff31a
* | Merge "SDK Manager: extract samples as read only."Raphael2012-02-063-2/+229
|\ \
| * | SDK Manager: extract samples as read only.Raphael2012-02-063-2/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the SDK Manager to extract sample code as read-only files (for java, aidl and xml sources). Then we have a change in ADT to make sure that the NPW copies the sources of a sample as read-write. Change-Id: I26a494d3b1a08890b5b6970eea759b6f7c63c62c
* | | Merge "SDK Manager: extract source packages as r-o."Raphael2012-02-068-32/+117
|\ \ \ | |/ / | | / | |/ |/|
| * SDK Manager: extract source packages as r-o.Raphael2012-02-068-32/+117
| | | | | | | | | | | | | | | | 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
* | Merge "ddms: fix deadlock"Siva Velusamy2012-02-062-48/+40
|\ \
| * | ddms: fix deadlockSiva Velusamy2012-02-062-48/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A deadlock can occur between: - a thread calling handleChunk() resulting in Device.getClients() - a thread calling processIncomingJDWPData() resulting in dropClient() For a full trace resulting in deadlock, see attachments in bug 24926. This patch fixes the deadlock by moving the entire synchronization into MonitorThread. Originally, processIncomingJdwpData, performs locking as follows: synchronized(monitorThread) { synchronized(device.getClientList() { synchronized(monitorThread.mClientList) { synchronized(device.getClientList() { This patch changes the structure of locking to look like: synchronized(device.getClientList()) { } synchronized(monitorThread) { synchronized(monitorThread.mClientList) { synchronized(device.getClientList() { As a result, device.getClientList() is always locked *after* monitorThread.mClientList. This matches the order of locking performed with handleChunk(), and should solve this deadlock scenario. Change-Id: Ie7a9efa897568af4450f0e23b2175ee66e127d7d
* | | Merge "logcat: Fix deadlock"Siva Velusamy2012-02-061-3/+29
|\ \ \ | |/ /
| * | logcat: Fix deadlockSiva Velusamy2012-02-061-3/+29
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LogCatReceiverFactory has a deadlock scenario that occurs like this: 1. When a device is disconnected, removeReceiverFor() is called from a DDMS device monitor thread. This thread holds certain DDMS internal locks. removeReceiverFor() is synchronized on LogCatReceiverFactory. So we have: DDMS thread - holds device lock removeReceiverFor - waiting to obtain lock for "this" object. 2. At the same time, a separate thread could call newReceiver. As part of creating a new receiver, we add a device change listener. So we have: newReceiver - holds "this" object. create device change listener - waiting for device lock. As a result, the system deadlocks. This patch fixes this condition by calling the removeReceiverFor from a non DDMS thread since we don't really care about DDMS locks here. Change-Id: Ic4ef4589acdcd7980864da23cde760debc4cfbb8
* | Merge "SDK: add find_lock.exe to atree"Raphael Moll2012-02-061-0/+2
|\ \
| * | SDK: add find_lock.exe to atreeRaphael Moll2012-02-061-0/+2
| |/ | | | | | | Change-Id: If6ca019f644ed3d33d5ce7ceac68686430fa13c7
* | Update expected size icon detector to new action bar sizeTor Norbye2012-02-063-7/+12
| | | | | | | | | | | | | | This addresses 25176: LINT: Incorrectly flags Action Bar icons as wrong size Change-Id: I1309c60f48585dd118951d928e3cd3d06a1d2939
* | HTML report tweaksTor Norbye2012-02-063-53/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If specifying a report directory (rather than an HTML file name), always write out an overview report. (Before this it only wrote an overview report if issues were *found* in multiple projects). - If checking *specific* issues (with the --check flag), don't write out the list of suppressed issues. - If no errors were found, write a message to that effect. - Make some space between the explanation area and the More Info URL, if any - Code cleanup Change-Id: I0c1a5cf14de15276904e8999323df443fc39dc9c
* | New button-related lint checksTor Norbye2012-02-0613-1/+1272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset adds 3 new lint checks related to buttons: (1) Order. This looks for "wrong" button orders, where either the Cancel button is not on the left, or the OK button is not on the right. (These are checked separately since it's possible to have for example "Cancel | Send".) (2) Case. This looks at OK and Cancel button labels and ensure that they're using the "standard" capitalization - this catches dialogs which use "CANCEL | ABORT" or "Cancel | Ok". (Yes, lint found several existing cases of this!) (3) Back. This looks for button with the label "Back" and warns to use the Android-specific naviagation approach instead. Change-Id: Ic0e4fe3a0347647fdba7c25d8e2290ec0e6bdd39 http://developer.android.com/design/building-blocks/dialogs.html
* | Merge "Add lint rule checking for showAsAction="always" in menus"Tor Norbye2012-02-069-1/+432
|\ \
| * | Add lint rule checking for showAsAction="always" in menusTor Norbye2012-02-039-1/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's better to use "ifRoom" instead. The check allows a menu to have a couple of "always" items if there is also at least one "ifRoom" item in the menu. In Java code, the lint check will complain if it finds one or more references to MenuItem.SHOW_AS_ACTION_ALWAYS but no references to SHOW_AS_ACTION_IF_ROOM. Change-Id: Ib13f89920bd3919ffd7fc0f0137e90103e8850c3
* | | Merge "The inefficient layout weights check only applies for horizontal ↵Tor Norbye2012-02-065-3/+97
|\ \ \ | |/ / | | | | | | LinearLayouts"
| * | The inefficient layout weights check only applies for horizontal LinearLayoutsTor Norbye2012-02-035-3/+97
| | | | | | | | | | | | Change-Id: I648e0adde917e47da02f181c019bf0302ebab643
* | | Merge "Fix type in Java parser interface"Tor Norbye2012-02-063-7/+5
|\ \ \ | |/ /