Commit Graph

4562 Commits

Author SHA1 Message Date
Chet Haase
e9d32ea13e Starting new transition cancels running transition
The behavior of running a transition is janky and unpredictable,
when there is already a transition running on the same scene root.
Usually, the new transition simply jumps to the end values, or
jumps to the start values for that transition and animates from
there.

A better approach is to cancel any running transition first, the
start the new transition from that point.

Even better would be to blend old/new transitions, or at least adjust
the animation timing according to where/when the previous transition
stopped. In the meantime, this fix is at least better than the
previous approach of ignoring running transitions.

Change-Id: I4f5fabb55f6454f1e9d66589a9a7c36f9fc013fb
2013-06-04 08:46:42 -07:00
Chet Haase
867a86613d Various fixes/cleanup in Scenes and Transitions
setDuration() wasn't handled correctly for TransitionGroup; it should
propagate the value to its children.

Also, videos with no ids were not being handled correctly. The transition code was
using the default id on those views (-1) to store start/end data about the view,
causing multiple non-id views to clobber values in the hashmaps. The correct approach
should be to ignore default id values - only store information about the view
instances, not about the unset ids.

Also, added a new test InterruptTest to be used to fix the current behavior of
not handling situations where new transitions start while old ones are still taking place.

Change-Id: I4e880bdbb33cc26d487bceb0d56e463e72f7621f
2013-06-03 16:37:05 -07:00
Adam Powell
3f7a6935d3 Merge "Fix a bug resolving the correct icon/logo in action bars" 2013-06-01 00:07:05 +00:00
Adam Powell
04fe6ebb9f Fix a bug resolving the correct icon/logo in action bars
Remove some abstraction-breaking magic in ActionBarView and replace it
with proper resolution of the icon/logo when creating a window. The
old implementation relied on the ActionBarView's context being an
Activity.

Bug 9171554

Change-Id: Idbbb1942622195dcb55e8119f2d64287b07bb509
2013-05-31 15:00:24 -07:00
Jean Chalard
e507c840c8 am 44baed2d: am af9e5e5f: Merge "Improve the documentation for InputConnection." into jb-mr2-dev
* commit '44baed2dc31d29c48f5d49577c109ca3903ad915':
  Improve the documentation for InputConnection.
2013-05-30 19:49:23 -07:00
Jean Chalard
44baed2dc3 am af9e5e5f: Merge "Improve the documentation for InputConnection." into jb-mr2-dev
* commit 'af9e5e5f618448f77f74bb36e0adbe88cb2ae156':
  Improve the documentation for InputConnection.
2013-05-30 19:47:41 -07:00
Jean Chalard
e811de2d6c Improve the documentation for InputConnection.
- Add many details to most methods.
- Add comments specific to IME authors and to editor authors.
- Add missing return value docs.
- Straighten out single-spacing vs double spacing.

Bug: 8843866
Change-Id: If1f6dcf0457d5332a7ebb1ebfb1967c6ff0df722
2013-05-30 18:03:39 +09:00
Romain Guy
c4ea109ba2 Merge "Disable the AssetAtlas when running under valgrind Bug #9191438" 2013-05-29 23:02:19 +00:00
Romain Guy
80b12fcaae Disable the AssetAtlas when running under valgrind
Bug #9191438

When running under valgrind, the ppid will be different from the ppid
of the system server (which always gets forked from zygote.)

Change-Id: I42cbf99fd0084aeab76c30de9beb7c49ed1fc7d8
2013-05-29 16:01:36 -07:00
John Spurlock
c00930f4fe am 50ef7ab7: Docfix: remove confusing "disabled" link label.
* commit '50ef7ab70ad02deb9ad3694fb894741d6007564a':
  Docfix: remove confusing "disabled" link label.
2013-05-29 15:18:51 -07:00
John Spurlock
50ef7ab70a Docfix: remove confusing "disabled" link label.
Change-Id: I1acb9c8c20b6cda0e6cfb2fc1e450f37e7cd4eeb
2013-05-29 17:43:16 -04:00
John Spurlock
0ffefdf9fc Docfix: remove confusing "disabled" link label.
Change-Id: I96ebc44fe69de60e187f200b5e9d0b5adc478c17
2013-05-29 17:34:53 -04:00
Jeff Brown
19c618dbce am c8a77735: am dea6e86d: am 3422ceb6: Merge "Bug fix for building the hover target list"
* commit 'c8a777356267803be3e235b2fdaf807166fb46eb':
  Bug fix for building the hover target list
