aboutsummaryrefslogtreecommitdiffstats
path: root/ddms/libs/ddmuilib/src
Commit message (Collapse)AuthorAgeFilesLines
* SDK: Delete projects moved to tools/base or tools/swt.Raphael Moll2013-03-13135-27743/+0
| | | | Change-Id: Iba15f82cb00d19217382c78d8ff37dda1e97ea59
* Move UI data in LogCatFilter to a separate classSiva Velusamy2013-02-076-303/+150
| | | | | | | | | | | There were a couple of pieces of UI data (unread count & flag indicating whether a filter is transient) associated with a filter. This CL moves both of them out into a separate class. The panel maintains a mapping from a filter to its associated UI data. The core filter class has been moved out into ddmlib. Change-Id: I325176c33094d583c0ef9abe890e5462aeeb4945
* Move core logcat functionality from ddmuilib to ddmlibSiva Velusamy2013-02-078-282/+32
| | | | | | | Requires Change-Id Ie120f978e5c5646e086ec999c9ef5027b724cc7a in tools/base Change-Id: Ib436fa6b70ba49e48b2e7c974094c27b77c9fbb9
* Use pid to appname mapping from ddmlib.Siva Velusamy2013-02-063-140/+10
| | | | | | | Replace LogCatPidToNameMapper with a call to IDevice.getClientName(pid) Change-Id: I8c29b5d29cccf29ea22536a3f270f0f8963aba64
* Make ddms show Java stacks in the traditional format, for legibility.Elliott Hughes2012-12-183-103/+31
| | | | | | Also remove the need to double-click to see a stack. Change-Id: I076179b09350d1c85614c7325e2faa4848b4e8d8
* Automatically enable graphics profiling if necessarySiva Velusamy2012-12-061-0/+54
| | | | | | | Rather than rely on the user enabling the setting in developer options, we enable it automatically. Change-Id: I25360d88e8b0262dc6c5b9f503cd0e7e2958ba28
* ddms sysinfo: Add support for gfxinfoSiva Velusamy2012-12-061-7/+169
| | | | Change-Id: I8fdb798a0c5374a4be2825cb4be5f4f58437253e
* sysinfo: Remove unsupported views.Siva Velusamy2012-12-051-68/+42
| | | | | | | | | | | General cleanup of the SysInfo Panel: - Remove support for displaying wakelocks/alarm/sync etc info since the existing parsers were woefully out of date and didn't work anyway. - Move parsing datasets out of the SWT thread Change-Id: Iac77c322ad1db715772f585212da2330a6f9d693
* ddms: Fix procrank/meminfo parser for the Sysinfo panel.Siva Velusamy2012-11-201-36/+62
| | | | Change-Id: I86d00756242c4a3f5ac70a926065789fde428825
* ddms: Fix CPU load reader in SysinfoPanelSiva Velusamy2012-11-071-210/+306
| | | | | | | | | | | | The sysinfo panel provides a pie chart visualizer for a few "adb shell dumpsys" options. Unfortunately, most of them don't work with newer devices since the output format of the dumpsys command has changed. This CL updates the CPU load parser to work for both old and new output formats. http://code.google.com/p/android/issues/detail?id=39243 Change-Id: Ie76eedcaa7cfe13edf930104308ac824319dafa8
* nativeheap: do not set layout on parentSiva Velusamy2012-10-151-2/+0
| | | | Change-Id: If5f0c6073cfe847c8d04360cfe7b2f5e4cd58766
* ddms: Show user id only for non ownersSiva Velusamy2012-10-101-1/+1
| | | | | | | | - Makes it easier to scan - Doesn't show user id at all for phones since there are no multiple users on a phone. Change-Id: I108f220ccf0af7e1293dd6cab58705ea19014ae4
* logcat: Only listen to user generated scroll eventsSiva Velusamy2012-10-011-6/+52
| | | | | | | Scrolling behavior should not be altered when the scroll bar location changes due to the addition of new messages. Change-Id: Id38deb9f17d6d58bea6f25b33fed23c887c5cc5d
* logcat: Support auto scroll lock.Siva Velusamy2012-09-281-4/+40
| | | | | | | | | | | | | | Another go at adding support for automatically enabling/disabling scroll lock. Past attempts have been brittle because of differences in how Windows, Linux and Mac handle the scrollbar. The key to getting this work consistently across platforms seems to be in explicitly setting the range of values for the scrollbar. Setting the maximum to be a high enough value relative to the thumb allows accurate detection of even minor movements away from the bottom of the scrollbar. Change-Id: Ic3259cc4e2e8a20f3a87ce4bf234217cea792f88
* ddms: report user id if availableSiva Velusamy2012-09-101-1/+6
| | | | | | | | The HELO and APNM packets may append the user id at the end of the packet. If that data is available, display it as part of the application name. Change-Id: Ie353c2cc2895db649fc6ab6054f1c88f5d2f247f
* Fixed DDMS network statistics parsingMichael Wright2012-06-221-2/+3
| | | | Change-Id: I6238185edd10227a01ae2f5282de18b17edb26bc
* logcat: fix potential NPESiva Velusamy2012-06-221-3/+5
| | | | | | | Fix NPE that could happen if the device goes offline even before logcat command is issued on it, Change-Id: I334caae5e42d25eff396ce0b7b7a5e44c3ed4f61
* Provide readable device name rather than just serial numberSiva Velusamy2012-06-131-52/+1
| | | | | | | | | | | | | | | | | There are a number of places where we need to display a device name. Currently, DDMS shows the serial number + manufacturer/model if available, but in other instances, we just show the serial number. This CL provides a getName() method in the IDevice interface so that all the locations which require a human readable name can use this. The name is typically of the form manufacturer-model-serial. If the manufacturer/model strings are not available, then those fields are omitted, so it will show just the serial number. Change-Id: I80ef7b48a4c7c8587042c1227c932251e18dba2e
* Find Dialog: allow control over the default action.Siva Velusamy2012-06-081-4/+22
| | | | | | | | | | This CL allows the default action to be either of the "Find Next" or the "Find Previous" buttons in the find dialog. Typically, in logcat you want to find previous, while in gltrace view you want to find next. Change-Id: Ie11cbd8a7987b8011ec2ee3664034e9ecfc4e24b
* NetworkPanel: Update socket tag decodingSiva Velusamy2012-06-071-1/+15
| | | | Change-Id: If2e89c894f5f11104e30d892bcae2b2daec17b08
* Move base class for FindDialog to a common location.Siva Velusamy2012-06-054-7/+12
| | | | Change-Id: Ie3b2e424a7dc9df73aca1c7914497f1c9a126901
* logcat find dialog: Add missing trim()Siva Velusamy2012-06-051-1/+1
| | | | Change-Id: I137994ea4723299461c695559d664230a98b082f
* logcat: Support searching through the message list.Siva Velusamy2012-06-054-1/+319
| | | | | | | | | | | | This CL adds support for invoking a find dialog when the logcat view is in focus. The dialog can be invoked via Edit -> Find (Ctrl + F), or via the context menu. The dialog provides a way to specify a search term and allows the user to search forward or backward in the list of messages. Change-Id: I7e7c6b20a051c161f035b3b45aba5f119f2c11a9
* logcat: Fix scroll lock iconSiva Velusamy2012-06-013-1/+1
| | | | Change-Id: I3825ba3149c644e834744f347a3973e9c8cd07ce
* Fix "Resource leak: <Foo> is never closed"Tor Norbye2012-05-303-6/+20
| | | | | | | This changeset fixes various code fragments opening resources without closing them. Change-Id: I6ed48a32dc5de4c11cab394dd3883ebbb54d2938
* logcat: Allow users to set colors for different priorities.Siva Velusamy2012-05-251-14/+102
| | | | | | | | | | This patch enables users to customize the colors used for log messages of different priority levels. These settings are available in the Android -> Logcat -> Colors preference page. This fixes: http://code.google.com/p/android/issues/detail?id=31494 Change-Id: I9430f573f84f09d00bfe25d6e53eeccf4e338e9d
* Allow users more control over auto monitoring logcat.Siva Velusamy2012-05-091-2/+5
| | | | | | | | | | | | | | | | | | | To help users who don't know about logcat, we automatically monitor logcat output to see if there are any errors from a user application, and if so, display the logcat view. This patch makes this feature a bit easier to use: - The first time the logcat view is about to be displayed, a dialog is shown that allows the users to enable/disable auto monitoring. Note that this can also be done via logcat preferences. - Users can now control the message priority that will trigger auto monitoring. - Once the logcat view has been displayed, we turn off auto monitoring until the next launch. This reduces overhead and avoids unnecessary change of focus in cases where the user is already interacting with the logcat view. Change-Id: I44a9ccea9148dea7bf6dc7d7864a1bb56a7376fe
* logcat: Validate regex patterns before creating filters.Siva Velusamy2012-05-042-7/+22
| | | | | | | | | | | | | | | Currently, when users create regex based filters, any error in the regex pattern is logged. When the error is logged, context switches to the Eclipse console view. As a result, users have to switch back to the logcat view and fix the error. This patch validates the text on entry and sets the text color to be red if the pattern is incorrect. There are no context switches as a result. This fixes issue: http://code.google.com/p/android/issues/detail?id=22019 Change-Id: I5b571e34c1517b0a78046b56ad83c2aa8632abdb
* logcat: Add a device disconnected message.Siva Velusamy2012-05-042-2/+12
| | | | | | | | | | When a device is disconnected, an explicit message informing the user of this event is attached to the log. See http://code.google.com/p/android/issues/detail?id=25830 for the reason why this might be useful. Change-Id: I969004cb72b877b8319a639607f82c1c9f9a8635
* Add ability to right click on a message to create filterSiva Velusamy2012-05-041-1/+52
| | | | | | | | | | | | This patch allows users to create logcat filters based on an existing message. When a message is right clicked, it brings up a menu with an entry that says "Filter similar messages..". Selecting that will bring up the "Add new filter" dialog with its input fields prefilled based on the message contents. This fixes: http://code.google.com/p/android/issues/detail?id=25835 Change-Id: If324330cbf78b503be61c31ebcff053d0f869c1e
* logcat: Remove JFace TableViewer and use SWT Table directlySiva Velusamy2012-05-039-552/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a bunch of outstanding issues related to scrolling in the presence of a full buffer. Currently, the logbuffer is provided as the input model to the TableViewer, and ViewerFilter's are used to filter the data. This patch removes the JFace toolkit and directly works on the SWT Table. When log messages arrive, rather than refreshing the entire table, we can now just delete the TableItems corresponding to the logs that were pushed out, and add new TableItems for the incoming logs. At steady state, this implementation performs far less work than the previous implementation. However, during startup, this implementation will perform more work since it does not use the SWT.VIRTUAL bit (as all TableItems are created anyway). Also, zebra striping has been removed to avoid appearance of flicker when scroll lock is on. Auto scroll lock behavior has been removed, and scroll lock button behaves exactly like the scroll lock button in an Eclipse console. Change-Id: Ic14487f7ad41338a581aed0ba2d85d292a584950
* Merge "Fixes unexpected rows are copied when LogCat paused."Siva Velusamy2012-04-202-7/+37
|\
| * Fixes unexpected rows are copied when LogCat paused.Keiji Ariyama2012-04-042-7/+37
| | | | | | | | | | | | Issue: http://code.google.com/p/android/issues/detail?id=28253 Change-Id: If7b3c2a898b30834a8e76c5aad615a41ba5ecc04
* | Ensure screenshots saved through DDMS end with .png.Sebastian Roth2012-04-061-0/+4
|/ | | | | | | This patch simply makes sure that the filename will have a .png extension when saving a screenshot through DDMS. Change-Id: Idb00259ac456fcaf11ee99736663fc7ddbbc505b Signed-off-by: Sebastian Roth <sebastian.roth@gmail.com>
* logcat: support new format for "logcat -v long"Siva Velusamy2012-03-062-3/+21
| | | | | | | | The thread id's output in "logcat -v long" used to be encoded in hex, but not anymore. This fixes the logcat parser to accomodate both the old and the new formats. Change-Id: I0871a68f2f82c5e4660c404ec8970063d7b68a88
* 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
* Pause network panel by default, handle devices.Jeff Sharkey2012-02-011-65/+120
| | | | | | | | | Always start with network panel paused, letting user control start and stop explicitly. Also pause when client is changed. Handle devices without xt_qtaguid module by showing error dialog. Change-Id: I4f6c81d8c52729c155b7f4a477bcec1857681da8
* Show detailed network statistics from xt_qtaguid.Jeff Sharkey2012-02-011-0/+1053
| | | | | | | | | | | | | New panel that shows live network statistics by reading xt_qtaguid proc file across adb. Shows all tags for selected UID on a chart with 30 seconds of history. Each tag is presented as unique series, with the overall usage in grey. Table below the chart shows running totals of known tags. Includes options to pause, reset, and change polling frequency. Bug: 5194997 Change-Id: I72d43ab51aaf93ecfd6d45fcd452c7230cdee5b7
* Fix locale handling of uppercase/lowercaseTor Norbye2012-01-061-3/+5
| | | | | | | | | | | | | | | | | This changeset fixes issue 23747: i and İ character problem in turkish operating Systems... and probably many other bugs in the Turkish locale. Basically, we had a lot of String.toLowerCase() and String.toUpperCase() calls. This performs locale sensitive conversions, which in many cases is NOT what we want; for "machine readable" conversions we should be using Locale.US which performs no special cases. For more, see http://developer.android.com/reference/java/util/Locale.html#default_locale Change-Id: I996b0e70fb377e8dae484c5811deb8bc9afb684c
* Update SDK codebase to JDK 6Tor Norbye2011-12-2148-125/+420
| | | | | | | | | | | | | | | | | | | | | This changeset makes the SDK codebase compile with source=1.6 (which means it also requires JDK 6). This means that methods implementing an interface requires @Override's. It also means we can start using APIs like the ArrayDeque class and methods like String#isEmpty(). This changeset looks big but the change is trivial: it's basically adding @Override in all the places that need it, along with some other automatic Eclipse cleanup in certain files (such as reordering imports where they were incorrectly ordered (because older versions of Eclipse didn't always handle inner classes right)), as well as cleaning up trailing whitespace and removing some $NON-NLS-1$ markers on lines where there aren't any string literals anymore. This changeset also sets the source and target JDK level to 6 in the Eclipse compiler .settings file, and synchronizes this file to all the other Eclipse SDK projects. Change-Id: I6a9585aa44c3dee9a5c00739ab22fbdbcb9f8275
* ddms: display manufacturer & model for devices.Siva Velusamy2011-12-201-1/+51
| | | | | | | | DDMS displays only the serial number for connected devices. This patch appends the manufacturer & model name to the serial number. Change-Id: I90400365fe984b0b0a198e3c21aaf25eb05aa930
* logcat: Improve auto scroll lock behaviorSiva Velusamy2011-12-143-46/+79
| | | | | | | | | | | | | | | | Setting up scroll lock automatically is broken due to the highly platform dependent nature of the scroll bar events. This patch improves the current situation significantly, but may not be the last word on this subject. This patch does the following: 1. Sets up auto scroll lock on Windows and Linux. 2. Removes auto scroll locking on Mac. Users have to manually press the Pause Logcat button. 3. Renames the "Scroll to latest" button to "Pause Logcat" to more accurately reflect what is happening. Change-Id: I1ce03371d7ac7aeaea218aa3c5c426c69c56a527
* logcat: when copying items, index into filtered list.Siva Velusamy2011-12-131-7/+42
| | | | | | | | | | | | | The previous commit introduced a bug: The SWT table model is a list of logcat messages before any filters are applied. But the user sees the filtered messages. So when user selects items in the table, the selection index will not match the index in the input model. This patch applies all current filters to the input model and then indexes this filtered list to get the same items that the user has selected in the view. Change-Id: If955bd5c22e1c587bcf5fe32092f513d53c0d8ef
* logcat: fix npe & clear log in filtered viewSiva Velusamy2011-12-121-2/+17
| | | | | | | | | | | | | 1. Fix NPE when selecting all items: Issue is that in case of a table with SWT.VIRTUAL, tableItem.getData() could return NULL if the item hasn't been shown. So we have to rely on the original model to retrieve the items. 2. When viewing items after applying a filter, clear log will clear the full log but not the filtered view. To clear the filtered view, the SWT ViewerFilters have to be reapplied. Change-Id: I6c66be4e0e8abb6db114588f382bcd3b9fe8ee0f
* logcat: bring up edit filter dialog on double clickSiva Velusamy2011-11-281-0/+5
| | | | | | | When a saved filter is double clicked, bring up the 'Edit Filter' dialog for the selected filter. Change-Id: Idd6766ba95e0d2f228c664ffccf8dbfb5b93b0b8
* logcat: fix tooltip shift distanceSiva Velusamy2011-11-281-0/+11
| | | | | | | Fix for http://code.google.com/p/android/issues/detail?id=22111 which is OS X Lion specific. This fix hasn't actually been tested on OS X Lion! Change-Id: Ifb4397e1482ebacc84cd90e83bb6837b883fbd08
* nativeheap: Do not clean up display if a client is killed.Siva Velusamy2011-11-061-17/+21
| | | | | | | | | Fix for Issue #21554. When a client process dies, the native heap view is immediately cleared. This makes it impossible to view the native heap snapshots for processes that are being killed due to OOM errors. Change-Id: I3b6c868832c6b48e591d31d1643db20887ff8c13
* ddms-heap: Show atleast 1 row.Siva Velusamy2011-11-021-45/+57
| | | | | | | | One some platforms, the table doesn't show any rows at all, and there is no way to resize the table. This patch makes sure that there is one row that is always displayed. Change-Id: Ib93839c610926a7f8629436d26bb7ad9485431af
* logcat: update scroll behavior when buffer is full.Siva Velusamy2011-11-022-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the logcat buffer is full, any received message will push out an old message. As a result, the messages keep moving up the table, which is annoying if you want to view a particular message. Ideally, we'd keep the view constant, but only the scrollbar moves up to indicate that we have received new messages. But this doesn't work in an SWT table. One solution would be to refresh the table and then scroll it to remain in the same place. This causes a flicker and is annoying. This patch stops refreshing the table when the user is viewing an older item in the table, and starts auto refresh if the scroll bar is again brought to the bottom. In addition it provides a toolbar button that reflects the state of scrolling, similar to a scroll lock checkbox. The one downside to this is that since the scrollbar does not move, the user does not have clue if new messages are being received. The new messages will be noticed only if the user unselects the scroll lock button, or manually moves the scrollbar down. This is a fix for Issue #20805. Change-Id: I12108789265fec38287a466d21505db85892594d
* Code cleanup: make sure FileInputStreams are closed.Raphael2011-10-132-8/+28
| | | | | | | | | | | | | | | | Various places of the code construct a new FileInputStream on the fly and give it to another method. One many occasions the stream is never properly closed, which can lock files on Windows. 2 specific cases: - Properties.load() doesn't seem to close its input (when looking at the source bundled with the JRE). - The doc of InputSource (used by various XML parsers like the pull parser) indicates the caller should in general not close the stream and the parser itself should do it. Change-Id: I622b54a22f97ed2c9c8fdc56ccde331207d9d212