2013-05-28 15:52:22 -07:00
Jeff Brown
c8a7773562 am dea6e86d: am 3422ceb6: Merge "Bug fix for building the hover target list"
* commit 'dea6e86dce716b67fe92c9b281fe9e79256f3b78':
  Bug fix for building the hover target list
2013-05-28 15:49:13 -07:00
Jeff Brown
dea6e86dce am 3422ceb6: Merge "Bug fix for building the hover target list"
* commit '3422ceb6ba453c28ac39dfce34534e0346394a3a':
  Bug fix for building the hover target list
2013-05-28 15:46:00 -07:00
Jeff Brown
3422ceb6ba Merge "Bug fix for building the hover target list" 2013-05-28 20:04:23 +00:00
John Spurlock
be7a7e546f am ee352cca: Merge "Fix typo in View.java javadocs" into jb-mr2-dev
* commit 'ee352cca1f3beb577dfdf1c18a08242e4f94d01b':
  Fix typo in View.java javadocs
2013-05-28 09:36:19 -07:00
John Spurlock
0efd4f0215 Merge "Fix typo in View.java javadocs" 2013-05-28 15:45:18 +00:00
John Spurlock
44b1edd948 Fix typo in View.java javadocs
Change-Id: I85b9b2bd30d1f9d38954c31f24a352930a230ced
2013-05-28 11:40:58 -04:00
John Spurlock
9643d40395 Fix typo in View.java javadocs
Change-Id: I6da88e18fe32c4763c916990f6aa17dda21f5c8f
2013-05-28 09:44:50 -04:00
Dianne Hackborn
2e39f5c5cb Merge "New ArrayMap class." 2013-05-24 23:37:16 +00:00
Dianne Hackborn
f4bf0ae2a7 New ArrayMap class.
This is a new kind of key/value mapping that stores its data
as an array, so it doesn't need to create an extra Entry object
for every mapping placed in to it.  It is also optimized to reduce
memory overhead in other ways, by keeping the base object small,
being fairly aggressive about keeping the array data structures
small, etc.

There are some unit and performance tests dropped in to some
random places; they will need to be put somewhere else once I
decided what we are going to do with this for the next release
(for example if we make it public the unit tests should go in
to CTS).

Switch IntentResolver to using ArrayMap instead of HashMap.

Also get rid of a bunch of duplicate implementations of binarySearch,
and add an optimization to the various sparse arrays where you can
supply an explicit 0 capacity to prevent it from doing an initial
array allocation; use this new optimization in a few places where it
makes sense.

Change-Id: I01ef2764680f8ae49938e2a2ed40dc01606a056b
2013-05-24 16:36:14 -07:00
Romain Guy
6080940411 Merge "Add PerfHUD ES profiling capabilities" 2013-05-23 19:50:58 +00:00
Romain Guy
e9bc11f712 Add PerfHUD ES profiling capabilities
The eglGetSystemTimeNV extension can be used to enable profiling
in PerfHUD ES. When the delta of two calls to eglGetSystemTimeNV
equals 0, we now cancels display lists updates. This allows the
tool to redraw the same frame several times in a row to run its
analysis.

For better results profiling should only be attempted after
setting viewroot.profile_rendering to true using adb shell
setprop.

Change-Id: I02e3c237418004cff8d6cb0b9a37126efae44c90
2013-05-23 12:50:13 -07:00
Romain Guy
0c63d7c239 am 469cc57c: am 2f35d244: Merge "Avoid extraneous EGL surface allocations Bug #8667873" into jb-mr2-dev
* commit '469cc57ca77687420246dd679e94eb242fcec41d':
  Avoid extraneous EGL surface allocations Bug #8667873
2013-05-21 19:12:50 -07:00
Romain Guy
469cc57ca7 am 2f35d244: Merge "Avoid extraneous EGL surface allocations Bug #8667873" into jb-mr2-dev
* commit '2f35d2441e59b996a56653881fdc2f52d4eeb644':
  Avoid extraneous EGL surface allocations Bug #8667873
2013-05-21 19:11:16 -07:00
Romain Guy
2f35d2441e Merge "Avoid extraneous EGL surface allocations Bug #8667873" into jb-mr2-dev 2013-05-22 02:08:24 +00:00
Romain Guy
370ab062a0 Avoid extraneous EGL surface allocations
Bug #8667873

windowShouldResize means we need to layout the window, it doesn't mean
the dimensions of the surface have changed. We should only check the
width and the height. With this fix we can avoid a surface allocation
every time the window shade is opened or closed.

Change-Id: I8afe97b820a865723f2aab7a5aa4ddc8eaaec6e1
2013-05-21 12:15:07 -07:00
Romain Guy
49f2e4098d Merge "Destroy display lists when running complete memory trims Bug #8833153" 2013-05-21 18:25:14 +00:00
Romain Guy
779321fde1 Destroy display lists when running complete memory trims
Bug #8833153

Display lists ops might now keep references to GL resources so they
must be destroyed when the EGL context goes away.

Change-Id: I0feb18f5539b345234a58dafa6f0775d7d7460dc
2013-05-20 16:23:34 -07:00
Svetoslav Ganov
f1cfdcee27 am 5315953b: am 78a4630e: Merge "Taking into account data change for AbsListView when prefetching node infos." into jb-mr2-dev
* commit '5315953b86ee7ca29756504535e124b053286623':
  Taking into account data change for AbsListView when prefetching node infos.
2013-05-20 15:46:18 -07:00
Svetoslav Ganov
5315953b86 am 78a4630e: Merge "Taking into account data change for AbsListView when prefetching node infos." into jb-mr2-dev
* commit '78a4630edaa11846b09bdad84bac18a0441c500a':
  Taking into account data change for AbsListView when prefetching node infos.
2013-05-20 15:43:36 -07:00
Svetoslav Ganov
78a4630eda Merge "Taking into account data change for AbsListView when prefetching node infos." into jb-mr2-dev 2013-05-20 22:41:28 +00:00
Chet Haase
4e239aeed3 am e8d6dc4c: am 865cffc7: Merge "Add null check in ViewOverlay" into jb-mr2-dev
* commit 'e8d6dc4cad65c8c29c365d71d2255eb637581fdb':
  Add null check in ViewOverlay
2013-05-20 13:44:59 -07:00
Chet Haase
e8d6dc4cad am 865cffc7: Merge "Add null check in ViewOverlay" into jb-mr2-dev
* commit '865cffc7cece8f10a9e6aab1e89a92c8794cb279':
  Add null check in ViewOverlay
2013-05-20 13:43:36 -07:00
Chet Haase
d8b0b23324 Add null check in ViewOverlay
View.getOverlay().clear() can failed with an NPE if there are
no drawables in the overlay. Fix: add a null check before dereferencing
the mDrawables field.

Issue #8895794 getOverlay.clear() crashes if drawables were not added previously

Change-Id: I9b2a63036450915681ba3a89a0911e2490063702
2013-05-20 07:57:02 -07:00
Svetoslav Ganov
50776863a2 Taking into account data change for AbsListView when prefetching node infos.
We are prefetching accessibility node infos to minimize the number of IPC
calls when an accessibility service introspects the screen. It is however,
possible that the view we are prefetching is a child of an AbsListView whose
adapter changed its data but the AbsListView still did not perform a layout
pass to sync its children with the new adapter state. This may lead to an
exeption when trying to query for the state of a child's position. If the
data of the adapter is changed and the layout pass still not performed,
we return null for the AbsLIstView's children. When the layout pass
completes we already notify the accessibliity layer so it will be able to
refetch the children of the AbsListView.

bug:8433433

Change-Id: I56313c721aef3848b15fad50027d068ba1d291f7
2013-05-17 18:36:57 -07:00
Romain Guy
aa29a97f6d Clear display lists when a View becomes GONE/INVISIBLE
We force an invalidate whenever a View becomes VISIBLE so there is
no need to keep the display list object while the view is either
GONE or INVISIBLE. In particular this clears the lists of references
kept by GLES20DisplayList, which helps the GC free large objects
such as Bitmaps.

Change-Id: Ifde0cb40baa1f35e5e6439d3bf8eab3c4c1270f0
2013-05-17 17:07:47 -07:00
Chet Haase
f27796cbbe am 944a8725: am bee0495f: Merge "Dirty rect must expand, not contract." into jb-mr2-dev
* commit '944a8725e6e2ccb310c9515c9067f995c034b724':
  Dirty rect must expand, not contract.
2013-05-15 13:49:48 -07:00
Chet Haase
944a8725e6 am bee0495f: Merge "Dirty rect must expand, not contract." into jb-mr2-dev
* commit 'bee0495fa17b7e385d880f18e510e295c000cfa9':
  Dirty rect must expand, not contract.
2013-05-15 13:35:09 -07:00
Chet Haase
5495c72612 Dirty rect must expand, not contract.
Different devices have different precision, leading to different pixels
being touched during rendering operations. We need to ensure that the
dirty rect we draw with (and which gets erased on the following frame)
encompasses all possible pixels instead of some ideal rounded rectangle.

The bug from this code led to dropped-pixels artifacts on some devices,
where we'd scale a view, drawing it into some pixels, then invalidate
that same area on the next frame, but the invalidation rectangle didn't
cover the same pixels as the device drew into.

The fix is to floor() the left/top pixels and ceil() the right/bottom
pixels of the transformed invalidation rectangle.

Issue #8971348 dropped pixel artifacts during some scaling operations

Change-Id: Iedb1afd5621dff43bf7a3919bdbd8d2251647fd2
2013-05-14 21:19:48 -07:00
Svetoslav
06ccc77f48 am 80127981: am c0a979ce: Merge "Fixing the accessibility text traversal in extend mode." into jb-mr2-dev
* commit '80127981f85a0be842007596830c1675a9a3665e':
  Fixing the accessibility text traversal in extend mode.
2013-05-14 11:09:35 -07:00
Svetoslav
80127981f8 am c0a979ce: Merge "Fixing the accessibility text traversal in extend mode." into jb-mr2-dev
* commit 'c0a979ce30cf9b96c0a84d0679aeeef7153a22fa':
  Fixing the accessibility text traversal in extend mode.
2013-05-14 11:07:08 -07:00
Svetoslav
c0a979ce30 Merge "Fixing the accessibility text traversal in extend mode." into jb-mr2-dev 2013-05-14 17:39:36 +00:00
John Spurlock
04db1762fb Window manager cleanup.
Specifically:
 - Fix policy vs wm lock management issues.
 - Share runnable to avoid allocation.
 - Remove unused noop runnable.
 - Make sure to handle status bar = null case.
 - Fix javadoc typo.

Bug: 8890313
Change-Id: I242eaef8e946025f6885d6dba3225722fb0ca7ce
2013-05-13 17:24:24 -04:00
Kristian Monsen
155d965ab0 am 3d1edc03: am 6e7ed13b: Merge "Fix for bug 8623163: Call view methods on the UI thread" into jb-mr2-dev
* commit '3d1edc033ff00430e1f8118cd871d9996b7172a1':
  Fix for bug 8623163: Call view methods on the UI thread
2013-05-13 02:34:39 -07:00
Kristian Monsen
3d1edc033f am 6e7ed13b: Merge "Fix for bug 8623163: Call view methods on the UI thread" into jb-mr2-dev
* commit '6e7ed13b12edc9e02580a273c3aa546e62231b5a':
  Fix for bug 8623163: Call view methods on the UI thread
2013-05-13 02:33:01 -07:00
Kristian Monsen
6e7ed13b12 Merge "Fix for bug 8623163: Call view methods on the UI thread" into jb-mr2-dev 2013-05-13 09:30:07 +00:00
Svetoslav
abad55d860 Fixing the accessibility text traversal in extend mode.
We added APIs to allow an accessibility service to extend the
selection while moving the cursor at a given granularity such
as word, character, etc. The problem is that the traversal was
extending only the end of the selection while moving forward
and the start of the selection while moving backward. This leads
to a case in which the user cannot shrink/extend the selection
because for example instead of shrinking the end of the selection
the implementation was extending the start.

Now extending the selection moves only the selection end. This is
the same behavior as text view using a keyboard.

Tests: https://googleplex-android-review.googlesource.com/#/c/307062

bug:8839844

Change-Id: Id6965b102647df909f61301fcc8ec05458dd5881
2013-05-10 20:14:40 -07:00
Craig Mautner
e555d16421 am c3797f40: am 4754f401: Merge "Avoid NullPointerException in getHandler()"
* commit 'c3797f40c1a8a8f7ca72816642110221933ff8fd':
  Avoid NullPointerException in getHandler()
2013-05-10 15:17:00 -07:00