History log of /frameworks/base/core/java/android/view/View.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
11f19f15ea474edde07bf34877d2531fff6c26f0 03-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> View's visibility to the user not checking predecessor alpha.

1. A view is visible to the user if is attached to a visible window,
its visibility is VISIBLE, its alpha is not zero, all its
predecessors have visibility VISIBLE and non zero alpha, the
view is not fully covered by predecessors and is within the
screen.

The function that computes whether a view is visible for
accessibility purposes was not taking into account the
predecessors' alpha.

bug:7454355

Change-Id: I7609f4366da260091d68e5b25832498843fd3d0a
/frameworks/base/core/java/android/view/View.java
3d1728c03a0cd1aaed6bc81c97de27d62c771a6e 01-Nov-2012 Romain Guy <romainguy@google.com> A new clock widget to create lock screen appwidgets

This new widget replaces DigitalClock. It listens to all the correct
system events and offer the ability to customize the formatting
patterns in 12-hour and 24-hour modes. It also supports fixed
time zones to create world clocks.

One more step towards becoming ClockOS!

Change-Id: I677e5dfca8cd8c8d1f8c49e54d7507f4d1885bf4
/frameworks/base/core/java/android/view/View.java
07ce0ca265274c5ba95e6ec3e0950e38b8ce97ea 27-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #7419054 TextView Drawables resolution is broken in RTL mode" into jb-mr1-dev
1957d281ea123e4925e51fa5ad22ce239ef2a07d 26-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7419054 TextView Drawables resolution is broken in RTL mode

- check layout direction previous value in the onResolveDrawables(int) callback
- dont do any Drawables resolution if we cannot resolve the layout direction
- also remove unnecessary call to resolveRtlPropertiesIfNeeded() in ViewGroup when
adding a child as the call to resolveRtlPropertiesIfNeeded() will be done into
the measure() call itself later

Change-Id: I62237af3d307dfea203f7f2865551d1c61a0e0b8
/frameworks/base/core/java/android/view/View.java
72898e982867ff11ff6494ad71898176e30127a9 25-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> FIx bug #7414801 Should make private and final View.TEXT_DIRECTION_DEFAULT and View.TEXT_ALIGNMENT_DEFAULT constants

- made them private and final
- fixed comment

Change-Id: Ia1d22329edb7ac26e7bcd0489770a99ad41c4f0e
/frameworks/base/core/java/android/view/View.java
5311c4476ec59f0cd1502b81b03141bac48ee385 22-Oct-2012 Adam Powell <adamp@google.com> Remove View's long press callbacks when ACTION_CANCEL is received

Bug 7391646

Change-Id: Icd100d3eff63a54c892367fb70dec517257a01f8
/frameworks/base/core/java/android/view/View.java
d5483c3157a28e2ebc05a0c918df8a2be0a7fc89 19-Oct-2012 Daniel Sandler <dsandler@android.com> New lockscreen: allow search gesture from nav bar.

Show a lights-out pip if home is invisible but search is
still OK.

Change-Id: Ifc69c12296cc8e8cf7c89dd06173d7abf499a878
/frameworks/base/core/java/android/view/View.java
fcc3348f61b2992f0b84e8e8dcb3535fc715298f 18-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7374285 GridLayout layout param margins are broken in RTL mode

- resolve layout params in ViewGroup when layout direction is changed
- layout param resolution is checking the previous layout direction to
check if we need to resolve

Change-Id: I70af2ad2b4ec83c2ec6c93b3ff445852500d1687
/frameworks/base/core/java/android/view/View.java
78bd9835eb99fd829026a05dc543c6708367ca5b 16-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus drawing does not take into account view's transformation matrix.

1. We are using the view drawing bounds but did not take into account the transformation
matrix. This leads to showing ugly artifacts on the launcher's hotseat which is
pretty much the first thing we see.

2. Updated the documentation of View.getDrawingRect to be more explicit that the
results does not have the transformation matrix applied.

bug:7354033

Change-Id: Ief2e0ea8da05471d71e215ce4497d94ff6e92d1a
/frameworks/base/core/java/android/view/View.java
edc900528937cd03f0d3a94fdf73d019324a2054 15-Oct-2012 Romain Guy <romainguy@google.com> Update javadoc

Some View.post*() methods can be invoked from arbitrary thread
independently of whether the View is attached to a window.

Change-Id: I587b5909ab8b06665978d001548d56c8c22043c1
/frameworks/base/core/java/android/view/View.java
84ebb35f392478600ddf8f08107fb345f13ef91c 12-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7334966 Padding is still broken in RTL languages

- do correct resolution and reset propagation for all RTL properties (padding and drawables included)
- fix CheckedTextView padding too

Change-Id: Ie603683a2324b2a6ef2c03633d01d5726c883b90
/frameworks/base/core/java/android/view/View.java
9aefa1457967b52f1865173aa70896db84f111f1 11-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Send accessibility event for content change upon setting content description." into jb-mr1-dev
b708f7703b98e14f01311dbc93e2636abe4790c9 11-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Send accessibility event for content change upon setting content description.

1. Since the content description is generated dynamically we need to notify
clients when it changes so they can drop cached state to get the most
recent content. This really is used by the caching we do to optimize
the window query APIs. Otherwise, the user does not see the current
content.

bug:7327556

Change-Id: I9be46508e86864566e027c64565eb1d787ec9363
/frameworks/base/core/java/android/view/View.java
2918ab6c3258639148b8a5c78a34483af195246e 11-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7326778 Rename LayoutParams.onResolveLayoutDirection(int)

- rename to LayoutParams.resolveLayoutDirection(int)
- upate 17.txt too

Change-Id: I54fe28dc47cfdb65ef0b5b0244dabbe1d675c781
/frameworks/base/core/java/android/view/View.java
96985fccdcff69c8410caee23aa088cbd8af34b6 10-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Return true on successful accessiblity action click/long click.

1. If a view is clickable or long clickable perfroming the corresponding
accessiblity action should return true no matter whether there is a
registered on click/long click listener. Currently true is returned
only if there is a listener but it is also possible that a sub-class
overrides performClick and does work there. For example CompoundButton.
Now if the view is clickable or long clickable we will call the
perfrom* method and return true, which is we clicked.

2. Fixed some JavaDoc indentation.

bug:7318777

Change-Id: Id603fee378b8f7d07f1128b5641ede57640bab53
/frameworks/base/core/java/android/view/View.java
dfab363807b3b44be4032e410f016e0a0d018426 03-Oct-2012 Romain Guy <romainguy@google.com> Fix rendering artifacts on tiled renderers
Bug #7275145

This change fixes ViewRoot and adds extra debug information. It does
not solve the problem entirely. Another CL will.

Change-Id: I7e604ba38aad7f421769783dcbd998d6905ab2d9
/frameworks/base/core/java/android/view/View.java
acb1c124aca178b6231bf3029745e20fffdf2020 02-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7266459 android.widget.cts.TableLayoutTest#testColumnStretchableEffect failures on JO

- do not ask for requestLayout() nor invalidate() in View.onMeasure() when
resolving RTL properties

Change-Id: I7961fcb4c046d96391a4e748350573534481ae2b
/frameworks/base/core/java/android/view/View.java
a85236e510b26002761bd5856fb371f7aed37527 02-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus should not scroll automatically.

1. We use auto scroll when a view gets accessibility focus.
Pros: Having magnification and TalkBack enabled together (not a common use case)
will have the accessibility focused view on the screen (it is auto panned).
Cons: A blind user can get stuck in a very lock scroll view - not good.

2. We do not auto scroll when a view gets accessibility focus.
Pros: A blind user cannot get stuck in a long scroll view as he has to explicitly
scroll.
Cons: The magnified area will not pan to ensure the accessibility focused view
is visible.

Option one is the better trade off and this change removes the auto scrolling.

bug:7265773

Change-Id: I209b54ed18acad36c1f35b4c09b980e45ec9bbff
/frameworks/base/core/java/android/view/View.java
efe9b483547ac44dbc88bdfd6a54be5c95c2d889 02-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #7259242 text is left justified with no padding" into jb-mr1-dev
6e6d78116b584272aeda6924d1802ba18d4b8758 02-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7259242 text is left justified with no padding

(padding is still hard)

- fix Toasts: basically the background drawable padding was not
taken into account

Change-Id: Iefd29782f50b6f6a56578cfeb2af119d381207f0
/frameworks/base/core/java/android/view/View.java
946d05b95f849684b709a3750ef189388d6dc5a9 02-Oct-2012 Adam Powell <adamp@google.com> DO NOT MERGE - Revert fixes for ImageView/MeasureSpec/RelativeLayout

MeasureSpec.makeMeasureSpec has a bug where a negative or very large
size parameter will cause the resulting MeasureSpec value to
overflow. RelativeLayout partially relies on this when measuring
children with mode UNSPECIFIED; a default value of -1 in a local
variable ends up being passed to makeMeasureSpec, overflowing a mode
value to create a measurespec that is very large in size, with AT_MOST
as the mode. The correct behavior is for RelativeLayout to propagate
the UNSPECIFIED mode.

Unfortunately a number of custom view implementations in apps rely on
the buggy behavior as they do not implement their own onMeasure
method. This makes them fall back to View's default onMeasure
implementation, which accepts the spec's size unconditionally for
AT_MOST or EXACTLY modes, but falls back on
getSuggestedMinimum[Width|Height] for UNSPECIFIED. If the view had no
background drawable with dimensions and no minWidth field set, this
fix for RelativeLayout causes some views to measure with a size of 0
rather than a size of the 30-bit version of 0xFF...

Revert these fixes in the interests of compatibility. The next version
will conditionally use the new behavior if targetSdk > JB-MR1.

This also required reverting a fix for ImageView's adjustViewBounds
functionality, as it cannot be implemented reliably if this
RelativeLayout fix is not also in place.

Revert "Fix UNSPECIFIED measurement in RelativeLayout"

This reverts commit 132a742b94b9716451ddef30cec20548b346f1b9.

Revert "Fix adjustViewBounds handling for ImageView"

This reverts commit d5edc7721791ad807b9a8fbd923b8d6e73c399cc.
/frameworks/base/core/java/android/view/View.java
80766f1bdf19493bcbd4eae95fcea393c0b7f7ac 01-Oct-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7259242 text is left justified with no padding

(padding is hard)

- set correct values to mUserPaddingLeftInitial / mUserPaddingRightInitial
- reset padding to initial values depending on layout direction

Change-Id: I5cfb941b4874eafbfcfb5e2926f5a3c80b4931d3
/frameworks/base/core/java/android/view/View.java
6a2d17f71342f981c9df1dc5beff33e30eb3ae2b 30-Sep-2012 Chet Haase <chet@google.com> Fix texture corruption

When memory gets low on a device, activities flush everything they can.
Hardware-accelerated activites, such as Launcher, flush GL resources and destroy
the GL context. However, some resources were still hanging around, due to deferred
destruction policies (we don't delete layers until the DisplayLists they are in
are finalized, to ensure we don't deref deleted objects). This meant that we were
referring to obsolete GL data in these objects. in particular, it meant that we might
come around later, after a new GL context was created, and delete a texture object
that was incorrect. We use the layer's "texture id" to refer to the texture underlying the
layer. But if there's a new GL context, then this texture ID is no longer valid, and
we may be deleting the texture that a different object (layer, icon, whatever) is referring
to, because the driver may return that same ID under the new GL context.

The fix is to more aggressively delete things that we know will not be used again
when the GL context is destroyed. In particular, we delete all resources being used
by all DisplayLists at GL context destruction time.

Issue #7195815 Textures corruption on all devices, in many apps

Change-Id: I52d2d208173690dbb794a83402d38f14ea4c6c22
/frameworks/base/core/java/android/view/View.java
10c84edcfa674f13d798f4de65f95c76269c6191 30-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #7199562 UI mirroring for RTL locales (Arabic, Hebrew, Farsi): Play settings" into jb-mr1-dev
8ed6b6a96bf887e0b49c48838a9f22bb0f256296 30-Sep-2012 Romain Guy <romainguy@google.com> Merge "Perform a long computation to catch bitmap sizes > 32 bits Bug #7257930" into jb-mr1-dev
af61cc4cbb307dc3b9cb6f4aa232a0257157c9d2 30-Sep-2012 Romain Guy <romainguy@google.com> Perform a long computation to catch bitmap sizes > 32 bits
Bug #7257930

Change-Id: I28d08024fabe8103251d480524b0b0f2fd2d2aba
/frameworks/base/core/java/android/view/View.java
47fb191841c50f45f39c5fcce3554e4990188583 29-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7199562 UI mirroring for RTL locales (Arabic, Hebrew, Farsi): Play settings

- do not need those variables. Use what we already have in View.
- reset padding to initial values before changing it.

Change-Id: Ib396b3dca6e98a94d83a538a9b594b5eb426c453
/frameworks/base/core/java/android/view/View.java
f2e5cf487e9bda4da1b902cb5c816ba48c9b7004 30-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #6427629 Clean up layout direction APIs" into jb-mr1-dev
343e11345ed496003f605e1b3bba5850d3e6cf0e 29-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6427629 Clean up layout direction APIs

- remove onPaddingChanged(int) and fold it into onRtlPropertiesChanged(int)

Change-Id: I1d7f02d2b4538c6c991bd4285501bbc73e6aa5c3
/frameworks/base/core/java/android/view/View.java
d5edc7721791ad807b9a8fbd923b8d6e73c399cc 27-Sep-2012 Adam Powell <adamp@google.com> Fix adjustViewBounds handling for ImageView

When computing the adjusted view bounds, don't constrain the
dimensions by the original estimate if the opposite dimension has a
fixed size. This can result in the view never getting properly
enlarged.

Also fix a long-standing bug in MeasureSpec.makeMeasureSpec where
oversized or negative values could result in broken packed values.

Bug 7240251

Change-Id: I359d108ff52b6f3b5c4bf393d2271d28999c0127
/frameworks/base/core/java/android/view/View.java
669aa7cb35e0d32fbf6f26a44e5ab8f6fae37de9 28-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Other improvements for bug #6427629 Clean up layout direction APIs" into jb-mr1-dev
75aefb8fe8d3b1fd6664f73273ad18d0236d4e82 28-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7249363 Icons in the Camera UI (to switch camera types and on the focus ring) are missing

- no need to initialize mPaddingLeft/Right to UNDEFINED_PADDING

Change-Id: Icfdcc9bcb904228443e9adfde8038b5d8764365b
/frameworks/base/core/java/android/view/View.java
9a04856d5ecb07dea564feae2942fd485b53f3dd 26-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Other improvements for bug #6427629 Clean up layout direction APIs

- hide isLayoutRtl() from public API

- canResolveXXX() is now smarter: use recursion to get its returned value

- in ViewGroup, if resolution cannot be done then dont ask resolution for
its children

- in ViewGroup, addViewInner() needs to ask to resolve the child. This is
needed for example by ListView which is using the same measurespec before
and after its childs being attached.

It also take care of the general case where a measure pass is done when not
attached to a parent (and thus asking for resolution that will "fail" if we
are using IHNERIT) and never done again. That would lead to never do a
resolution.

- some code refactoring

Change-Id: I120dd2fef7397944f5ba8deff0686b108dc827d2
/frameworks/base/core/java/android/view/View.java
bbd1029b702ea56804101ece9acd455282174293 27-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7241988 Padding is mostly set to "0"

- make RTL compatibility mode more straighforward. Done only in constructor
and resolved() is only done for real RTL case.

- fix also issue concerning needRtlPropertiesResolution(): we were missing
padding and drawables bits.

Change-Id: Ic0569f7542a0d66244e8c4bd35ae85949e39c559
/frameworks/base/core/java/android/view/View.java
fea9df6386d66089b004719f194625e159bb344a 26-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #6427629 Clean up layout direction APIs" into jb-mr1-dev
989ae759f8037fc5427ce8c289a3f49151080df4 26-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing argument expectations of View.requestRectangleOnScreen

1. In a previous patch the implementation of the method was fixed
in terms of end result but this broke some assumptions about the
method arguments. This change updates the argument expectations.

bug:7172035

Change-Id: I76d738b1c74dfb1dd45fc667f3217911f1c10a5f
/frameworks/base/core/java/android/view/View.java
1f88ba8bf67bb9264e39547ab1201aa3c5395d0e 24-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6427629 Clean up layout direction APIs

- getLayoutDirection() / getTextDirection() / getTextAligment() dont do resolution
- resolution done into onMeasure()
- use XX_RESOLVED bits to check if resolution needs to be done
- code formatting

Change-Id: Ie46a5535860e90f3449b96cfe0aa04dd7e3006d7
/frameworks/base/core/java/android/view/View.java
f7a3e979a7ab3be4715408b6328f27e56a7c9326 24-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #6427629 Clean up layout direction APIs" into jb-mr1-dev
1a7d487380460b4aea37140baf6bf4bf7f92f8a5 24-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6427629 Clean up layout direction APIs

- rename getResolvedTextAlignment() to getTextAlignment()

Change-Id: I6a2b6c9ec4f5cea1adde46e35d5f3c49880791ee
/frameworks/base/core/java/android/view/View.java
be4c5dd9d0b3ec1e020431f0e618a4cf38f9c57d 24-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #6427629 Clean up layout direction APIs" into jb-mr1-dev
97e146cf02f87b91f81c37d53644e5415efddb72 24-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6427629 Clean up layout direction APIs

- rename getResolvedTextDirection() to getTextDirection()

Change-Id: Id2a6025daf5521dcd676e454fc6bb9955fdccf2d
/frameworks/base/core/java/android/view/View.java
239e430578fd2d3bd38a646595a82bca95359bd7 24-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #6427629 Clean up layout direction APIs" into jb-mr1-dev
e3f2ac9e526e5b4de4d2ae113e644c1cb14b1ce6 24-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #6427629 Clean up layout direction APIs" into jb-mr1-dev
e56ffdc7b31b0937628609cc3bbaa15879023569 23-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6427629 Clean up layout direction APIs

- rename getResolvedLayoutDirection() to getLayoutDirection()

Change-Id: I3afe56c0db0751952f5056c23893cb7455531d29
/frameworks/base/core/java/android/view/View.java
4457e85a7090ad51726d50a4daf981d917cceedd 19-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6427629 Clean up layout direction APIs

- canResolveXxx() should be hidden
- resetResolvedXxx() should be hidden
- resolveDrawables(), resolveLayoutDirection(), resolvePadding(), resolveTextAlignment(), resolveTextDirection() should be hidden
- onResolvedXxx() should be merged into one callback
- fix also an issue with setting the layout direction of the drawable in ImageView
- fix also an issue with checking if TextAlignment can be resolved

Change-Id: I1402269ddf8632525f5550f80e5610e1a7b4034d
/frameworks/base/core/java/android/view/View.java
11cb642756093a4af901b1525375b1eb2b5c3e2b 21-Sep-2012 Romain Guy <romainguy@google.com> Update layers in a single batch at the beginning of a frame
Bug #7186819

Change-Id: Ice5926dfedfb3be3a3064e65008dafa2852407da
/frameworks/base/core/java/android/view/View.java
3e27c34e0ef0563be9ee14ca9fc80cf6adabdd70 21-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7205072 Text inside popup window is too close to the edge

- if targetSDK is pre JB-MR1 then we really need to use the User padding
when it is defined and valid

Change-Id: If416fbc181b8784de446e9171529147ab03c9373
/frameworks/base/core/java/android/view/View.java
36901b6c6029b561b4600916cbacc57d4e933703 20-Sep-2012 Jeff Sharkey <jsharkey@android.com> Move HAS_TRANSIENT_STATE flag into a safe area.

Previously, this flag conflicted with other text direction flags,
which can cause weird interactions across the View hierarchy,
specifically with ListView.

Also adds dumpFlags() utility to dump values of all know flags for
documentation and sanity checking.

Bug: 7189738
Change-Id: Iceb2f93f68a800e19a5889ced93abcce4932b067
/frameworks/base/core/java/android/view/View.java
072533e934e759b95228ba61152e7d958b641b96 19-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #7146516 Padding can be "over" resolved" into jb-mr1-dev
efa568525fc7755ac49e44e75246b2be1ef5269f 19-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix some typos in Javadoc for Accessibility APIs" into jb-mr1-dev
69542e48c3ee35f116431c2eb64a8db3073c9f8e 19-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix some typos in Javadoc for Accessibility APIs

Change-Id: Ie3ca20e1c3bb11fb59bd7dcaed9ea92be320b3eb
/frameworks/base/core/java/android/view/View.java
9ffc6047f14883f853b643a2913bd590995b9031 19-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #7173155 API REVIEW: android.view.View" into jb-mr1-dev
c11f77fbae8391ca3c2d3ec93d024cba0be5cf55 19-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7173155 API REVIEW: android.view.View

- remove getFocusRect(Rect) as it was redundant
- fix Javadoc

Change-Id: I3784c4b0a38770cba5d3ba09196f9271050a3c20
/frameworks/base/core/java/android/view/View.java
20586fa0353f63453766140b32a4778793ce2b43 18-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #7173351 API REVIEW: android.util.LocaleUtil" into jb-mr1-dev
dbed514e137de66d19050b72ad941a687e13c9d4 18-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #7172699" into jb-mr1-dev
d3d9f3f1004dfee2649a26cfe8dba948cd364904 18-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7173351 API REVIEW: android.util.LocaleUtil

Change-Id: I08fd491eff714059e9ec874fadebe7eb556c34d5
/frameworks/base/core/java/android/view/View.java
49b0a9b4705d869f05a57ed3acf42ba5652294b2 18-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7172699

- remove @link as we are already using a @see which is doing a link by itself

Change-Id: I6ff6979bb2d960c3c980cdf0a88885b92e80fd7f
/frameworks/base/core/java/android/view/View.java
603f6de35f21d74ae242d52d501f4f5c25ff4f4c 15-Sep-2012 Chet Haase <chet@google.com> Fix occasional crash bug with layers

Launcher occasionally crashes with a stack trace indicating that the memory
of a Layer object is corrupt. It is possible for us to delete a Layer
structure and then, briefly, use it to draw a DisplayList again before
that DisplayList gets recreated (without the layer that got deleted).

When this happens, if the memory got corrupted, it's possible to crash.

The fix is to add Layer to the other objects which we currently refcount
(bitmaps, shaders, etc.). Then instead of deleting a Layer, we decrement the
refcount. We increment when creating it, then increment it again when it's
referenced from a DisplayList. Then we decrement the refcount instead of
deleting it, and decrement when we clear a DisplayList that refers to it.
Then when the refcount reaches 0, we delete it.

Issue #6994632 Native crash in launcher when trying to launch all apps screen

Change-Id: I0627be8d49bb2f9ba8d158a84b764bb4e7df934c
/frameworks/base/core/java/android/view/View.java
33aef98fd28dcac0a2ad37e7329afd3e666f5e0a 13-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Allowing association between a view and its label for accessibility.

1. For accessibility purposes it is important to be able to associate
a view with content with a view that labels it. For example, if
an accessibility service knows that a TextView is associated with
an EditText, it can provide much richer feedback.

This change adds APIs for setting a view to be the label for another
one and setting the label for a view, i.e. the reverse association.

bug:5016937

Change-Id: I7b837265c5ed9302e3ce352396dc6e88413038b5
/frameworks/base/core/java/android/view/View.java
7eac0f557cd87486d0f10b7c72e25aeb195a4351 13-Sep-2012 Craig Mautner <cmautner@google.com> Propagate systemUiVisibility changes to window manager

The mAttachInfo.mSystemUiVisibility value was changing in
View.dispatchAttachedToWindow but
mAttachInfo.mRecomputeGlobalAttributes was not being set.
Consequently ViewRootImpl.collectViewAttributes was returning
without updating the subtreeSystemUiVisibility. This is fixed
by calling needGlobalAttributesUpdate in dispatchAttachedToWindow.

WIthin ViewRootImpl.collectViewAttributes the assignment to
subtreeSystemUiVisibility was only being made if
mAttachInfo.mSystemUiVisibility was changed within
collectViewAttributes. But mAttachInfo.mSystemUiVisibility
was changing outside of collectViewAttributes in
dispatchAttachedToWindow. Consequently subtreeSystemUiVisibility
was never updated. By looking for a mismatch between
subtreeSystemUiVisibility and mSystemUiVisibility
subtreeSystemUiVisibility gets assigned whenever it is out of
sync.

Fixes bug 7091817.

Change-Id: I1e97a7dec14dc9594876175ae26370fb9030a8a6
/frameworks/base/core/java/android/view/View.java
7e7786a4d11351519d8047cd60f59a43d460ee9e 11-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7146516 Padding can be "over" resolved

- need to cache the initial User padding and use it for restoring
to the initial state of padding before doing padding resolution

Change-Id: I4efdaea7ba21930537bf5032e80e70d70bf38b5b
/frameworks/base/core/java/android/view/View.java
ee6c6ae5b2111bbb602dbc8030ba3c8eb014cc6e 11-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing implementation of View.requestRectangleOnScreen(Rect, boolean).

1. The implementation was not taking into account the transformation
matrices if the views.

2. The rectangle that was passed as an argument to
ViewParent.requestChildRectangleOnScreen was modified by
some implementations - now care is taken to prevent it.

3. The scroll of child was used when a rectangle of its coordinate
system was mapped to one in the parent system. However, the
scroll shows how much a parent has scrolled its descendants, so
the scroll of the parent has to be used not the child.

bug:7139556

Change-Id: I5b09eb7f105047e95282f74308968d5465831c84
/frameworks/base/core/java/android/view/View.java
d15ebf25c595b855f6978d0600218e3ea5f31e92 05-Sep-2012 Chet Haase <chet@google.com> Enable changing properties of layer paint

Previously, to draw a layered view with a changed Paint object for the
drawLayer operation, you'd have to invalidate the parent view, to get the
native DisplayList to pick up the new Paint properties. This change adds
API and functionality so that the developer can call setLayerPaint(), which
does the proper invalidation (lightweight, doesn't cause redrawing the view).

Issue #6923810 Make it easy to efficiently animate a layer's Paint

Change-Id: I7fea79788d50f6d9c86dd5e5b2a4490cb95142bb
/frameworks/base/core/java/android/view/View.java
6543c292b2d1cb3547f4565f89b7cb649ad955d6 07-Sep-2012 Romain Guy <romainguy@google.com> Merge "The drawables cache strikes again Bug #7117785" into jb-mr1-dev
f6aa537c2dddfa9c68af161c082b5d4f316bd068 07-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Make ProgressBar / SeekBar / RatingBar widgets aware of layout direction" into jb-mr1-dev
3540f1f28be473d066bf79956e6b3184c85b32b5 07-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Granular navigation uses mContentDescription instead of getCpontentDescription()s" into jb-mr1-dev
05282aa43eec80485fea126afd901f7009433adb 07-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Granular navigation uses mContentDescription instead of getCpontentDescription()s

1. Getting the value of the content description via the method since
there is nothing preventing developers to override the method to
return a desired value (they should not do that but it is feasible).

bug:7079008

Change-Id: Iaf5848e9b065454ebfefccf685415fbf034ae475
/frameworks/base/core/java/android/view/View.java
1cf70bbf96930662cab0e699d70b62865766ff52 06-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Screen magnification - feature - framework.

This change is the initial check in of the screen magnification
feature. This feature enables magnification of the screen via
global gestures (assuming it has been enabled from settings)
to allow a low vision user to efficiently use an Android device.

Interaction model:

1. Triple tap toggles permanent screen magnification which is magnifying
the area around the location of the triple tap. One can think of the
location of the triple tap as the center of the magnified viewport.
For example, a triple tap when not magnified would magnify the screen
and leave it in a magnified state. A triple tapping when magnified would
clear magnification and leave the screen in a not magnified state.

2. Triple tap and hold would magnify the screen if not magnified and enable
viewport dragging mode until the finger goes up. One can think of this
mode as a way to move the magnified viewport since the area around the
moving finger will be magnified to fit the screen. For example, if the
screen was not magnified and the user triple taps and holds the screen
would magnify and the viewport will follow the user's finger. When the
finger goes up the screen will clear zoom out. If the same user interaction
is performed when the screen is magnified, the viewport movement will
be the same but when the finger goes up the screen will stay magnified.
In other words, the initial magnified state is sticky.

3. Pinching with any number of additional fingers when viewport dragging
is enabled, i.e. the user triple tapped and holds, would adjust the
magnification scale which will become the current default magnification
scale. The next time the user magnifies the same magnification scale
would be used.

4. When in a permanent magnified state the user can use two or more fingers
to pan the viewport. Note that in this mode the content is panned as
opposed to the viewport dragging mode in which the viewport is moved.

5. When in a permanent magnified state the user can use three or more
fingers to change the magnification scale which will become the current
default magnification scale. The next time the user magnifies the same
magnification scale would be used.

6. The magnification scale will be persisted in settings and in the cloud.

Note: Since two fingers are used to pan the content in a permanently magnified
state no other two finger gestures in touch exploration or applications
will work unless the uses zooms out to normal state where all gestures
works as expected. This is an intentional tradeoff to allow efficient
panning since in a permanently magnified state this would be the dominant
action to be performed.

Design:

1. The window manager exposes APIs for setting accessibility transformation
which is a scale and offsets for X and Y axis. The window manager queries
the window policy for which windows will not be magnified. For example,
the IME windows and the navigation bar are not magnified including windows
that are attached to them.

2. The accessibility features such a screen magnification and touch
exploration are now impemented as a sequence of transformations on the
event stream. The accessibility manager service may request each
of these features or both. The behavior of the features is not changed
based on the fact that another one is enabled.

3. The screen magnifier keeps a viewport of the content that is magnified
which is surrounded by a glow in a magnified state. Interactions outside
of the viewport are delegated directly to the application without
interpretation. For example, a triple tap on the letter 'a' of the IME
would type three letters instead of toggling magnified state. The viewport
is updated on screen rotation and on window transitions. For example,
when the IME pops up the viewport shrinks.

4. The glow around the viewport is implemented as a special type of window
that does not take input focus, cannot be touched, is laid out in the
screen coordiates with width and height matching these of the screen.
When the magnified region changes the root view of the window draws the
hightlight but the size of the window does not change - unless a rotation
happens. All changes in the viewport size or showing or hiding it are
animated.

5. The viewport is encapsulated in a class that knows how to show,
hide, and resize the viewport - potentially animating that.
This class uses the new animation framework for animations.

6. The magnification is handled by a magnification controller that
keeps track of the current trnasformation to be applied to the screen
content and the desired such. If these two are not the same it is
responsibility of the magnification controller to reconcile them by
potentially animating the transition from one to the other.

7. A dipslay content observer wathces for winodw transitions, screen
rotations, and when a rectange on the screen has been reqeusted. This
class is responsible for handling interesting state changes such
as changing the viewport bounds on IME pop up or screen rotation,
panning the content to make a requested rectangle visible on the
screen, etc.

8. To implement viewport updates the window manger was updated with APIs
to watch for window transitions and when a rectangle has been requested
on the screen. These APIs are protected by a signature level permission.
Also a parcelable and poolable window info class has been added with
APIs for getting the window info given the window token. This enables
getting some useful information about a window. There APIs are also
signature protected.

bug:6795382

Change-Id: Iec93da8bf6376beebbd4f5167ab7723dc7d9bd00
/frameworks/base/core/java/android/view/View.java
0af4b8b0c8b038bca9b4f60eb81f71e186f471ce 12-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Make ProgressBar / SeekBar / RatingBar widgets aware of layout direction

- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: I8d76299090abf6b2b187696b1a83e71d7a44b1ce
/frameworks/base/core/java/android/view/View.java
5f49c3023a512efbef8bc9515d310c7a72be4af2 07-Sep-2012 Romain Guy <romainguy@google.com> The drawables cache strikes again
Bug #7117785

Draawables created from the ConstantState cache found in Resources must be
mutated before they can be safely modified by apps. Failure to do so results
in all drawables sharing the same constant state to be affected by the
modification.

In the case of the bugreport above, the status bar code plays tricks with
a background drawable and modifies its color to implement a fade in/out
effect. This drawable comes from a cached resource (color 0x0) and the
modifications made by the status bar apply to other clients of this drawable,
most notably the recents panel.

This change fixes several things:
- Simplifies colors caching by removing the assetCookie from the key. This
should result in better reuse of cached drawables
- Makes View.setBackgroundColor() honor the mutate() contract
- Ensure StateListDrawable properly mutates its children before modifying
them
- Optimize Bitmap/ColorDrawable to mark them mutated when they are not
created from an existing ConstantSate. The same optimization should be
applied to other drawables in the future

Change-Id: I54adb5d5b914c7d8930bf9b46f7e3f9dcbf4bcab
/frameworks/base/core/java/android/view/View.java
3667aa364f6882cc37b46f87c55b7e1230158d1c 06-Sep-2012 Chris Craik <ccraik@google.com> Don't trigger log for empty views

Change-Id: Idb2193d6dd064e5c4af1f02d0df2a83a7db0e0f8
/frameworks/base/core/java/android/view/View.java
10e9d1d7ad6296fca388451c71238cc43fe54756 06-Sep-2012 Chris Craik <ccraik@google.com> Log if a view fails to fit in the drawing cache

Large software layers won't draw if they're larger than the size of the drawing
cache, in which case this log will be triggered.

bug:7078391
Change-Id: Ib42a060b8e3b3642417df9243a086aa15b2989b1
/frameworks/base/core/java/android/view/View.java
fbb4321b94927fd6bd39d327fe56787989b11c71 31-Aug-2012 Romain Guy <romainguy@google.com> Don't quickReject() children if FLAG_CLIP_CHILDREN isn't set

External report: http://code.google.com/p/android/issues/detail?id=36788

Change-Id: Ibdaecf37ab013e30b16e9dc7a6e50156d72c3e4f
/frameworks/base/core/java/android/view/View.java
7808581ca3b462fb187aed6b0d1b86fb83a8a215 30-Aug-2012 Romain Guy <romainguy@google.com> Merge "Pre-multiply color components for 2-stop gradients Bug #7033344" into jb-mr1-dev
d679b57ef279239cf11bb6c9bd14fb99b07971c9 30-Aug-2012 Romain Guy <romainguy@google.com> Pre-multiply color components for 2-stop gradients
Bug #7033344

Change-Id: Ia168501f1dc56ba7a1bb0c55078320432309a66a
/frameworks/base/core/java/android/view/View.java
d5ea3b464795d4e6adbdd174d1bd2f78b628e280 30-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Add initial multi-display support." into jb-mr1-dev
bd6e1500aedc5461e832f69e76341bff0e55fa2b 28-Aug-2012 Jeff Brown <jeffbrown@google.com> Add initial multi-display support.

Split the DisplayManager into two parts. One part is bound
to a Context and takes care of Display compatibility and
caching Display objects on behalf of the Context. The other
part is global and takes care of communicating with the
DisplayManagerService, handling callbacks, and caching
DisplayInfo objects on behalf of the process.

Implemented support for enumerating Displays and getting
callbacks when displays are added, removed or changed.

Elaborated the roles of DisplayManagerService, DisplayAdapter,
and DisplayDevice. We now support having multiple display
adapters registered, each of which can register multiple display
devices and configure them dynamically.

Added an OverlayDisplayAdapter which is used to simulate
secondary displays by means of overlay windows. Different
configurations of overlays can be selected using a new
setting in the Developer Settings panel. The overlays can
be repositioned and resized by the user for convenience.

At the moment, all displays are mirrors of display 0 and
no display transformations are applied. This will be improved
in future patches.

Refactored the way that the window manager creates its threads.
The OverlayDisplayAdapter needs to be able to use hardware
acceleration so it must share the same UI thread as the Keyguard
and window manager policy. We now handle this explicitly as
part of starting up the system server. This puts us in a
better position to consider how we might want to share (or not
share) Loopers among components.

Overlay displays are disabled when in safe mode or in only-core
mode to reduce the number of dependencies started in these modes.

Change-Id: Ic2a661d5448dde01b095ab150697cb6791d69bb5
/frameworks/base/core/java/android/view/View.java
b72fe7a2635906d6244efedfe302c2c46e564803 28-Aug-2012 alanv <alanv@google.com> Don't overwrite accessibility delegates in AbsListView items.

Bug: 6856579
Change-Id: I2963edcefdc0dd5e1413b57858e6f319904a269d
/frameworks/base/core/java/android/view/View.java
98365d7663cbd82979a5700faf0050220b01084d 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Refactor for multi-display support.

Split WindowManagerImpl into two parts, the WindowManager
interface implementation remains where it is but the global
communications with the window manager are now handled by
the WindowManagerGlobal class. This change greatly simplifies
the challenge of having separate WindowManager instances
for each Context.

Removed WindowManagerImpl.getDefault(). This represents the
bulk of this change. Most of the usages of this method were
either to perform global functions (now handled by WindowManagerGlobal)
or to obtain the default display (now handled by DisplayManager).

Explicitly associate each new window with a display and make
the Display object available to the View hierarchy.

Add stubs for some new display manager API features.

Start to split apart the concepts of display id and layer stack.
since they operate at different layers of abstraction.
While it's true that each logical display uniquely corresponds to a
surface flinger layer stack, it is not necessarily the case that
they must use the same ids. Added Display.getLayerStack()
and started using it in places where it was relatively easy to do.

Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
/frameworks/base/core/java/android/view/View.java
4702a856973a553deb82f71b1d3b6c3db5dbf4ba 18-Aug-2012 Dianne Hackborn <hackbod@google.com> More view hierarchy, fragment debugging.

Add a View.toString() method.

Rename all of the View private flags to have a PFLAG prefix to
avoid going insane trying to figure out which constant goes with
which flag.

Activity.dump() now includes a summary of the activity's view
hierarchy, using the View.toString() method.

All exceptions thrown by FragmentManager now perform a dump of
the owning activity state, where appropriate.

Change-Id: I6482e397e10cb5a0612ab02ce6ed5131823437a6
/frameworks/base/core/java/android/view/View.java
23c89fd1685a006957dc0f2aacf167b4449f3d80 13-Aug-2012 Fabrice Di Meglio <fdimeglio@google.com> Improve resolution of RTL related properties

- fix bug #6887370 ListPreference shows misaligned radio drawables (in CheckedTextView?)
- fix bug #6938146 "Show more cards..." text on bottom button is not centered

- also defer scrollbar initialization as we need resolved padding values for them

Change-Id: Ife651ffe6bbcc228ff6724f3d9b91079fac3a740
/frameworks/base/core/java/android/view/View.java
96f1ee9867f966857c2dbd8cdd168d8fcdf72224 08-Aug-2012 Adam Powell <adamp@google.com> Merge "Fix a padding resolution bug for adapter-based views" into jb-mr1-dev
0090f20001470ed078177ccfc1f5e03842258fe1 08-Aug-2012 Adam Powell <adamp@google.com> Fix a padding resolution bug for adapter-based views

If padding has not been resolved by the time measure() is called,
resolve it.

Bug 6938579

Change-Id: Idd3ffa3e4e441cd462d6594b1e20d153d7632994
/frameworks/base/core/java/android/view/View.java
2440e670de0294bdf64592849613db9b8f00ee11 07-Aug-2012 Romain Guy <romainguy@google.com> Catch padding changes in ViewGroup to properly clip children
Bug #6886339

RTL support introduced a new way to handle padding which broke
existing behavior in ViewGroup.setPadding(). The new code path
was not notifying ViewGroup which would prevent it from setting
a flag used to clip children.

Change-Id: I584143714cb81fd664b4ecd9fb51d56bae04ba05
/frameworks/base/core/java/android/view/View.java
dde331cebd87982faded6818ad5f9927ff994c96 03-Aug-2012 Dianne Hackborn <hackbod@google.com> We can now (kind-of) change screen density on the fly.

Preloaded drawables now have a density associated with them, so we
can load the correct drawable if we are using a different density.

Window manager now formally keeps track of the density for each
screen, allowing it to be overridden like you can already do with
size, and relies on this density to drive itself internally and
the configurations it reports.

There are a new set of Bitmap constructors where you provide a
DisplayMetrics so they can be constructed with the correct density.
(This will be for when you can have different windows in the same
app running at different densities.)

ActivityThread now watches for density changes, and pushes them
to the DENSITY_DEVICE and Bitmap global density values for that
process.

A new am command allows you to change the density.
/frameworks/base/core/java/android/view/View.java
ddd88726a247e4100cb62b3dc9d0887ca2ae2ec4 26-Jul-2012 Jeff Smith <whydoubt@yahoo.com> am 71930dd7: am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214

* commit '71930dd77e4dc6f6be5c648019d2ab0da5f0584c':
Fix several cases of broken droiddoc syntax external issue 35214
71930dd77e4dc6f6be5c648019d2ab0da5f0584c 25-Jul-2012 Jeff Smith <whydoubt@yahoo.com> am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214

* commit 'a45746efadd11bb7dfab026fb3c81a25fae74ca4':
Fix several cases of broken droiddoc syntax external issue 35214
a45746efadd11bb7dfab026fb3c81a25fae74ca4 19-Jul-2012 Jeff Smith <whydoubt@yahoo.com> Fix several cases of broken droiddoc syntax
external issue 35214

patch contributed by Jeff Smith <whydoubt@yahoo.com>

Change-Id: I70dcee88a140699bf3e1ab369bed6dcd2fdd3d83
/frameworks/base/core/java/android/view/View.java
599913d6e8e610665fad7edd7dfbd3cd48758b3a 24-Jul-2012 Chet Haase <chet@google.com> Account for static child transformations correctly

Optimizations in drawing and invalidation in JB did not correctly
account for static child transforms
(View.getChildStaticTransformation()).
For the invalidation part, this meant that views were not properly
setting the invalidation bounds (which should be transformed by
the static transform), so the affected area of the invalidation
was potentially incorrect. For the drawing part, this meant that
views outside of their parent's bounds were being incorrectly
rejected when the static transform would, in fact, place the views
inside of those bounds.

The fix is in two parts:
- drawing: avoid the early quickReject() logic for containers that
have static transformations set on them
(ViewGroup.setStaticTransformationsEnabled()).
- invalidation: Include the static transform in the invalidation
area propagated up the view hierarchy.

Issue #6864203 The child position outside of parent is not drawn
even it will be drawn inside of the parent after applying static
transformation

Change-Id: I73bea01feab250bdcae2d575313be355a4a3c8f5
/frameworks/base/core/java/android/view/View.java
34caec99407570766d27106f73668802150e7357 20-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Views with node providers are important for accessibility in auto mode.

1. If a view's important for accessibility attribute is set to auto the
framework is responsible to determine if it really is. Views with
accessibility node providers should be important for accessibilty
since they are roots of virtual view trees and such trees are
always important.

bug:6843043

Change-Id: I4b352c59fdefdf9ad220714a43ecb9e01d1c1c1f
/frameworks/base/core/java/android/view/View.java
016456e4327fdd501afafc1958653bdbc4fe7af5 18-Jul-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix padding resolution

Change-Id: I2181a0a4057be0d20744b1512dbc1fbc53490d81
/frameworks/base/core/java/android/view/View.java
a9108a217e039492855fbeacda2ab6c4f4a3f70a 18-Jul-2012 Adam Powell <adamp@google.com> Add View#generateViewId; make RadioGroup use it

Bug 6448164

generateViewId provides a way for applications to generate opaque ID
values suitable for use with View#setId that will not collide with
values generated by aapt for R.id.

Fix a bug where RadioGroup assumes object hash codes will always be
positive.

Change-Id: I3e2870cd672d6061bb465128f428c81aeef0c44b
/frameworks/base/core/java/android/view/View.java
c9c9a48e7bafae63cb35a9aa69255e80aba83988 16-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing a workaround for incorrect window position on window move.

1. The window manager was not notifying a window when the latter
has been moved. This was causing incorrect coordinates of the
nodes reported to accessibility services. To workaround that
we have carried the correct window location when making a
call from the accessibility layer into a window. Now the
window manager notifies the window when it is moved and the
workaround is no longer needed. This change takes it out.

2. The left and right in the attach info were not updated properly
after a report that the window has moved.

3. The accessibility manager service was calling directly methods
on the window manager service without going through the interface
of the latter. This leads to unnecessary coupling and in the
long rung increases system complexity and reduces maintability.

bug:6623031

Change-Id: Iacb734b1bf337a47fad02c827ece45bb2f53a79d
/frameworks/base/core/java/android/view/View.java
87e8b25ea3c95be5921a79c65fbf4060de2e2e84 13-Jul-2012 Chet Haase <chet@google.com> Merge "Remove redundant computeScroll() call for hw-accelerated views"
401b1f85746ab7005907747a59534def967d825b 13-Jul-2012 Romain Guy <romainguy@google.com> Merge "Remove obsolete optimization"
f877308f77f7c6f3edd91618a092207dd3be9077 13-Jul-2012 Romain Guy <romainguy@google.com> Remove obsolete optimization

Change-Id: I2d43c009c62a7f4a4a2e0a6303bdfa692c4b8c8c
/frameworks/base/core/java/android/view/View.java
526057bc77150e608666bbc80a0c9626254650a0 13-Jul-2012 Chet Haase <chet@google.com> Remove redundant computeScroll() call for hw-accelerated views

View.draw() calls computeScroll() to initialize scrolling values correctly.
But getDisplayList() also calls computeScroll() for the same reason, resulting
in 2 calls to that method for hw-accelerated views.
Fix: avoid calling computeScroll() in View.draw() for views with display lists.

Change-Id: I57a3862e2d554752cd0fdb862513cbb3dfb3105c
/frameworks/base/core/java/android/view/View.java
f0af1d5cb255f136d2fff773be7518ffd7ae3b93 12-Jul-2012 Romain Guy <romainguy@google.com> Remove unused View.flushLayer() API

Change-Id: I5d4c7388afb5265964ab6b769cc0abfee9745c84
/frameworks/base/core/java/android/view/View.java
7d3082a3f09e32e7c42b2896e90902157039b10e 12-Jul-2012 Romain Guy <romainguy@google.com> Update View's opacity when changing the background color

Change-Id: Ib5851d47918c99d4906055a9d0245ea100aee231
/frameworks/base/core/java/android/view/View.java
4c9dfc4da992f67a86209d8b2b8539d697373ad6 12-Jul-2012 Romain Guy <romainguy@google.com> Merge "Update layers' opaque property when needed"
846a533945576e5cb1a66529ca3a52d71749f04f 12-Jul-2012 Romain Guy <romainguy@google.com> Update layers' opaque property when needed

Before this change, changing a View's opacity would not be reflected
by hardware layers. This could cause layers to retain their previous
opacity.

Change-Id: Iba2c8b4242deca021651df9324cc7c585a64653d
/frameworks/base/core/java/android/view/View.java
fbf885b652272013f44da71e9f77923333bf62eb 10-Jul-2012 Craig Mautner <cmautner@google.com> Merge "Notify client side of window movement."
905bd369510838b35db61c30d6b8e2c5f564be6a 10-Jul-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Make ScrollBar widget aware of layout direction"
55aeca913f17e5cb9ab07ef79b0b01377ae88cbd 10-Jul-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Improve resolution of inherited layout direction"
fd8d9c4c0a3930c9b2585cd54ea4288fbb15cceb 10-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfo bounds in screen incorrect if application scale not one V2.0.

1. If the application does not accommodate different screen density the
system applies an application scale equal to the device density over
the a default density. The AccessibilityNodeInfo coordinates were not
reported after applying the compatibility scale, therefore the bounds
in parent and screen were not as perceived by the user.

bug:6764586

Change-Id: Id9de3de885210d0725d1f3fde38e769b0cfd12a7
/frameworks/base/core/java/android/view/View.java
9dc2cc53ac332d73376f64cc8e7c713762d74bdd 04-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "AccessibilityNodeInfo bounds in screen incorrect if application scale not one."
983119ab22a18c743e4084dff27f35e3f490dd34 04-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfo bounds in screen incorrect if application scale not one.

1. If the application does not accommodate different screen density the
system applies an application scale equal to the device density over
the a default density. The AccessibilityNodeInfo coordinates were not
reported after applying the compatibility scale, therefore the bounds
in parent and screen were not as perceived by the user.

bug:6764586

Change-Id: Iae2d6ea81049364194c7cb09df2240b5eda3d939
/frameworks/base/core/java/android/view/View.java
a0fd78897c532246e0da3819bcfcb66299076084 03-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Remove the accessibility focus search code."
7a82b2be0674cc9c925c6892aa8a534896e277f9 03-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> AnnounceForAccessibility is broken for any view that has a ContentDescription.

1. The purpose of the View#announceForAccessibility method is to
give a message to the user that is not related to a predefined
view state change. The current implementation is grabbing the
source view's content description which in general overrides
the event text which defeats the purpose of the announcement.

bug:6721440

Change-Id: I8814914bea38c5f4c04f57391a64cf2bb06cb975
/frameworks/base/core/java/android/view/View.java
27e2da7c171afa39358bbead18fbe3e6b8ea6637 03-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Remove the accessibility focus search code.

1. In JellyBean we have added some APIs to search for next accessibility
focus in various directions and set accessibility focus from hover.
However, we have decided that there is not clean answer for how this
should behave and the APIs were hidden. Now the accessibility service
is responsible for that. The unused code is now taken out.

2. This patch also takes out the hidden attribute accessibiligyFocusable
since we moved the responsibility for implementing focus search strategy
to accessibility services and we did not need that for Jellybean which
is a good sign that this is not needed. I general this is one less thing
for an app developer to worry about. We can add this if needed later.

bug:6773816

Change-Id: I0c858d72c93a2b7ff1f8f35a08d33ec4b9eb85fd
/frameworks/base/core/java/android/view/View.java
5702d4dfb5b81491f873a3617f8d8fc8dc5279e6 30-Jun-2012 Craig Mautner <cmautner@google.com> Notify client side of window movement.

Add a one way method to notify Views that the window has moved
on the screen. Fixes issues arising from the IME popping up and
translating the window that uses it. Accessibility was left unaware
of these movements and was drawing the box around the wrong widgets.
Similarly PopupWindow used getLocationOnScreen to determine how
much screen real estate was above and below the anchor point to
determine where to put an anchored window.

Fixes bug 6623031.

Change-Id: I4731a94d5424c1ec77bf1729fba8fc9ea34cae46
/frameworks/base/core/java/android/view/View.java
ba64974141bb04d35759c7a8f1741d23c172f9a5 29-Jun-2012 Michael Jurka <mikejurka@google.com> Removing setChildrenLayersEnabled

Change-Id: I88d8228eadb59160648f2c4e131fcd85945f2109
/frameworks/base/core/java/android/view/View.java
b93911f2e05450de86aa0075144750bc31f499c2 27-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Improve resolution of inherited layout direction

allow to resolve it even more lazily: if resolution is asked then do it
only if possible (the View needs to have a parent that can also do its
resolution)

Change-Id: I8e808f0ef392521e59b27b82f86e9058f20af9ba
/frameworks/base/core/java/android/view/View.java
41e6e0c49f51e5bafca4912d407202f572d4e208 23-Jun-2012 Jean-Baptiste Queru <jbq@google.com> am c34188a9: resolved conflicts for merge of f8f76d52 to jb-dev-plus-aosp

* commit 'c34188a95405526416325604386af4f48ba20918':
Add the possibility to modify the View focus rect
c34188a95405526416325604386af4f48ba20918 23-Jun-2012 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of f8f76d52 to jb-dev-plus-aosp

Change-Id: I83beeb45320de2c3fc3a00c2f5cd86a17ac1dc9f
c91b6ca442cc4573a314c78864d1e5a3e1f27ac6 22-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Make ScrollBar widget aware of layout direction

- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)
- also use isLayoutRtl() for being more concise

Change-Id: Ibf861333effdc646398fcd9354d96f2156550607
/frameworks/base/core/java/android/view/View.java
c32b2091d6441e7709342ca62f0976fc4a0367e4 18-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> am 45c4a8df: am ec7c7ebf: Merge "API for finding accessibility focus in virtual tree not needed." into jb-dev

* commit '45c4a8df9487f53af37ded1f5a1ebe500e89b493':
API for finding accessibility focus in virtual tree not needed.
041982bf50b3ce4a26170c52c732f328f519f650 18-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> am 11832db4: am 531d5866: Merge "Accessibility focus search and setting it from hover are performed by the client." into jb-dev

* commit '11832db437d04d71dec9a78382138b2dd6518e37':
Accessibility focus search and setting it from hover are performed by the client.
45a02e0809c14a52aa24658666df0d41ce661857 18-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> API for finding accessibility focus in virtual tree not needed.

1. The function for finding where the accessibility focus in a virtual
node tree presented by an AccessibilityNodeProvider is not needed
API since the framework already keeps track of the accessibility
focused virtual node in order to draw the focus rectangle. This API
adds unnecessary complexity to developers of AccessibilityNodeProviders.

bug:6675330

Change-Id: I84774686b06a995073a39e45b8ef22f2cd04b773
/frameworks/base/core/java/android/view/View.java
8ffe8b304e4778b3c95e57ad5a77cd41c9cf9f7b 15-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus search and setting it from hover are performed by the client.

1. Currently we are providing accessibility focus search algorithm in the
framework and we are also setting accessibility focus from hover. It
appears that implementing a focus search strategy that works for all
accessibility services is non trivial task if feasible. Based on
feedback from the developers of two such services at Google - TalkBack
and BarilleBack - the built in focus search does not quite match what
they need and they would like to implement a custom strategy.

Hence, having APIs for accessibility focus search in the framework does
not make. Therefore, we are hiding this APIs and later will take out the focus
search logic and allow the accessibility service to implement search.

Also putting accessibility focus from hover is tightly integrated with
the focus search since the set of views that get accessibility focus
from hover should be the same as the set of views returned by the
focus search routine. Therefore, we are letting the accessibility service
decide where to put accessibility focus when it gets an accessibility
hover event.

bug:6675330

Change-Id: Ie152230990a6602f3fd1d82de2177d0b1444d654
/frameworks/base/core/java/android/view/View.java
23ef5fcff4d99ce05ace9fd43dd0c1ace9489579 12-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> am 5d15f40a: am f372e331: Merge "NPE when iterating by character and word in Launcher widgets." into jb-dev

* commit '5d15f40a19be01fa9c5a9674b31b6b18774cbeac':
NPE when iterating by character and word in Launcher widgets.
bbd31559f32f86a100904fe8a5bc37677b5ba441 11-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> NPE when iterating by character and word in Launcher widgets.

1. The character and word iterators were use the application
context to keep track of locale changes. However, for widgets
the context from which the app context is obtained is custom
created therefore the app context is null and the iterators
code does not expect that. Now we are caching the locale
and update it when the configuration changes.

bug:6642281

Change-Id: I3fd201ab9e4efd79e3bdc8afd8ee644e4354a7fb
/frameworks/base/core/java/android/view/View.java
4210a6f08b18604b94df5a8983628650645112b5 07-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> am 8114f439: am ddbcce81: Merge "Cannot interact with dialogs when IME is up and on not touch explored popups." into jb-dev

* commit '8114f439fe8b409a00ac704b37128922690e2186':
Cannot interact with dialogs when IME is up and on not touch explored popups.
86783474fdec98a22bc22e224462767eab13e273 07-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Cannot interact with dialogs when IME is up and on not touch explored popups.

1. If the last touch explored location is within the active window we
used to click on exact location if it is within the accessibility
focus otherwise in the accessibility focus center. If the last touch
explored location is not within the active window we used to just
click there. This breaks in the case were one has touch explored
at a given place in the current window and now a dialog opens *not*
covering the touch explored location. If one uses swipes to move
accessibility focus i.e. to traverse the dialog without touching
it one cannot activate anything because the touch explorer is using
the last touch explored location that is outside of the active
window e.g the dialog.

The solution is to clear the last touch explored location when a
window opens or accessibility focus moves. If the last touch
explored location is null we are clicking in the accessibility
focus location.

bug:6620911

2. There is a bug in the window manager that does not notify a
window that its location has changed (bug:6623031). This breaks
accessibility interaction with dialogs that have input because
when the IME is up the dialog is moved but not notified. Now
the accessibility layer gets incorrect location for the
accessibility focus and the window bounds.

The soluion is when the accessibility manager service calls
into the remove thress to obtain some accessibility node infos
it passes the window left and top which it gets from the
window manager. These values are used to update the attach info
window left and top so all accessibility node infos emitted
from that window had correct bounds in screen coordinates.

bug:6620796

Change-Id: I18914f2095c55cfc826acf5277bd94b776bda0c8
/frameworks/base/core/java/android/view/View.java
5fccbbebdf010ed9457cab8a720f68a0b4e9d4c7 06-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> am cf27a374: am 538252cd: Merge "Removing leftover code to sync accessibility and input focus." into jb-dev

* commit 'cf27a3743941d9ccb1d20a294085819049fac028':
Removing leftover code to sync accessibility and input focus.
538252cd37945612a4761ff03d87022d56e33b96 06-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Removing leftover code to sync accessibility and input focus." into jb-dev
462a7284b52503f1d7f2b3b9c9e9397d0c40d0ed 06-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing leftover code to sync accessibility and input focus.

1. We have decided to let the accessibility services take care
for syncing accessibility and input focus. Some apps may
move input focus when a given view takes input focus which
dragging accessibility focus can lead to a loop in the
focus traversal. This change removes some leftover sync
code.

bug:6616861

Change-Id: I57cb44e315a386d13596794d3767b559e9ee3d99
/frameworks/base/core/java/android/view/View.java
7510230583e5ef5a94392e8ccdb1416b8d9f37cc 06-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> am f1abc425: am cab5b8a9: Merge "Nodes with contentDescription should always be important for accessibility." into jb-dev

* commit 'f1abc4253111907ffb8e5ba19dffa8d00d92fc45':
Nodes with contentDescription should always be important for accessibility.
e47957a0bbe2164467ff6e7a566b0c9e4689cdc9 05-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Nodes with contentDescription should always be important for accessibility.

1. Now after setting the content description on a view we mark is as
important for accessibility of the current important for accessibility
mode of that view is auto.

2. Minor tweak to a touch explorer coefficient to make performing double
tapping easier.

bug:6615353

Change-Id: I3b477f533a3ebde85d425caf32ace5e851240f88
/frameworks/base/core/java/android/view/View.java
0fc37e46b44774f7706dea08b7b1ea7030d0fbe8 05-Jun-2012 Chet Haase <chet@google.com> am 7c54ef9a: am 14f73a02: Merge "Restore opaque alpha value when AlphaAnimation finishes" into jb-dev

* commit '7c54ef9a0e27b5146a51ebeb267a0a6a1fd9174f':
Restore opaque alpha value when AlphaAnimation finishes
bce6f97202dba948808e702a7a75d9ed8f46f537 05-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> am b25605cd: am 72d6835c: Merge "Accessibility focus should not clear selection when taken away." into jb-dev

* commit 'b25605cd7111bcab41ec10547f015bd2d6215c91':
Accessibility focus should not clear selection when taken away.
2143337d50a983e9d9579f8ffb9fad8282f618e0 05-Jun-2012 Chet Haase <chet@google.com> Restore opaque alpha value when AlphaAnimation finishes

Alpha values were being set correctly on native Display Lists during an
AlphaAnimation, but not when the animation finished. Only non-1 values
were being propagated to the Display List properties.

The fix is to track when we've set a non-1 alpha value from an AlphaAnimation
and to notice that flag when the value is 1 (because the animation ended), so that
we propagate that value correctly. Using the flag avoids sending a value of 1
(by far the most common case) unless we really need to restore it after animating
it with non-1 values.

Issue #6600592 Sometimes album art blends with list asset on queue

Change-Id: I51047d756a4ac42a2d907a4d77963cc23dfb1db3
/frameworks/base/core/java/android/view/View.java
defdb1e49172fe7c9737347489dbb77361af955a 15-Dec-2010 Tobias Dubois <tobias.dubois@sonyericsson.com> Add the possibility to modify the View focus rect

This change makes it possible for a view to supply a different rectangle than
the drawing rect to be used by the FocusFinder when finding a new view to give
focus to. This is useful if e.g. the total view area is larger than the
interactive area of the view.

The default implementation of getFocusRect() will return getDrawingRect().
The existing behaviour is only changed if getFocusRect() is overridden by a
subclass of android.view.View

Change-Id: I52dd95c6fa296b744e354217051dcec1bb3c8e92
/frameworks/base/core/java/android/view/View.java
0a047bdcdd0ea8c58fa80bd4631fe8a8d02df050 05-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus should not clear selection when taken away.

1. Currently accessibility focus removal was clearing the selection
in the view - in particular the accessibility cursor position
which in the TextView case is the selection. This leads to a
scenario where the selection may be cleared when the app does
not explect. Further, the selection should not be cleared
since the user can be say several pages in the content and
removing and putting back accessibility focus would cause a
tedious traversal to get to the previous position.

bug:6469840

Change-Id: Iba3c01600fa2c9c39f99085a5fbc4328aa539ea8
/frameworks/base/core/java/android/view/View.java
0cd655ad2dcc16035f26300001ac2b3bd62d1c46 05-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Revert "Revert "Clean up layout direction APIs for Drawable"""
b03b434089cf2106c467b2827a65e5c589c91d01 04-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Revert "Revert "Clean up layout direction APIs for Drawable""

This reverts commit c96132ff53e5c26f5b0170edd85072006fb2bc70
/frameworks/base/core/java/android/view/View.java
665ef836b5aacee69bf517c8c2718bd01303f2d1 02-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> am 40404f43: am cba5e879: Merge "Calling the correct method when adding accessibility focusables." into jb-dev

* commit '40404f435c17dfbbedfdf358c48f0f91df91b84f':
Calling the correct method when adding accessibility focusables.
c96132ff53e5c26f5b0170edd85072006fb2bc70 02-Jun-2012 Jean-Baptiste Queru <jbq@google.com> Revert "Clean up layout direction APIs for Drawable"

This reverts commit c1da65187a4b9de8f72bd617ef937030187c0a92.
/frameworks/base/core/java/android/view/View.java
a90e4512ab81dcd8cdbefdd2ffa0de55fca1caa3 02-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Calling the correct method when adding accessibility focusables.

1. Since we added explicit accessibility focusable attribute when
adding focusables views that do so should call this method. Some
views were not updated to do so.

bug:6581924

Change-Id: Id64c0b2d76e5269ebf3fbe17203e73b174bdb843
/frameworks/base/core/java/android/view/View.java
78068825416a4a0f3b2fdf57491ba4932c2bb6c4 01-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Clean up layout direction APIs for Drawable"
c1da65187a4b9de8f72bd617ef937030187c0a92 01-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Clean up layout direction APIs for Drawable

- see bug #6427629

Change-Id: I3119db3022bba0ee325b6d0d4471bfebd850ec10
/frameworks/base/core/java/android/view/View.java
76abb24afa366b6de0176cc14bc50ea7533418a6 30-May-2012 Jean Chalard <jchalard@google.com> am 887568c4: am 01bf82f2: Merge "Add/refine comments to reflect key event policies" into jb-dev

* commit '887568c4f4e49b78b1549459b265377c7ee4e8c0':
Add/refine comments to reflect key event policies
01bf82f27297536399f7dcde214d1a082e3613ef 30-May-2012 Jean Chalard <jchalard@google.com> Merge "Add/refine comments to reflect key event policies" into jb-dev
b616547cd5915793ebb5f7b85e815895c54b1d93 30-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am 378aa011: am a5c896af: Merge "Updating the behaviour of accessibility text iterators." into jb-dev

* commit '378aa011d5f989166b62e9db6328a5881a1a73a0':
Updating the behaviour of accessibility text iterators.
a5c896afe89aaf40166343232d85980b94974032 30-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Updating the behaviour of accessibility text iterators." into jb-dev
35742844bca9c51ae4264d0dc10f19cfdcb4ab0b 30-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am b554ee35: am 48d1daca: Merge "Accessiblity scroll event firing callback not properly reset." into jb-dev

* commit 'b554ee35853369e898d5feea9ea4b6667a682dac':
Accessiblity scroll event firing callback not properly reset.
48d1daca98703a470f04b4e217d9e6dae6d61dd2 30-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Accessiblity scroll event firing callback not properly reset." into jb-dev
4a812aeb8b90925b6a53365972047f95d9b58b17 30-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessiblity scroll event firing callback not properly reset.

1. We use a delayed callback to throttle the amount of accessibility
scroll events fired by the view tree. The callback to do so was
not properly reset when removed putting the view tree in a bad
state resulting in no scroll events being fired at all.

bug:6549005

Change-Id: Ibf72d7e009e4545a336c9471f46015910290703e
/frameworks/base/core/java/android/view/View.java
b042f2d9908e20852e4077878e50a0c07b8eee79 30-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am 09dfd60b: am bb1b7cf6: Merge "Adding accessibility focusable attribute (hidden for now)." into jb-dev

* commit '09dfd60bc37585e2670e4ca997940256e5b21ac8':
Adding accessibility focusable attribute (hidden for now).
bb1b7cf66bc17165b656c2aaed8027f9e5992306 30-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Adding accessibility focusable attribute (hidden for now)." into jb-dev
f9817f7a3b4463f75a4cd9c4050bb89525476a9f 23-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding accessibility focusable attribute (hidden for now).

1. This attribute specifies whether a view can take accessibility
focus. It has three values: 1) auto - the system determines
based on whether the view is actionable and has actionable
predecessor. Accessibility services can put accessibility focus
on such a node at will; 2) yes ; this view always takes access
focus; 3) no - the view cannot takes accessibility focus and
accessibility services cannot put accessibility focus on it.

Change-Id: I2ebf4e7c75bf6b39e1742b6868b37ccdd4cc7d28
/frameworks/base/core/java/android/view/View.java
39f2aee640eea62b43fa79f28dec3a962e5cb065 29-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Updating the behaviour of accessibility text iterators.

1. Iterators were skipping content on reversing direction.

2. The cursor was positioned at the beginning of the next text segment
when moving forward and at end of the previous text segment when moving
backwards. This is incorrect and now the cursor is positioned at the
end of the segment when moving forward and at the beginning when moving
backward.

3. The cursor position was not properly set when reaching the end/start
of the text.

4. The iterators were reporting strictly the next/previous segment even
if the cursor is within such a segment. Thus, when traversing some
content may be skipped. Now moving forward moves the selection to
the next segment end and the start position is either the old index
if it was within a segment or the start of the segment. Same in
reverse.

bug:6575099

Change-Id: Ib48a649cec53910339baf831a75e26440be6e576
/frameworks/base/core/java/android/view/View.java
405bc51c5dc73846a4abdc325cd234eb2d37469f 29-May-2012 Jean Chalard <jchalard@google.com> Add/refine comments to reflect key event policies

Make clearer how the platform is handling key events following some
unfortunate uses by third party applications. Also highlight the
changes in Jelly Bean default keyboard.

Bug: 6566711
Change-Id: Ibcdaf54c6d629fd0733529bfe2fffc82f555f084
/frameworks/base/core/java/android/view/View.java
98fd5a5fbc24c93593e79fa56669f36dbb452f09 24-May-2012 Romain Guy <romainguy@google.com> am ed130313: am 94328c30: Merge "Clear bitmap references from display lists as early as possible Bug #6555840" into jb-dev

* commit 'ed1303132912f0d39bcd008c3efbc0422d7433fc':
Clear bitmap references from display lists as early as possible Bug #6555840
94328c308bc8d283841ac6434d47b4c56389a388 24-May-2012 Romain Guy <romainguy@google.com> Merge "Clear bitmap references from display lists as early as possible Bug #6555840" into jb-dev
38c2ece5ce4c59f30e5832779bf1d86d68b1c442 24-May-2012 Romain Guy <romainguy@google.com> Clear bitmap references from display lists as early as possible
Bug #6555840

Apps like Google+ with large bitmaps displayed in listivews could
run into memory issues because of these references.

Change-Id: I39486bda13ce00c5a3b6481139ad54547506a8b4
/frameworks/base/core/java/android/view/View.java
425f126a0f2284423f4ccea0b00fbd5ea670a6c9 24-May-2012 Romain Guy <romainguy@google.com> am a865d7d7: am df3633b3: Merge "Make it harder for apps to mess up ViewGroup\'s internal state Bug #6421288" into jb-dev

* commit 'a865d7d7d3612d99e3b1407793610056c7df163c':
Make it harder for apps to mess up ViewGroup's internal state Bug #6421288
df3633b38969e134c5370449b8247827c705ac1e 24-May-2012 Romain Guy <romainguy@google.com> Merge "Make it harder for apps to mess up ViewGroup's internal state Bug #6421288" into jb-dev
393a52c9f628bbf2ab68508913177650f9183ee4 23-May-2012 Romain Guy <romainguy@google.com> Make it harder for apps to mess up ViewGroup's internal state
Bug #6421288

Change-Id: I8c2c597f45391d3c1ae40c8341a68bb25d8ad4d9
/frameworks/base/core/java/android/view/View.java
eed38b6d7fe403c40bf89b23949e7e090a1eaa2d 23-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am 1eab75b9: am 321a56c8: Merge "Clearing accessibility focus of a view did not update the global state." into jb-dev

* commit '1eab75b9ba87fe73e5709ef4e77adc78e55b96c9':
Clearing accessibility focus of a view did not update the global state.
c00d00865d51e8c08d1f90b2b34c699b63a7105e 23-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Clearing accessibility focus of a view did not update the global state.

1. The code in clear accessibility focus was not updaing the global
accessibility focus reference in view root if the view not a
descendant has accessibility focus.

bug:6382856

Change-Id: I0c99578b5afd1f1f5d0df5bba05b0a03b5951a43
/frameworks/base/core/java/android/view/View.java
207efc59be1cd045dffc1cbb86e98576e52bcd1b 22-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am 34757fdd: am f4062864: Merge "Accessibility focus and input focus do not sync - part 2" into jb-dev

* commit '34757fdd37c3fba882de7ade1706e4c577b01830':
Accessibility focus and input focus do not sync - part 2
f40628645df750991ced8dde803dd57225fca04f 22-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Accessibility focus and input focus do not sync - part 2" into jb-dev
525ae2075cf96d3a2ac67cd3a662069fd579f42d 22-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus and input focus do not sync - part 2

1. This patch has somecode that syncs input and accessibility
focus or tries to put accessibility focus on the top most
container that was missed by the previous patch.

Change-Id: I08f21670b1c6e9f363d5714b1976fb52d84baae4
/frameworks/base/core/java/android/view/View.java
c18cced700e79bdb183b47af884ffdfcb5727f28 22-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am 5182a5bc: am 4ce106f5: Merge "Fixing some minor issues in accessibility focus." into jb-dev

* commit '5182a5bcf7a975c6183e0925dec0d3ac35071de9':
Fixing some minor issues in accessibility focus.
4ce106f5cff5670bf1aae4190612dc8e972f5c28 22-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Fixing some minor issues in accessibility focus." into jb-dev
f76a83cfcf32402edb78666733b5ebf9ec6ac2e2 22-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing some minor issues in accessibility focus.

1. Now accessibility focus does not drag input focus and
vice versa. Having the two focuses chase each other
can lead to some pathological cases. For example, a
container is input focusable and manages input focus
for its children i.e. as soon as it gets input focus
it sets input focus to a child. Now assume input and
accessibility focus are on a child and focus search
finds the parent to take accessibility focus, now
putting accessibility focus to the parent will put
input focus there and the parent will put input focus
to the child which as a result will put accessibility
focus there, thus resulting in traversal loop.

bug:6522900

2. Fixed asymmetrical behavior of accessibility focus search
for AbsListView.

bug:6520016

3. Fixed accessibility focus search getting stuck in an
empty AbsListView.

bug:6520049

Change-Id: Ia26e5be7b5a9f340f873861ff466c787467b98dc
/frameworks/base/core/java/android/view/View.java
abafe372ee70496ac6b323e1d05d397785651779 21-May-2012 Romain Guy <romainguy@google.com> am 6fa51de8: am 46a8b1ac: Merge "Remove unused, obsolete debug code" into jb-dev

* commit '6fa51de80bae65a93346ed18628010a0867607cc':
Remove unused, obsolete debug code
891a844646ce7f7b62cbe963a7e08bdea5bef4e4 21-May-2012 Dianne Hackborn <hackbod@google.com> am bcb7f04a: am e312c61f: Merge "Improve fitSystemWindows() documentation." into jb-dev

* commit 'bcb7f04a7ca05a606d1b293dbe975f1710135be7':
Improve fitSystemWindows() documentation.
13b907353f18215b52b5ceda24bbf520d91d72a1 21-May-2012 Romain Guy <romainguy@google.com> Remove unused, obsolete debug code

All these features have either been abandonned and left un-maintained
for years or can be replaced by systrace.

Change-Id: I42e4579a8078744047e5fe08a7a15254970b09bc
/frameworks/base/core/java/android/view/View.java
d5333f92894ae54943199d02015f0c9ef4548fd6 18-May-2012 Dianne Hackborn <hackbod@google.com> Improve fitSystemWindows() documentation.

Change-Id: I6528f2530e6514344e454510f2fa037b55daebb7
/frameworks/base/core/java/android/view/View.java
ba910bc004bbf6f0e9aa1daab0bcd6a898b60ecd 18-May-2012 Dianne Hackborn <hackbod@google.com> am cefbeb68: am 20c0cdbb: Merge "Have the stable layout take into account the window\'s fullscreen flag." into jb-dev

* commit 'cefbeb683416a2bbc20905f280eaeadb349cb9d9':
Have the stable layout take into account the window's fullscreen flag.
72e15ceb85ecbe066c2ba33ca7e086dc511a8d23 18-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am cefd97c8: am e54c5f13: Merge "Exposing some accessiblity actions only for enabled views." into jb-dev

* commit 'cefd97c8546d6dca184e8ac9589ab2ff1b795c06':
Exposing some accessiblity actions only for enabled views.
88b2b90e7d79292229ca92b6bf416bfe61092fb1 18-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am c2f64117: am c5fb5805: Merge "Accessiblity focus not following input focus and text nav broken." into jb-dev

* commit 'c2f6411741949924d42e2c4aaefc33e6312cdd68':
Accessiblity focus not following input focus and text nav broken.
20c0cdbbf79cef18e59514e0f53dfbcac0bef600 17-May-2012 Dianne Hackborn <hackbod@google.com> Merge "Have the stable layout take into account the window's fullscreen flag." into jb-dev
e54c5f13652166c5896ccfa55f047301a6c8b876 17-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Exposing some accessiblity actions only for enabled views." into jb-dev
fb1e80a247221ee7e8f5c5deba04812021d9d07e 17-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Exposing some accessiblity actions only for enabled views.

1. Some accessibility actions should not be performed on disabled
views. For example, scrolling should not be permitted while
accessibility focus should be. Made a quick pass over the
actions we expose now.

Change-Id: I36626dfbc0d2f480309a910f58f1de64e9e05675
/frameworks/base/core/java/android/view/View.java
5b5cc4d5361c1817938d2db58ad40aab528b3ac3 16-May-2012 Dianne Hackborn <hackbod@google.com> Have the stable layout take into account the window's fullscreen flag.

When using stable layouts, you are typically expected to hide and
show the status bar through the system UI fullscreen flag. This hides
both the status bar and the action bar. The stable layout assumed
that when not hiding the status bar through the system UI flags, that
the status bar would be visible.

This change makes things a little smarter, also looking at the
window's fullscreen flag (which only hides the status bar). If this
flag is set on the window, then the stable layout now assumes that
the status bar will never be shown. This allows us to position the
action bar correctly in the situation where the application has set
the window to fullscreen and requested a stable layout, instead of
always leaving room for the status bar above it.

Change-Id: I757072ae99cd3741753af7210dbf51afe94d3db5
/frameworks/base/core/java/android/view/View.java
64899e5c8ff7309e3209454fd4833d1b7a4b57be 16-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessiblity focus not following input focus and text nav broken.

1. View is checking if the accessibility focus is its
descendant it clears the accessibility focus state
in ViewRootImpl. The check in View was missing the
case that the descendant may be the view itself. In
such a case we want the normal clearing code to run.

2. The check whether a view has iterable text for
accessibility was inverted and text nav was not
working.

Change-Id: I1a13b6809fb7f205fff76ca09cd449179d06e530
/frameworks/base/core/java/android/view/View.java
da350b9ef3095ec64a262758e595d5c6e039efd2 15-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am db3cf0dd: am 0e29ac9e: Merge "Accessibility focus traversal in virtual nodes." into jb-dev

* commit 'db3cf0dd580ce976ea9b90aeebc60ff34f62372a':
Accessibility focus traversal in virtual nodes.
38f4c223c0fde274c2089b1dad026593c06de06f 15-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am d83a0800: am 8ce2d78a: Merge "Improving accessibility focus traversal." into jb-dev

* commit 'd83a0800679583ccc99a90a128f8d6c11afbeca4':
Improving accessibility focus traversal.
791fd31a68c59395952005886ba799169f80a29a 15-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus traversal in virtual nodes.

1. Finished the implementation of support for maintaining
accessibility focus in view with virtual descendants.

2. Finished the NumberPicker implementation of virtual
subtree such that all requred attributes are reported
and ensuring that it support accessibility focus in
its virtual descentants.

3. Fixed a bug where if a predecessor of the view that is
accessiiblity focused is removed the accessibliity focus
host in ViewRootImpl is not cleared leading to a crash
when trying to draw the accessibility focus highlight.:

bug:6472646
bug:6433864

Change-Id: I3645642b87b4a26025c0b2ba9dfaad92d11a48f1
/frameworks/base/core/java/android/view/View.java
24ef21aeebb247f5dd6de13aea878f3d7194143a 15-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am e436812e: am 844047ac: Merge "Fix inconsitency in aAccessibilityNodeInfo cache." into jb-dev

* commit 'e436812e85f4a8da724f4fe36c1547a1b806f1f9':
Fix inconsitency in aAccessibilityNodeInfo cache.
76af556c8d70bad552bf5cc1047f0c018fc5f906 15-May-2012 Chet Haase <chet@google.com> am c63aaee9: am 728e4394: Merge "Minor touch-up of Animation docs" into jb-dev

* commit 'c63aaee9ff45cec1c47edff8de21c7732ccc6bcf':
Minor touch-up of Animation docs
6917b2a10d9b701282fbfb85be48eeb7e7877882 15-May-2012 Dianne Hackborn <hackbod@google.com> am 2da87ec3: am 2a7a6ca0: Merge "Implement new window cropping." into jb-dev

* commit '2da87ec32e72c2c25998e2444155c00074cfbd40':
Implement new window cropping.
9a19d16a1a44b8f394f93e116adb48024148f8ef 15-May-2012 Guang Zhu <guangzhu@google.com> am 58b0dcde: am 0d607fbe: accessibility bug fix in NumberPicker

* commit '58b0dcde83354bd1ae9091a7cbc7f207fb29960a':
accessibility bug fix in NumberPicker
8ce2d78aa89e89e9a5607d8809bf6d248508a531 15-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Improving accessibility focus traversal." into jb-dev
e5dfa47d84668376b84074c04570fb961870adeb 09-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Improving accessibility focus traversal.

1. Now the views considered during the accessibility focus search
are the ones that would get accessibility focus when thovered
over. This way the user will get the same items i.e. feedback
if he touch explores the screen and uses focus traversal. This
is imperative for a good user experience.

2. Updated which focusables are considered when searching for access
focus in ViewGroup. Generally accessibility focus ignores focus
before/after descendants.

3. Implemented focus search strategy in AbsListView that will traverse
the items of the current list (and the stuff withing one item
before moving to the next) before continuing the search if
forward and backward accessibility focus direction.

4. View focus search stops at root namespace. This is not the right
way to prevent some stuff that is not supposed to get a focus in
a container for a specific state. Actually the addFocusables
for that container has to be overriden. Further this approach
leads to focus getting stuck. The accessibility focus ignores
root names space since we want to traverse the entire screen.

5. Fixed an bug in AccessibilityInteractionController which was not
starting to search from the root of a virtual node tree.

6. Fixed a couple of bugs in FocusFinder where it was possible to
get index out of bounds exception if the focusables list is empty.

bug:5932640

Change-Id: Ic3bdd11767a7d40fbb21f35dcd79a4746af784d4
/frameworks/base/core/java/android/view/View.java
844047acb7133c0b6b7128f19b76f93eaca9371e 14-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Fix inconsitency in aAccessibilityNodeInfo cache." into jb-dev
728e43948c9b4d18a900fa50acad8d2734947b21 14-May-2012 Chet Haase <chet@google.com> Merge "Minor touch-up of Animation docs" into jb-dev
e60a635919ce8f1f5d868d51a87d7fc5da4ddda0 14-May-2012 Adam Powell <adamp@google.com> am e48c70e4: am 7fc4fbcc: Merge "Automatic persistent text selection for ListViews" into jb-dev

* commit 'e48c70e4d9302795d5f02d352c7907302ca5c8b6':
Automatic persistent text selection for ListViews
7008d7b7f3730aef59d510d2a48e166114e090a4 14-May-2012 Chet Haase <chet@google.com> am fd086b95: am 76f08218: Merge "Fix quickReject logic for transformed views" into jb-dev

* commit 'fd086b95103e8c7fbe853f5702aaa7d04f2141f0':
Fix quickReject logic for transformed views
ad4fc6f764bcd2bdbac726efbfbfb6f4ffe113b6 14-May-2012 Chet Haase <chet@google.com> am 4a70bc72: am 26511012: Merge "Clear animations in DisplayLists when done" into jb-dev

* commit '4a70bc72a87427115d9d64516145283dc96745f2':
Clear animations in DisplayLists when done
2a7a6ca00ab176105b5bbfa6b17bb0dcd058d517 14-May-2012 Dianne Hackborn <hackbod@google.com> Merge "Implement new window cropping." into jb-dev
85afd1b6f871d471fdff1980134676a5f1690525 13-May-2012 Dianne Hackborn <hackbod@google.com> Implement new window cropping.

The window manager now performs the crop internally, evaluating
it every animation from, to be able to update it along with
the surface position.

Change-Id: I960a2161b9defb6fba4840fa35aee4e411c39b32
/frameworks/base/core/java/android/view/View.java
0d607fbe546ac943de38dad33ae681b09efec6ea 12-May-2012 Guang Zhu <guangzhu@google.com> accessibility bug fix in NumberPicker

* moved View#isVisibleToUser to protected with @hide
* added a new View#isVisibleToUser(Rect), so that a portion of
the view can be tested for visibility
* NumberPicker will report its concrete class name
* code to append virtual children was at wrong place
* boundInScreen for increment and decrement buttons are reported
wrong

Change-Id: Ic5d644b3e1efa15b1f0537907c8cdd4ce43a97c1
/frameworks/base/core/java/android/view/View.java
c406be9036643ebe41bafcd94fe4aa861b4e4f4f 12-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Fix inconsitency in aAccessibilityNodeInfo cache.

1. Fixed errors in the accessibility node cache.

A. The cache was not catching the case when the current window changes as a
result the user touch exploring it. As a result the cache had nodes from
more that one window but the node ids are not unique thus causing a mess.

B. The node info tree was prefetched regardless if a prefetched node is root
name space (i.e. view ids - not accessibility ids - are namespaced) while
the prefetched nodes were taking this into account. As a result there can
get disconnected subtrees in the cache.

C. When an event for a property change such as focus was received the cache
we were removing the source node. As a result there may be disconnected nodes.

D. When a node was added to the cache and an older version exists there was
no check if it will point to the same children and parent. As a result if
the state of the node has fewer children the subtrees rooted at the no
longer present children will stay disconnected in the cache.

E. When a node got accessibility or input focus the old one in the cache was
not removed. As a result you may have a state with more than one access
or input focus.

2. Added integrity check enabled only on user builds when a specific flag is set
for the cache which checks whether:

A. All nodes are from the same window.

B. All nodes are connected.

C. There are no duplicates.

D. There is only one input focus.

E. There is only one accessibility focus.

3. The reported accessibility node info tree was stopping at the root namespace
boundary which is not correct. The reported tree has to reflect everything
on the screen that the user can see such a workspace with widgets. The root
namespace is added to avoid clash of view id but the accessibility ids are
unique no matter if the view is inflated from a remote view.

4. Added calls to notify the accessibility layer when a preoprty that is interesting
for accessibiliy has changed.

bug:6471710

Change-Id: I069470d91f209ba16313fa6539787a55efa3512e
/frameworks/base/core/java/android/view/View.java
7fc4fbccd6129e286a1f9c640eb3229b91792bce 12-May-2012 Adam Powell <adamp@google.com> Merge "Automatic persistent text selection for ListViews" into jb-dev
4242893e326cf013eba51931f00faf3ed428d670 12-May-2012 Chet Haase <chet@google.com> Minor touch-up of Animation docs

Change-Id: Ifd615d352b9924d562f4238c8ed36a8f4e6a91fa
/frameworks/base/core/java/android/view/View.java
057a585fba01d92c38f27a8c080622dfd0c6f556 11-May-2012 Adam Powell <adamp@google.com> Automatic persistent text selection for ListViews

Use View transient state tracking to allow selection to persist across
ListView-style item view recycling.

Fix some bugs with transient state tracking.

Bug 6110122

Change-Id: Ic084b8fc2289bff718b19478a37ce64459b3ed4c
/frameworks/base/core/java/android/view/View.java
1a3ab175b099edf545474f11fa165473428a98a1 11-May-2012 Chet Haase <chet@google.com> Fix quickReject logic for transformed views

When a parent draws its child views, each child's bounds is checked
against the current dirty region. If the view falls outside of that
region is is rejected and doesn't enter into the parent's DisplayList.

This works in general, for both transformed and untransformed views
(because we skip this check if the view is transformed). But it breaks down
when the transform properties of the view change later, since DisplayList
properties simply push these values down to the view's DisplayList without
invalidating the parent. If a view is rejected when untransformed, then there
is nothing to cause it to be considered again until something causes an
invalidate of the parent.

The fix is to note when a view is rejected and record that information.
Later, when one of the transform-related properties change, we invalidate the parent
to force the check to happen again, which will cause the view to get drawn
if it's visible.

Issue #6477730 quickRejected views must recreate their DisplayLists on transform changes

Change-Id: I70caf198005cd7e424a37bccc6ae050e09880a6c
/frameworks/base/core/java/android/view/View.java
26511012c40dbe704f4791654b28b9e0e05589d8 11-May-2012 Chet Haase <chet@google.com> Merge "Clear animations in DisplayLists when done" into jb-dev
5c2a9ddcf2764f2cb34251d86ccdbf722f7f49cb 11-May-2012 Dianne Hackborn <hackbod@google.com> am 00389a51: am b1b55e6c: Fix build.

* commit '00389a5198d17a650b00b981b5a9174dbb88fc9f':
Fix build.
b1b55e6c6b079d75c13dcc23ca3ebce847bb42f8 11-May-2012 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ie255c93442d0b62032ac25e6de97f2c03e5df3ba
/frameworks/base/core/java/android/view/View.java
50d99215023ee346a95eb72c413759d6a58f82a5 11-May-2012 Dianne Hackborn <hackbod@google.com> am de888fec: am 255d1e15: Merge "Fix issue #6475693: OnSystemUiVisibilityChangeListener reporting..." into jb-dev

* commit 'de888fec6b7c2f2c9a32a7e9faf38083f67da4d8':
Fix issue #6475693: OnSystemUiVisibilityChangeListener reporting...
cf67578c7f99492273a8f8446dd18ddc5af2ae76 11-May-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6475693: OnSystemUiVisibilityChangeListener reporting...

...incorrect visibility when the ActionBar overflow menu is opened

Don't report layout flags in system UI visibility callback. Update
docs to reflect this.

Change-Id: Icfa411b5537de037cafbcac04991101e8b9138c4
/frameworks/base/core/java/android/view/View.java
afd5c3ee60c45ebb5d63d2d0d14f08130075883b 10-May-2012 Chet Haase <chet@google.com> Clear animations in DisplayLists when done

The matrix calculated by Animations is pushed down to the native
DisplayList object, and is then used when the DL is issued to the
GL renderer. This works while the animation is running, but the end
of animations is not handled correctly. In particular, we never clear the
animation, so whatever the last frame of the animation calculated will
persist on that DisplayList object until it is recreated.

The fix is to note when we used to be animating and are no longer
doing so, taking that opportunity to push the cleared state down
to the DisplayList.

Issue #6448993 action bar -- including settings menu -- disappears on Nakasi

Change-Id: I73cdadaef40d87ccbc1beb02599c4d70506ea42b
/frameworks/base/core/java/android/view/View.java
455af7f7b002c15ec85701a8333ef9862683e7e1 10-May-2012 Dianne Hackborn <hackbod@google.com> am 67cc7f2e: am a53de062: Add callback hack to find out when to load system properties.

* commit '67cc7f2e60bc6532d00bb3c473b9a1d32cdafce2':
Add callback hack to find out when to load system properties.
a53de0629f3b94472c0f160f5bbe1090b020feab 09-May-2012 Dianne Hackborn <hackbod@google.com> Add callback hack to find out when to load system properties.

Use this to reload the trace and layout bounds properties.

This is ONLY for debugging.

Change-Id: I1c4bdb52c823520c352c5bac45fa9ee31160793c
/frameworks/base/core/java/android/view/View.java
7956d5a01992bd2d56466beb864c4b28ec4f19d9 09-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am 72912116: am a3b67289: Merge "Fixing View.getBoundsOnScreen()" into jb-dev

* commit '72912116cf0ff08dc655f065cff173d53b7152bd':
Fixing View.getBoundsOnScreen()
1313b08011cfd4c89ab1101c0672f8dc8de2de23 09-May-2012 Romain Guy <romainguy@google.com> am 3607c338: am 27ef44c4: Merge "Invalidate display lists immediately when views are removed/added quickly" into jb-dev

* commit '3607c338c75bbfbc7e3ac61b5ead4eaf1ac61427':
Invalidate display lists immediately when views are removed/added quickly
2da197dff2062e4ba0f37f7fd3ef920ed9e86c74 09-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am aecb9b59: am 59f3f585: Merge "Add performAccessibilityAction to AccessibilityDelegate." into jb-dev

* commit 'aecb9b59e6c9e9a864bf4b302f978fb950df09ff':
Add performAccessibilityAction to AccessibilityDelegate.
eacfff7f47e9398e7201d213623603588cae3212 09-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am c2f5e797: am 6704c233: Merge "AccessibilityNodeInfo for visible views should reported." into jb-dev

* commit 'c2f5e797506fbc4235d4940846f3e2110e67daa6':
AccessibilityNodeInfo for visible views should reported.
529ddb895e74d226ba957da9b389dbce0f1c3071 09-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am ca1e49ca: am cdbbecf3: Merge "Accessibility focus on temporary detached view not cleared." into jb-dev

* commit 'ca1e49cad5b5eebdd47039289b604bea6f00e8f7':
Accessibility focus on temporary detached view not cleared.
807a4331ab02304f5a08f16b6a5eeececc1ee353 09-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am ba23196f: am 911b0c0b: Merge "Accessibility focus actinos incorectly set on accessibility node info." into jb-dev

* commit 'ba23196f1626409334f74e2d7e7cb34bef0b6f7f':
Accessibility focus actinos incorectly set on accessibility node info.
4833ca2903e89eab93b353f00a1e4904a73d79bb 09-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am 755b2146: am b2ee0d57: Merge "Text traversal at various granularities." into jb-dev

* commit '755b2146735c15deb0eb611430a7da1e363d82a1':
Text traversal at various granularities.
14b2b74c13d0a22b396d10601bd683d80378810a 09-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing View.getBoundsOnScreen()

1. The function was not setting the initial rect properly.

bug:6462629

Change-Id: I7a832a979576fc5745794c68fb8414257efb21dd
/frameworks/base/core/java/android/view/View.java
27ef44c46d24a5800e227d945ffede813d7f28f7 08-May-2012 Romain Guy <romainguy@google.com> Merge "Invalidate display lists immediately when views are removed/added quickly" into jb-dev
2a0f228a30c85a124f92a5a7c1b10a81cf69af6d 08-May-2012 Romain Guy <romainguy@google.com> Invalidate display lists immediately when views are removed/added quickly

The deferred invalidation of display list could cause problems with
view like TextureView who destroy resources when detached from the
window but only recreate them later at draw time. This would cause
temporary flashes or other visual glitches on screen.

Change-Id: I018488ba09743df21c6434ea610813014fb80a85
/frameworks/base/core/java/android/view/View.java
59f3f5853cd05103b5a83f5ddbe584a5270a9c6b 08-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Add performAccessibilityAction to AccessibilityDelegate." into jb-dev
6704c233390743890d23338a2329dcda5709b810 08-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "AccessibilityNodeInfo for visible views should reported." into jb-dev
961bf0e9b4ef94f52ae66856ac573995f1f34578 08-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus on temporary detached view not cleared.

1. When a view that has accessibility focus is temporary detached
we try to draw the focus highlight and crash. Since the detached
view will be modified and then either attached or detached from
the window we should not keep accessibility focus on a temporary
detached view. Otherwise, we may have a scenario where the user
thinks he is in one item scroll acound and being in completely
different item because of the view being recycled but the user
has no clue.

2. Clearing accessibility focus when the view is removed from the
parent as opposed as when it is detached from the window. Since
we may have transitioning views for removal we do not want
accessibility focus on such views during the anumation.

bug:6457339

Change-Id: I62287a089ec6850fb1d691ae26dea54e1da39c94
/frameworks/base/core/java/android/view/View.java
8eeefefc8451c97745add2b4d508116aaffbcb22 08-May-2012 alanv <alanv@google.com> Add performAccessibilityAction to AccessibilityDelegate.

Change-Id: I43dff2ced959af5d8a9ce9ed18858a6e74cb35c6
/frameworks/base/core/java/android/view/View.java
911b0c0b15ae4f14a6f755278679ef9c6a6e6c05 08-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Accessibility focus actinos incorectly set on accessibility node info." into jb-dev
0a1bb6dffc358c01e10555c5c833edb7dba69659 07-May-2012 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfo for visible views should reported.

1. AccessibilityNodeInfos for visible views should always
be reported and the clients should be able to check
whether that node info is shown to the user. For example,
focus search may return a node that is not on the screen
and the accessibility layer may decide to give it focus
which scroll the source view in the screen.

bug:6421991

Change-Id: Idc1fd8512dda767abe802aacedb0c69582e6fc2a
/frameworks/base/core/java/android/view/View.java
02afe2cfd35f684117a9eed3c31edea311ce7d95 08-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus actinos incorectly set on accessibility node info.

bug:6456267

Change-Id: I9fce268623cebef49dd613d193a36a0a1a0654aa
/frameworks/base/core/java/android/view/View.java
6d17a936f73976971135aa1e6248662533343292 28-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Text traversal at various granularities.

1. Implementing text content navigation at various granularities.
For views that have content description but no text the
content description is the traversed at character and word
granularities. For views that inherit from TextView the
supported granularities are character, word, line, and page.

bug:5932640

Conflicts:

core/java/android/view/View.java

Conflicts:

core/java/android/view/View.java

Change-Id: I66d1e16ce9ac5d6b49f036b17c087b2a7075e4c0
/frameworks/base/core/java/android/view/View.java
475fc468423186b8e9d60a557aa4fd2a6fc6bfc2 06-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am 9879659a: am 2551e5a1: Merge "API REVIEW: android.view.accessibility" into jb-dev

* commit '9879659a1cbfe404c725df1e57ff92f151bf65bc':
API REVIEW: android.view.accessibility
d88eb08cc2766f5be2e1eff096a0cacee6714c16 06-May-2012 Svetoslav Ganov <svetoslavganov@google.com> am ae825876: am 3f28a1b7: Merge "Performing click and long click for accessiblity not returning result." into jb-dev

* commit 'ae825876fa9303ff4b3ad0964085a2a338089139':
Performing click and long click for accessiblity not returning result.
2551e5a1d9990514d8116e352b8e5c2f10a9d303 06-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "API REVIEW: android.view.accessibility" into jb-dev
3f28a1b7ebb3500d13a1672ab76fe68e9c0a75e8 06-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Performing click and long click for accessiblity not returning result." into jb-dev
4fa22f0b4d271a41e2a459e1d927c4ce54d15847 06-May-2012 Romain Guy <romainguy@google.com> am 95b0c45b: am aaa71475: Merge "Remove unnecessary framework allocations" into jb-dev

* commit '95b0c45b06d9a053f9050e0f0ef1171a18ae0711':
Remove unnecessary framework allocations
aaa7147595346fdd398e2932817e075acbb8e497 06-May-2012 Romain Guy <romainguy@google.com> Merge "Remove unnecessary framework allocations" into jb-dev
ab4c4f4ff73e66b7767640dbe6d4115237c48242 06-May-2012 Romain Guy <romainguy@google.com> Remove unnecessary framework allocations

These allocations were frequently triggered by the home screen. This change
removes dozens of allocations during page scrolls on home.

Change-Id: I7289efa28ecf5bd62459042b10062aa9cf0432dd
/frameworks/base/core/java/android/view/View.java
36cade591a1bb40acbf3f271a4b414dfd894cf1d 06-May-2012 Dianne Hackborn <hackbod@google.com> am 7bedac94: am 139e5aa1: Fix issue #6404215: New ActionBar auto-hide can conflict with application

* commit '7bedac9417d60608003d739c8caed7ca81683825':
Fix issue #6404215: New ActionBar auto-hide can conflict with application
139e5aa1da51b27231ab36344cf2d0dafab23f1e 06-May-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6404215: New ActionBar auto-hide can conflict with application

The action bar now maintains separate states for the things that can
impact its visibility (calls from the app, action mode, system UI) so
that the changes in these won't incorrectly mix together.

Also added a hack to force the status bar to be shown when showing
the action bar for an action mode, when the UI is in a state where
the action bar would be shown with a gap above where the status bar
is.

Change-Id: Ib0950a7f585c5d2c9e77d11b237ba6e150f15ebd
/frameworks/base/core/java/android/view/View.java
773f2624ec01aabf10cfa755cb6f1081ba9b4faf 06-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Performing click and long click for accessiblity not returning result.

1. When performing the click and long click actions the code in View
was not returning the resilt of the called method.

bug:6426849

Change-Id: I0cf396a8373f622948ed436ce09f8d1dcf246acd
/frameworks/base/core/java/android/view/View.java
4256391861f91e1f66f7684c4b2aee9e4b248c3b 05-May-2012 Dianne Hackborn <hackbod@google.com> am ce1d03b3: am 3fd4a382: Merge "Implement cropping of windows based on system UI elements." into jb-dev

* commit 'ce1d03b39935c42cfa0d11ef782c8c6a2fd823d4':
Implement cropping of windows based on system UI elements.
3556c9a8068497d0de8964fd3be719c68eae1f00 05-May-2012 Dianne Hackborn <hackbod@google.com> Implement cropping of windows based on system UI elements.

Start calling Surface.setActiveRect().

Change-Id: I94197059c971c6ab7820e615ea8f285482b86c75
/frameworks/base/core/java/android/view/View.java
2b435aada3d274a9c08d334946fff1ab9ba15b48 05-May-2012 Svetoslav Ganov <svetoslavganov@google.com> API REVIEW: android.view.accessibility

1. Changed all references to granularity to movement
granularity. BTW, to be more precise it should be
text movement granularity.

bug:6435232

Change-Id: If6366b002ca3390f74918995b342baff2cbcfd01
/frameworks/base/core/java/android/view/View.java
66388dcb09018933ccd1d38eae563f0890ba4f06 04-May-2012 Fabrice Di Meglio <fdimeglio@google.com> Hide RTL related APIs - DO NOT MERGE

- fix bug #6441155 API review: @hide RTL layout APIs

Change-Id: I13c5ea5f579cecffed9d517f06180ab0576cd26a
/frameworks/base/core/java/android/view/View.java
4380f9542fcb4a452332ecbea6a2036a2b159ab3 04-May-2012 Chet Haase <chet@google.com> Merge "Minor doc fixes for animation- and view-related things" into jb-dev
cb150fe9e6495256019b02be51e736679b57c1b5 04-May-2012 Chet Haase <chet@google.com> Minor doc fixes for animation- and view-related things

Issue #6016341 Add info about properties and ViewPropertyAnimator to View reference docs
Issue #6441062 Misleading docs in ViewPropertyAnimator

Change-Id: Ica7c026c770fe2e57013fe443ede5428cd6b6604
/frameworks/base/core/java/android/view/View.java
785c447b2bc625209706fd128ce61781c3a4183b 03-May-2012 Adam Powell <adamp@google.com> JB API cleanup; ActionMode and View docs

Bugs 6435315, 6434937

Add ActionMode#getTitleOptionalHint() and extend documentation for
View#hasTransientState/setHasTransientState

Change-Id: I2049fb79864c33b34e3bbd13df32861e308c99ad
/frameworks/base/core/java/android/view/View.java
2f87014ea2f177e715032b07004d05e2549a63a8 30-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Enabling accessibility focus only if explore by touch is on." into jb-dev
07b726c86b1d0b22e51b08cb4234f8212864d9f9 30-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Enabling accessibility focus only if explore by touch is on.

1. Now we will enable the accessibility focus only if Explore by
Touch is enabled. Enabling this feature allows a blind user to
touch the screen and set the accessibility focus at this
location as well as get spoken feedback. Also an accessibility
service can move the accessibility as a result of user gestures
detected only if Explore by Touch is enabled. Since we will
handle some gestures by default if not accessibility service
does so to provide reasonable built-in navigation of the UI
by "objects" we need the accessibility focus functionality.

bug:6383361

Change-Id: I13ce6072a90f5838c7656379788144c99a772bf0
/frameworks/base/core/java/android/view/View.java
cfcff98ab33e91747bfb4a52e05230dc45323b5a 29-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Populating accessibility node info with supported actions.

1. The system does not allow performing an accessibility action
on an accessibility node info unless it explicitly states it
supports that action. Adding the new accessibility actions
to the info emitted by a view.

bug:6407647

Change-Id: I8dad1dc60ec68b4da5ed2349a1366a88820175a1
/frameworks/base/core/java/android/view/View.java
7a23b49a8ceb07d3fa12c45fd42cd16131fd746a 25-Apr-2012 Philip Milne <pmilne@google.com> Fixes for optical bounds feature.

1. Make the feature opt-in (ViewGroup::layoutMode defaults to CLIP_BOUNDS) without inheritance.
2. Rename COMPONENT_BOUNDS to CLIP_BOUNDS.
3. Rename LAYOUT_BOUNDS to OPTICAL_BOUNDS.
4. Complete GridLayout implementation.
5. Change the default_gap between components to 8dp, to align with the Style Guide.

Change-Id: I8d40dfc5f4ca469f6424eb3ff60d07bec56e3a9f
/frameworks/base/core/java/android/view/View.java
4b8c4f886b3d57e6ffe1a4650487c67334674a40 28-Apr-2012 Romain Guy <romainguy@google.com> New constant used by dev settings

Change-Id: I42f103ae8a9b9f051367c72131f0b216e200f6e0
/frameworks/base/core/java/android/view/View.java
0430ce908510f501276e7f588ba5c34d33a9d27a 25-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Removing hierarchical accessibility focus directions."
b2b15716d8b5b5814e82575a592e76f522f6a4c6 24-Apr-2012 Philip Milne <pmilne@google.com> Merge "Promote layout debugging code from GridLayout to ViewGroup."
76f287e416ded85734b610f316e38d243d2ddb09 23-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing hierarchical accessibility focus directions.

1. The accessibility focus directions are not needed since an
accessibility service just get the root, first child, next
sibling, previous sibling and call execute the action to
give it accessibility focus. Now the accessibility node
info tree is properly ordered taking into account layout
manager directions for both layout manager that we report
and ones that we have determined as not important for
accessibility. Also the position of a node info are ordered
properly based on their coordinates after all transformations
as opposed to child index.

bug:5932640

Change-Id: I994a8297cb1e57c829ecbac73a937c2bcbe0bac7
/frameworks/base/core/java/android/view/View.java
10ca24a97cefc14fca1b26f59e627f487b3b108b 24-Apr-2012 Philip Milne <pmilne@google.com> Promote layout debugging code from GridLayout to ViewGroup.

Layout debugging code draws rectangles around:

1. Layout insets (red)
2. Bounds (blue)
3. Margins (magenta)

Layout debug mode is enabled with:

adb shell setprop debug.layout true

Change-Id: Ia155a2d0fbf33693a1e3c040f627ea3a534e1aff
/frameworks/base/core/java/android/view/View.java
1271e2cc80b01d577e9db339459ef0222bb9320d 20-Apr-2012 Chet Haase <chet@google.com> Remove USE_DISPLAY_LIST_PROPERTIES flag

This flag was still hanging around pending any need to disable
DisplayList properties. But things seem stable, so it's time to clean up
and simplify the code.

At the same time, I reduced redundance in DisplayList dimensions. We
used to call drawDisplayList() with width/height parameters that were
used to do a clip reject. This is redundant with the DisplayList properties
that set the bounds of the DisplayList; the left/right and top/bottom properties
represent the same width/height properties formerly used in drawDisplayList().
The new approach is to not pass dimensions to drawDisplayList(), but to
instead pull those dimensions directly from the DisplayList when needed.

Change-Id: I8871beff03b1d4be95f7c6e079c31a71d31e0c56
/frameworks/base/core/java/android/view/View.java
d6e716dce95089e3acceef2267175d1dba1b4035 21-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding a couple of missing accessibility focus directions.

Change-Id: Id404155591cf3fe5f9bef3ed8fe0d03908944ce1
/frameworks/base/core/java/android/view/View.java
aa780c110922148a6a4ba06734bb2b0bb8c98f93 20-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding support for traversing the content of a node info at granularity.

1. A view that creates an accessibility node info may add to the info
a list of granularity labels. These are granularities by which the
source view can iterate over its content. For example a text view
may support character, word link while a web view may additionally
support buttons, tables, etc. There are actions on accessibility
node info to go to the next/previous at a given granularity which
is passesed as an argument.

2. Added Bundle argument to the APIs for performing accessibility
actions. This is generic and extensible.

bug:5932640

Change-Id: I328cbbb4cddfdee082ab2a8b7ff1bd7477d8d6f9
/frameworks/base/core/java/android/view/View.java
749e796eb3a42e21613a3b360000373601a8f50d 20-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> UI test automation cannot get the root node and gets null children.

1. The AccessibilityInteractionController was using an incorrect
looper i.e. not the UI thread looper which was causing getting
the root node to fail.

2. The AccessibilityNodeInfo was populated by a ViewGroup with the
children for accessibility without checking whether these children
are really displayed.

bug:6362875

Change-Id: I7906d89571eb9d57d10f971639f88632926dd077
/frameworks/base/core/java/android/view/View.java
59a422e90035ce5df45c526607db2d3303e3112e 20-Apr-2012 Jeff Brown <jeffbrown@google.com> Ensure that touch and hover targets are cleared when needed.

When views are removed from a view or a view is detached from
a window, we need to update the touch and hover targets appropriately.

Failing to do this resulted in a NPE while dispatching an
ACTION_HOVER_EXIT to a view that had previously been removed.
Removed views should not get input events.

Change-Id: I4af4f8e2c4028347d3f570894fd1b3b366d11455
/frameworks/base/core/java/android/view/View.java
563d4f2d461d264457b7e7068e2fc7b9b0bcafb3 19-Apr-2012 Chet Haase <chet@google.com> Make ViewPropertyAnimator ListView-animation-capable

ViewPropertyAnimator now sets the hasTransientState flag in View to tell
it when an animation has started (and unsets it when the animation ends).
This allows ListView to retain views with transient state without recycling them,
which makes ListView item animation possible (because you can't animate a View
if it's being recycled and reused elsewhere as it moves into and out of view).

Change-Id: I75c26a7a56474a76428500afef03a80bb46e04e0
/frameworks/base/core/java/android/view/View.java
f37d87b35b9bc860487104b1870f74caa3ae2e71 19-Apr-2012 Chet Haase <chet@google.com> Merge "Fix init of Animation in View drawing code"
1fb8a9e44a5d0710d58c883e087469e95be65b5b 19-Apr-2012 Chet Haase <chet@google.com> Fix init of Animation in View drawing code

The refactor of ViewGroup.drawChild() resulted in an error
in a new method (View.drawAnimation) where animations were being
initialized with their view dimensions instead of the parent dimensions.

Issue #6292681 RotateAnimationTest#testRotateAgainstPoint fails on JRN04
Issue #6293275 TranslateAnimationTest#testInitialize fails on JRN04

Change-Id: Ia90711cadd7a6c20fd788e5b8b18a5b28551e68c
/frameworks/base/core/java/android/view/View.java
eaa0a04f83113e2cafb8c2044ae2107d15dd8036 19-Apr-2012 Philip Milne <pmilne@google.com> Merge "Share Insets instances between views that have the same background (Drawable)"
bbd51f1e360b22eece1d74bd65c7e6a0b59dee59 19-Apr-2012 Philip Milne <pmilne@google.com> Share Insets instances between views that have the same background (Drawable)

Change-Id: I47d93ccca6f553b678d25966d10d7a0a97cfa5ea
/frameworks/base/core/java/android/view/View.java
f01d3dd710e8b86b3e2846af62835158fd4e0db1 18-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Adding some more gestures and actions for accessibility."
005b83b0c62d3d0538f0d566b08bd457015ec661 17-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding some more gestures and actions for accessibility.

1. Added more gesture for accessibility. After a meeting
with the access-eng team we have decided that the current
set of gestures may be smaller than needed considering
that we will use four gestures for home, back, recents,
and notifications.

2. Adding actions for going back, home, opening the recents,
and opening the notifications.

3. Added preliminary mapping from some of the new gestures
to the new actions.

4. Fixed a bug in the accessibility interaction controller
which was trying to create a handled on the main looper
thread which may be null if the queried UI is in the
system process. Now the context looper of the root view
is used.

5. Fixed a bug of using an incorrect constant.

6. Added a missing locking in a couple of places.

7. Fixed view comparison for accessibilityt since it was
not anisymmetric.

bug:5932640
bug:5605641

Change-Id: Icc983bf4eafefa42b65920b3782ed8a25518e94f
/frameworks/base/core/java/android/view/View.java
21d1251637e0b0e23583e8c80d4437fe7e5e57d3 17-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Fixing broken add focusables behavior I have introduced."
3cb889caa3726256bd00976c2662f51a14d91d49 17-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing broken add focusables behavior I have introduced.

bug:6344608

Change-Id: I1d241c02bc22c5ef3f4b4b69a756772e8b2ef902
/frameworks/base/core/java/android/view/View.java
4e1cb3b7942d3ca05918604358b4ef83815ce448 16-Apr-2012 Philip Milne <pmilne@google.com> Merge "Fix for bug 6110465."
4213804541a8b05cd0587b138a2fd9a3b7fd9350 20-Mar-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus - framework

Usefulness: Keep track of the current user location in the screen when
traversing the it. Enabling structural and directional
navigation over all elements on the screen. This enables
blind users that know the application layout to efficiently
locate desired elements as opposed to try touch exploring the
region where the the element should be - very tedious.

Rationale: There are two ways to implement accessibility focus One is
to let accessibility services keep track of it since they
have access to the screen content, and another to let the view
hierarchy keep track of it. While the first approach would
require almost no work on our part it poses several challenges
which make it a sub-optimal choice. Having the accessibility focus
in the accessibility service would require that service to scrape
the window content every time it changes to sync the view tree
state and the accessibility focus location. Pretty much the service
will have to keep an off screen model of the screen content. This
could be quite challenging to get right and would incur performance
cost for the multiple IPCs to repeatedly fetch the screen content.
Further, keeping virtual accessibility focus (i.e. in the service)
would require sync of the input and accessibility focus. This could
be challenging to implement right as well. Also, having an unlimited
number of accessibility services we cannot guarantee that they will
have a proper implementation, if any, to allow users to perform structural
navigation of the screen content. Assuming two accessibility
services implement structural navigation via accessibility focus,
there is not guarantee that they will behave similarly by default,
i.e. provide some standard way to navigate the screen content.
Also feedback from experienced accessibility researchers, specifically
T.V Raman, provides evidence that having virtual accessibility focus
creates many issues and it is very hard to get right.
Therefore, keeping accessibility focus in the system will avoid
keeping an off-screen model in accessibility services, it will always
be in sync with the state of the view hierarchy and the input focus.
Also this will allow having a default behavior for traversing the
screen via this accessibility focus that is consistent in all
accessibility services. We provide accessibility services with APIs to
override this behavior but all of them will perform screen traversal
in a consistent way by default.

Behavior: If accessibility is enabled the accessibility focus is the leading one
and the input follows it. Putting accessibility focus on a view moves
the input focus there. Clearing the accessibility focus of a view, clears
the input focus of this view. If accessibility focus is on a view that
cannot take input focus, then no other view should have input focus.
In accessibility mode we initially give accessibility focus to the topmost
view and no view has input focus. This ensures consistent behavior accross
all apps. Note that accessibility focus can move hierarchically in the
view tree and having it at the root is better than putting it where the
input focus would be - at the first input focusable which could be at
an arbitrary depth in the view tree. By default not all views are reported
for accessibility, only the important ones. A view may be explicitly labeled
as important or not for accessibility, or the system determines which one
is such - default. Important views for accessibility are all views that are
not dumb layout managers used only to arrange their chidren. Since the same
content arrangement can be obtained via different combintation of layout
managers, such managers cannot be used to reliably determine the application
structure. For example, a user should see a list as a list view with several
list items and each list item as a text view and a button as opposed to seeing
all the layout managers used to arrange the list item's content.
By default only important for accessibility views are regared for accessibility
purposes. View not regarded for accessibility neither fire accessibility events,
nor are reported being on the screen. An accessibility service may request the
system to regard all views. If the target SDK of an accessibility services is
less than JellyBean, then all views are regarded for accessibility.
Note that an accessibility service that requires all view to be ragarded for
accessibility may put accessibility focus on any view. Hence, it may implement
any navigational paradigm if desired. Especially considering the fact that
the system is detecting some standard gestures and delegates their processing
to an accessibility service. The default implementation of an accessibility
services performs the defualt navigation.

bug:5932640
bug:5605641

Change-Id: Ieac461d480579d706a847b9325720cb254736ebe
/frameworks/base/core/java/android/view/View.java
1557fd7809078e421f751efc7d2539b3efdc54b2 05-Apr-2012 Philip Milne <pmilne@google.com> Fix for bug 6110465.

Add layout bound metadata to 9-patch files and make layouts take them into account.

This CL contains a proposed API for dealing with layout bounds.

This solution exposes:

1. Class: Insets - for storing layout Insets (and later possibly padding).
2. Methods: View:(get/set)LayoutInsets() - for storing layoutBounds.
3. Methods: ViewGroup:(get/set)LayoutMode() - for controlling layoutMode.

It also iuncudes the changes to GridLayout to support layout bounds.

Change-Id: I60c836b6530b61c5abf37f93ee9c44aad73573f1
/frameworks/base/core/java/android/view/View.java
95487eb90ce8c421ce7baca5b761745bbc1bb14b 12-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Some view not shown on the screen are reported for accessibility."
aa6f3de253db6c0702de0cc40028750c1fcfb22c 10-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Some view not shown on the screen are reported for accessibility.

1. Some applications are keeping around visible views off screen
to improve responsiveness by drawing them in layers, etc. While
such a view is not visible on the screen the accessibility layer
was reporting it since it was visible. Now the check is improved
to verify whether the view is attached, is in visible window,
is visible, and has a rectangle that is not clipped by its
predecessors.

2. AccessibilityNodeInfo bounds in screen were not properly set
since only the top left point was offset appropriately to
take into account any predecessor's transformation matrix
and the not transformed width and height were used. Now
the bounds are properly offset.

bug:6291855

Change-Id: I244d1d9af81391676c1c9e0fe86cf4574ff37225
/frameworks/base/core/java/android/view/View.java
decd3039ca71e5340ec01027170941637bf9876e 12-Apr-2012 Romain Guy <romainguy@google.com> Merge "Don't wait for screen on to finish animations"
eb3788907132eec5724bbb78f20711c4ffe35b1b 12-Apr-2012 Romain Guy <romainguy@google.com> Don't wait for screen on to finish animations

OldAnimationsâ„¢ would set their start time during the first frame drawn
after calling View.startAnimation(). If this method was invoked while
the screen was off, this would cause the animation to start playing
when the screen turned back on.

Change-Id: Ic45a1af2020a7f5e81c2544bd8f16a6bedbd6849
/frameworks/base/core/java/android/view/View.java
db13a6bf788cc48af86c8acf6f74b416dfd84199 12-Apr-2012 Adam Powell <adamp@google.com> Merge "Invalidate for scrolling animations on the animation timer"
4d6a82d79ede0cc1f26e463209f22c691a04626b 11-Apr-2012 Jeff Brown <jeffbrown@google.com> Unhide new animation runnable API on View.

Change-Id: Id626688d6c7d632c01d9897777c854cb601d3301
/frameworks/base/core/java/android/view/View.java
df3ae4f3aea3bdce6bb54133c8a07a26bf207c3c 11-Apr-2012 Adam Powell <adamp@google.com> Invalidate for scrolling animations on the animation timer

Change View methods awakenScrollBars and scrollTo to post their
invalidation on the animation timer. Since these are often used in
computeScroll or similar to continue scrolling or flinging it should
not prevent other posted events from being processed before the frame
is actually drawn. (All changes in scroll position, etc. are
immediately reflected after the calls and do not need a draw to
present correct data about scroll position to apps.)

Don't accumulate floating point error while dragging
ScrollView/HorizontalScrollView.

Change-Id: I05b57d75f89a806488e46a8fb79b85d80f56d45d
/frameworks/base/core/java/android/view/View.java
e8644b695d6c548d2c93e1da7b4a6aff786f1427 06-Apr-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix so that status bar doesn't resize when hiding nav bar."
9801435820dc159725c0185f18f7e60e0fb1b833 06-Apr-2012 Dianne Hackborn <hackbod@google.com> Fix so that status bar doesn't resize when hiding nav bar.

The status bar now extends behind the nav bar, and uses
fitsSystemWindows to ensure its content is not covered. We
always report a stable content insets (as if the nav bar is
visible) even if the nav bar is hidden, so the content doesn't
jump when transitioing. This does mean that if you only hide
the nav bar (and not the status bar), when in landscape you
will end up with a status bar whose right side still leaves
room for the nav bar. But why the hell would you want to do
that?

Also improve documentation on setSystemUiVisibility().

Change-Id: I8087d875f1214ef0085a91b5ed5c2f35ff2fc1b3
/frameworks/base/core/java/android/view/View.java
5012ebbc5c00194236f425403e8771061dc7bf92 06-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Minor twaek to the focus behavior.

bug:6296603

Change-Id: I3bd0b291e6013cae019ca9049d9d3dc506845ab0
/frameworks/base/core/java/android/view/View.java
57cadf2a97a81e5bea49bac573249076ebd95a93 05-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing broken clear focus behavior.

1. In a prevous patch I fixed the issues when on clearing
focus of the first focusable view the callback for
gaining focus were called before the ones for losing
focus. Since it cause some issues the patch was reverted
and resubmitted. In this chaos some code was missed so
tests are failing. Added the missing logic to give focus
to the first focusable in the current touch mode when
a view loses focus.

2. Removed clear focusForRemoval methid since it is a dup
of unFocus();

Note: All focus tests now pass.

Change-Id: I06881d4b5a66fc5a33efca16a96f20207a7220d3
/frameworks/base/core/java/android/view/View.java
24fea55ebb8bcb9e17f3009a80172cb6ee46947d 04-Apr-2012 Philip Milne <pmilne@google.com> Merge "Fix for bug 6104272."
9da0f8a5c4bccf8e722ae2ebf43873457aec3271 14-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Add View textAlignment

- fix bug #6163772
- use bits field and pack them as much as possible
- take care of "supportsRtl" flag from Manifest
- add visual unit tests

CTS unit tests in another CL

Change-Id: Ib77c4eb423854209af130688c5ef9977401a9c1c
/frameworks/base/core/java/android/view/View.java
6c8ea06abfdcd81f728172ac3d3730b542945e48 04-Apr-2012 Philip Milne <pmilne@google.com> Fix for bug 6104272.

Add Java properties for those XML attributes that don't have getter/setter
pairs. Also, link existing methods to their XML attributes where the comments
were previously missing.

This CL is worth extra scruitiny: first because it's View, and secondly
because many of the new APIs depend on subtleties in the underlying implementations
that I'm not familiar with.

Also, please consider whether it is too much to deprecate getBackgroundDrawable().

Change-Id: I0f2641926d86e5f44b92a0057736f64b59d2e9b9
/frameworks/base/core/java/android/view/View.java
21aec19d3041fe040004dd32eef0cfd1bafd6fb6 04-Apr-2012 Chet Haase <chet@google.com> Merge "Optimization of alpha with DisplayList properties"
fde3f83cd26871d2cc904ef05a4f50f272c610e2 03-Apr-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #6140391 Make RTL awareness as an opt-in into the AndroidManifest"
db8c9a6a4d9bf8c39f834b25611926caf21380f6 22-Mar-2012 Chet Haase <chet@google.com> Optimization of alpha with DisplayList properties

Some views (such as ImageView and TextView) handle non-opaque alpha
values directly. This was originally an optimization, but we can handle it faster
in many cases without this optimization when DisplayList properties are enabled.
Basically, if a view has non-overlapping rendering, we set the alpha value directly
on the renderer (the equivalent of setting it on the Paint object) and draw each
primitive with that alpha value. Doing it this way avoids re-creating DisplayLists
while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties.

Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
/frameworks/base/core/java/android/view/View.java
59dfce8bdaf011337530a0dbec7f7280871f9bc9 03-Apr-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6140391 Make RTL awareness as an opt-in into the AndroidManifest

- introduce "supportsRtl" as a new application attribute in the AndroidManifest
- "supportsRtl" default value is FALSE (no RTL support)
- adapt the View layoutDirection and textDirection logic to take care of "supportsRtl" value

Change-Id: I5e4f9f576e14f35dedc6b0c29a7142c397f598e0
/frameworks/base/core/java/android/view/View.java
110414928ae13674b7ec6b816a45cf70ed521683 03-Apr-2012 Joe Fernandez <joefernandez@google.com> am c1a0e54d: am b459b619: am 945b7cb3: Merge "docs: Accessibility Dev Guide (subsumes Accessibility Best Practices)" into ics-mr1

* commit 'c1a0e54de12aee41163b84a25ea8dfc8b64304dc':
docs: Accessibility Dev Guide (subsumes Accessibility Best Practices)
8d56b0e1d24f7392314df4be6503af395a843696 03-Apr-2012 Chet Haase <chet@google.com> Enabling DisplayList properties

An earlier commit fixed problems with enabling DisplayList properties.
This CL actually enables the properties.

Change-Id: I5c41d0c64e9241822af53eb367de0fed7d9608e0
/frameworks/base/core/java/android/view/View.java
9420abd56a2af7ddbeb70562b79d61b2dca8c5a1 30-Mar-2012 Chet Haase <chet@google.com> Re-enable DisplayList properties.

Re-enabling DisplayList properties last week caused some app
errors due to the way that some transforms were being handled (specifically,
those coming from the old Animations and ViewGroup's childStaticTransformation
field). This change pushes *all* transform/alpha data from View.draw() into
the view's DisplayList, making DisplayLists more encapsulated (and correct).

Change-Id: Ia702c6aae050784bb3ed505aa87553113f8a1938
/frameworks/base/core/java/android/view/View.java
e0435a6c6a4464d96f6264374cf0b007b24031a0 02-Apr-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix layout params resolution"
4a5268857eaa28be82ac6766bdfb8affad5c0bab 31-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix layout params resolution

- dont need to check if any parent as getResolvedLayoutDirection() is handling this case

Change-Id: I915b4a72e38d072005e47d3c5a3f63febbef6e60
/frameworks/base/core/java/android/view/View.java
3a3a6cfd8ec12208ca75c0d0d871d19d76c34194 26-Mar-2012 Dianne Hackborn <hackbod@google.com> Add new feature to let apps layout over status bar / system bar.

The main change is a few new flags you can supply to
View.setSystemUiVisibility(). One is a new visibility mode,
SYSTEM_UI_FLAG_FULLSCREEN, which is basically the same as
the global FLAG_FULLSCREEN option for windows, but driven as
part of the system UI state.

There are also three new flags for telling the framework that you
would like to have your application's UI ignore screen
decorations -- SYSTEM_UI_FLAG_LAYOUT_NO_NAVIGATION for going
behind the navigation bar and SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
for ignoring full screen decorations (that is the status bar).

In combination with this you can use SYSTEM_UI_FLAG_LAYOUT_STABLE
to have the framework report consistent insets to your application.

When using NO_NAVIGATION, when the user taps the screen we now
also automatically clear ONLY_CONTENT, so that we atomically show
both UI elements. This should make it easy for apps like video
players that want to move between fully full-screen and regular
modes.

The ActionBar has also been extended when in overlay mode so
that it will adjust the system window insets to also account
for its space, and allow it to be hidden using the new
SYSTEM_UI_FLAG_FULLSCREEN.

Change-Id: Ic8db1adec49a0f420bfe40c1d92eb21307856d0b
/frameworks/base/core/java/android/view/View.java
a08f3e866a46c990e786defa95013ee0313b0887 30-Mar-2012 Jeff Brown <jeffbrown@google.com> Merge "Enable vsync traversals by default."
ebb2d8d708c5c58c79ae88ac2bd10450a856f702 24-Mar-2012 Jeff Brown <jeffbrown@google.com> Enable vsync traversals by default.

Improved how the various callbacks are managed and sequenced
to reduce code duplication.

Added a heuristic to avoid postponing traversals until
the next vsync frame if we did not actually do any drawing during
the previous frame. This helps in the very common case where
drawing occurs in response to input.

Change-Id: I277d9eeaf50408f8745a3cfd181db1d140770658
/frameworks/base/core/java/android/view/View.java
76240dafe8654cc3b858241e76618e5b2db5451c 29-Mar-2012 Chet Haase <chet@google.com> Disable DisplayList properties pending fixes for AlphaAnimation

The new DisplayList properties design has ordering conflicts with the
way that alpha works with old animations (AlphaAnimation). This CL
disables DiksplayList properties while I'm working on a fix and some
more thorough tests for old animations-vs-DL properties in general.

Change-Id: I8f6893138f939171491c2ec3c889214ee55d17b7
/frameworks/base/core/java/android/view/View.java
e1302edd40c5cc264f842e17e3796e0a11d6f045 06-Feb-2012 Joe Fernandez <joefernandez@google.com> docs: Accessibility Dev Guide (subsumes Accessibility Best Practices)

Change-Id: Id7e3f647042d2afd390abe851be1c3b561af33ca
/frameworks/base/core/java/android/view/View.java
b85967b9af76e1e60f7a96603e2567a6449d2e04 26-Mar-2012 Chet Haase <chet@google.com> Re-enabling DisplayList properties

Several issues came up after DisplayList properties were enabled,
so they were disabled pending fixes. Those issues have been fixed, so
DisplayList properties are once again being enabled by default. This
CL both re-enables these properties (in View.java and DisplayListRenderer.h)
and fixes the various issues that enabling them caused the first time around.

Related issues (all currently marked as Fixed, though that was simply because
DL properties were disabled - this CL provides the real fixes now that
DL properties are enabled by default):
Issue #6198276 Text input broken
Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.
Issue #6232010 Layers not recreated when children change (DisplayList properties)

Change-Id: I8b5f9ec342208ecb20d3e6a60d26cf7c6112ec8b
/frameworks/base/core/java/android/view/View.java
0adcd07ccb07ffde93f36c2b42096dacac98ae26 26-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Improve View layoutDirection resolution"
9b0e5991201da7cd74e09c6546d916394ad338ad 26-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix View textDirection refresh"
827d5c09fb4649eca14e87b3d00c53dec44973a6 23-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix View textDirection refresh

- the refresh was no more done correctly after the use of display lists

Change-Id: I5c74bbe565c603fe2e7fd793dd49c3b20036e04b
/frameworks/base/core/java/android/view/View.java
d4577c0c29f8e38a34d1aeac59803b37769af790 24-Mar-2012 Romain Guy <romainguy@google.com> Merge "Destroy the hardware renderer when ViewRootImpl's die is post-poned Bug #6109035"
a998dff5d49a423aaf7097aa8f96bf5bdc681d25 24-Mar-2012 Romain Guy <romainguy@google.com> Destroy the hardware renderer when ViewRootImpl's die is post-poned
Bug #6109035

ViewRootImpl.die() can be invoked in such a way that doDie() will be
executed later. On memory limited device, an eglTerminate() may happen
before doDie() is executed which leads to unstable behaviors. This
change makes sure the renderer is destroyed as soon as possible.

Change-Id: I3322410cdd744b464951e2055aeade6069d1d673
/frameworks/base/core/java/android/view/View.java
22ab7751d47aa9d1e07e8d70706dcf30dac3aae0 24-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Improve View layoutDirection resolution

- make it similar to textDirection
- unhidde also new API: resolveLayoutDirection()

Change-Id: I43c2c2ef32ed6d1f3586781a063271b72e90b9a3
/frameworks/base/core/java/android/view/View.java
2c4eabced0971d3b6b5e76dd925afcb0a7f59f1c 23-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Reduce memory footprint for View (part 2)"
b934db7e3e6d4c3963d2a4a5c00cfb0c3ffbfce4 20-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Reduce memory footprint for View (part 2)

- make textDirection use private bits field
- update layoutDirection usage of private bits

Change-Id: Ib9f4da58dbb74f410fb9d3be3c26ef02579aaf1d
/frameworks/base/core/java/android/view/View.java
ad13c81371cb0b7e49b4c33159a346ce08ac5d69 22-Mar-2012 Chet Haase <chet@google.com> Disable DisplayList properties

DisplayList properties are (again) disabled by default, via flags in
View.java and DisplayListRenderer.h. There are various artifacts to
chase down before enabling by default.

Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.

Change-Id: I045dc82ce1d85fedbae3bb88eb2a2dfb6891d41f
/frameworks/base/core/java/android/view/View.java
b6f90cf846f67fca66197cce7ac214477ebfc727 21-Mar-2012 Chet Haase <chet@google.com> Merge "Fix Animation bugs from DisplayList properties integration"
89b7f2e3be7e08fd751b348096a40ae5eb5f6a8f 21-Mar-2012 Chet Haase <chet@google.com> Fix Animation bugs from DisplayList properties integration

The new DisplayList properties functionality does not currently handle Animation
(android.view.animation) functionality, so we fall back to the previous approach
of redrawing the DisplayList when an Animation changes alpha/transform data for
a View. The DL code was not, however, correctly using that logic, so that
the Animation transform information was being ignored, or at least not set
correctly on the DisplayList during redraws.

This fix accounts for Animation changes and sets up the DisplayList correctly.

Change-Id: I9f6e0382b05d0627f4779f30e74641dedcc77f82
/frameworks/base/core/java/android/view/View.java
6077fc9b7f22e2eb7199167e26bccc8f97957f60 20-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Reduce memory footprint for View"
edc1e59b34c7f813ad197545b1d846e3a99a6831 16-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Reduce memory footprint for View

- make layout direction use private bit fields
- fix also some Javadoc issues

Change-Id: I977a328d671b91aa82cb275767e3575f78695508
/frameworks/base/core/java/android/view/View.java
bdd896c26453ffc56831b0cd167e8780068cee53 19-Mar-2012 Chet Haase <chet@google.com> Enable DisplayList properties

This CL simply enables DisplayList property functionality. The code for
this feature is already there, but it's been disabled by default pending further
testing and analysis. This change sets these build-type flags to true
so that all hw-accelerated apps will now use DisplayList properties by default.

In particular, this feature enables a fast-path for changes that affect the
handful of View properties involved in animations (alpha, translationX, etc.).
Setting these properties now gets propagated to the native DisplayList associated
with the View, avoiding costly recreation of the SDK-level DisplayList and
also enabling faster invalidation of the view hierarchy.

Change-Id: Ic99c8f28fa9183f2e54e9e4860b333eb9c540f7c
/frameworks/base/core/java/android/view/View.java
4bf8b209955e8a35ec2e4101ed3612e03ecc5dbb 16-Mar-2012 Chet Haase <chet@google.com> Merge "Optimizing DisplayList properties"
9d1992deaeb3d60d5928f05b649a2cc654ba98a3 13-Mar-2012 Chet Haase <chet@google.com> Optimizing DisplayList properties

DisplayList properties are still disabled default (flags in View.java
and DisplayListRenderer.h). When they are enabled, and when a View has
a DisplayList, invalidations due to property changes are now optimized
to avoid causing DisplayList recreation. This eliminates the drawing step
of invalidation (due to changes in these properties), only requiring
issuing the previously-created DisplayList to the GL renderer. Invalidation
is slightly faster (less overhead as we walk up the hierarchy), getDisplayList()
is potentially much faster (going down to ~0ms), depending on the complexity
of the View being redrawn and the size of the invalidated hierarchy.

Change-Id: I57587d5b810c3595bdd72a6c52349c2a3d1bdf25
/frameworks/base/core/java/android/view/View.java
51e4d4db296c252641161b39e98f49acebc46062 16-Mar-2012 Romain Guy <romainguy@google.com> Better implementation to clear display lists

Change-Id: I58f9af4bae70a8117db1455a50c0c5daf19b2f4a
/frameworks/base/core/java/android/view/View.java
c6e8811cb48014d541bc6f85b4b7f92643af8591 16-Mar-2012 Romain Guy <romainguy@google.com> Merge "Postpone DisplayList recycling when detached from window"
bc7616eae90002879f1d82d5e99dea7d1152b742 15-Mar-2012 Romain Guy <romainguy@google.com> Postpone DisplayList recycling when detached from window

This was causing a crash in apps that remove views during a draw pass.

Change-Id: I1c4621639fe920291b2c6fb7bfd17a69101a1329
/frameworks/base/core/java/android/view/View.java
e82a54aedc45ed2c06e62a14947d4f56c823221d 15-Mar-2012 Chet Haase <chet@google.com> Merge "Fix bug with transform Animations"
bcbec0ccd07d04597992d7ab0dede34288ba31f3 15-Mar-2012 Chet Haase <chet@google.com> Fix bug with transform Animations

A recent change to enable View properties at the native DisplayList level
mistakenly cuased Animation transforms get be ignored for any View with
a DisplayList. The correct code should have checked whether DL properties
were enabled for the view (disabled by default for now).

Issue #6173975 Animations are gone

Change-Id: I5d5f53f854fb1b533a3150158e84392d7283d2a8
/frameworks/base/core/java/android/view/View.java
605eabf6a24ab3541de559b242147900b23706ed 14-Mar-2012 Michael Jurka <mikejurka@google.com> Merge "Fix hardware layer redraw bug"
952e02b430bb95534416ec689f08a792aca0b853 14-Mar-2012 Michael Jurka <mikejurka@google.com> Fix hardware layer redraw bug
/frameworks/base/core/java/android/view/View.java
a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3 21-Feb-2012 Chet Haase <chet@google.com> Handle view properties at the native level

Basic functionality of handling View properties (transforms,
left/right/top/bottom, and alpha) at the native DisplayList level.
This logic is disabled for now (via compile-time flags in View.java and
DisplayListRenderer.h) as we continue work on it (there is no advantage
to the new approach until we optimize invalidation and rendering paths
to use the new code path).

Change-Id: I370c8d21fbd291be415f55515ab8dced6f6d51a3
/frameworks/base/core/java/android/view/View.java
30a21e1bfea21ba2170e42eb187a2ec1bbbcf2c7 12-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Improve View Javadoc for padding

Change-Id: Ib7c8ee5bcde57e112ba0bb700fed9f2a135b1cdb
/frameworks/base/core/java/android/view/View.java
05f692e8050c3650ec123b2361143a121e2e7d4b 12-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Make Gravity RTL APIs public"
e8dc07dcdb983d5d3999b16c2a49ddee4bdb942c 10-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Make Gravity RTL APIs public

- also move unit tests to CTS
- also small improvement for View Javadoc

Change-Id: I166d5a10f4a00f1b46c90468c8b11906b438e1ea
/frameworks/base/core/java/android/view/View.java
559c4841a631321efc2284de9187dbaccce50550 10-Mar-2012 Ken Wakasa <kwakasa@google.com> Merge "Fix obvious typos under frameworks/base/core"
3162225d51c62cd6f0e89edc5fe272adbc8ddc39 10-Mar-2012 Jeff Brown <jeffbrown@google.com> Merge "Don't remove all animation callbacks if action/who was null."
43ea54bdc343a913f62885304796e4ab1bca4ef1 09-Mar-2012 Jeff Brown <jeffbrown@google.com> Don't remove all animation callbacks if action/who was null.

Fixes a bug in View.removeCallbacks and View.unscheduleDrawable
where it was possible for the caller to remove all animation
callbacks if it happened to specify an action or who parameter
of null.

Also refactored the callback queueing code in Choreographer
to make it more intent revealing although the behavior remains
the same.

Bug: 6144688
Change-Id: Iba29dcda6b3aaad73af664bb63feab65ae3483e5
/frameworks/base/core/java/android/view/View.java
2bff6407793917d69653542a73525a72a53dd6cc 09-Mar-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Adding an announcement type accessibility event and a method on View to announce."
51ab90cab1609cf0ddd2dfe5a660f020d823d4d5 09-Mar-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding an announcement type accessibility event and a method on View to announce.

1. The need for sending an accessibility event to announce a context change
which does not cleanly fit into the existing UI transition UI events has
come quite a few time in application development. To avoid retrofitting
accessibility event types that do not semantically match the intent to
just announce a short message this patch is adding specialized event type.
Also a helper method on View is added to sheild developers from knowing
how to construct and send such an event.

bug:5977979

Change-Id: Iaf5f620426f8616be67fbf243a02ad5b606c949b
/frameworks/base/core/java/android/view/View.java
f76a50ce8fdc6aea22cabc77b2977a1a15a79630 09-Mar-2012 Ken Wakasa <kwakasa@google.com> Fix obvious typos under frameworks/base/core

Change-Id: Ia5fc3db1bb51824e7523885553be926bcc42d736
/frameworks/base/core/java/android/view/View.java
df813c03b16ed32c25a8c8fee82a7a98088ac940 09-Mar-2012 Jeff Brown <jeffbrown@google.com> Merge "Use the Choreographer for Drawable animations."
1e3d313c7802673cb5a350fdbbe458398a038fcf 09-Mar-2012 Romain Guy <romainguy@google.com> Fix the docs

Change-Id: I73bcb684eac01db870936aa5e29df930b5432833
/frameworks/base/core/java/android/view/View.java
bb9908b828a8cfd5965553be66faa6af89973697 08-Mar-2012 Romain Guy <romainguy@google.com> Dispatch screen state change events to Views
Bug #6120957

Using this new callback, views can interrupt and resume their
animations or other periodic tasks based on the current state
of the display.

Change-Id: I398f4abd421e9c5f207107bf1009a7b92cf45daa
/frameworks/base/core/java/android/view/View.java
3bef5e9f3aa90465ee3ab66ef33d7a88d1b0c5c1 08-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix View padding resolution"
250069bf6bf3d7e2ef85c49e0cd100e80c3c8b7d 08-Mar-2012 Romain Guy <romainguy@google.com> Merge "Ignore draw requests when the display is off"
7ae9d5faad5816f7e567ec1ec77e78d746cf7e5c 06-Mar-2012 Jeff Brown <jeffbrown@google.com> Use the Choreographer for Drawable animations.

Change-Id: Ifcbf33434bf3c32d1900fd0b3f5bde004604ce8a
/frameworks/base/core/java/android/view/View.java
509708deb8d70def41be56145df07f9331f48c84 07-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix View padding resolution

- make setPadding() and setPaddingRelative() share same code

Change-Id: Iaefa82deb29d9efd6b3f88c751daf503c6b8f774
/frameworks/base/core/java/android/view/View.java
1ce1307641c3eba06d945ed3b257ad4ce28ba56e 07-Mar-2012 Michael Jurka <mikejurka@google.com> Merge "Don't draw layers in buildLayer()"
7e52caf6db5feef2b847cfaa3d13690257122c3a 07-Mar-2012 Michael Jurka <mikejurka@google.com> Don't draw layers in buildLayer()

Creating the layer, if necessary, takes the bulk
of the time - just do the creation, and schedule a
deferred update

Change-Id: I21399ebd5d2929a4f242ec1c08e3f97fed1ef58a
/frameworks/base/core/java/android/view/View.java
1ecebbb27fc45f4ef503d866f2702bca565a089c 07-Mar-2012 John Reck <jreck@google.com> Fix FOCUS_BACKWARD search if view had no id

Bug: 6126875

Change-Id: I113a7125d71dc3e6cc34d31a669e844a4a882266
/frameworks/base/core/java/android/view/View.java
faeac2737de098269a69011f4980a412559b55a9 06-Mar-2012 Jeff Brown <jeffbrown@google.com> Merge "Change widgets to post invalidate to the animation timer."
6cb7b46c56449e84434b11eb12f9b8977fcd0398 05-Mar-2012 Jeff Brown <jeffbrown@google.com> Change widgets to post invalidate to the animation timer.

Change-Id: I8377e924529fb9d8afd8a834003a17de616e8e87
/frameworks/base/core/java/android/view/View.java
7e4e561bc717a6eea4e0d06ec4173ad27420425f 05-Mar-2012 Romain Guy <romainguy@google.com> Ignore draw requests when the display is off

When WindowManagerService's events are enabled/disabled, the state of the
display is dispatched to the known windows. This allows ViewRootImpl to
ignore draw requests until the screen is turned back on. This can potentially
lead to significant battery savings. For instance, a launcher widget showing
a repeating animation will cause the CPU and the GPU to wake up regularly
without this change.
(Change submitted by Intel and merged manually)

Change-Id: I7f93b0e60c3e6de1705f619e80860c36b1cdb978
/frameworks/base/core/java/android/view/View.java
21452d1adaeb20f453e8e5cac188cec1d89e01f6 05-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #6029615 Update Javadoc for onPaddingChanged()"
085585f4665aa7390a7d56ce479bed43e78bb470 05-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6029615 Update Javadoc for onPaddingChanged()

Change-Id: I5d66bc76d7084777342e66e6370bf3a52e878ba1
/frameworks/base/core/java/android/view/View.java
fb9c41c2060497a459d16c30122e1d082895e5d1 05-Mar-2012 Romain Guy <romainguy@google.com> Merge "Deferred layer updates"
2bf68f063b0077ddef6ebfe54f2ae5e063c2c229 02-Mar-2012 Romain Guy <romainguy@google.com> Deferred layer updates

Change-Id: I83d9e564fe274db658dcee9e0cc5bbf9223ebb49
/frameworks/base/core/java/android/view/View.java
1a7dd039f189036709bc2253ba50955913f59d7a 01-Mar-2012 Adam Powell <adamp@google.com> Unhide transient state APIs on View

Change-Id: I0f14728c94cd3461431352e6f01311934aec9858
/frameworks/base/core/java/android/view/View.java
dd3ef2c573396271c7c3b71e30fbd10cf66d3bc0 02-Mar-2012 Fabrice Di Meglio <fdimeglio@google.com> Improve RTL APIs

- follow changed / reset pattern

Change-Id: I1c5e9b39196029bd78add2ab13b984da124822ca
/frameworks/base/core/java/android/view/View.java
98aec1c7efa639ac902d1200a3ac5a4a7a140129 14-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Make layoutDirection API public

Change-Id: Ie125513e4ea72b33b42355dbc43f9b9b6d46d7eb
/frameworks/base/core/java/android/view/View.java
3fb824bae3322252a68c1cf8537280a5d2bd356d 29-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5217606 LocaleUtils constants TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE and TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE should be renamed

- replace them by the View constants

Change-Id: I7c2bf0213319247d3db369b6f7c36771fdf3e509
/frameworks/base/core/java/android/view/View.java
035a1fcd5ea3ac0080bb74101cf2793ccb9aa689 28-Feb-2012 Adam Powell <adamp@google.com> View pressed state dispatching tweaks

Bugs 6075823, 6050563

Revise pressed state dispatch logic:

Only propagate pressed state to non-clickable views. This should
eliminate the "double glow" problem in some list items where a
clickable child button has a secondary glow along with a clickable
parent. This only applies to setPressed(true) calls; setPressed(false)
must propagate. Don't early-out in setPressed to support this use
case.

Change-Id: Ibbe2309f5030282fad8d23e4a9bc4616b3f5dc7c
/frameworks/base/core/java/android/view/View.java
2822111948d4a8c0632b1a3150051b8d27a63ee6 23-Feb-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Add check for no children in VIew hosting virtual view tree."
311a63af40e76925e21dcf273749dcab9d598ddd 23-Feb-2012 Svetoslav Ganov <svetoslavganov@google.com> Add check for no children in VIew hosting virtual view tree.

1. For accessibility purposes View may report a virtual tree
rooted at them to convey the logical structure they draw.
These are usually custom Views. Such views cannot have
children and this patch adds a check for that.

bug:6022217

Change-Id: I3795a613b4aef1a7ec5810db8584a11b648870f2
/frameworks/base/core/java/android/view/View.java
5160e2a197624cc5d43b1cddec2341e8dc661ef1 22-Feb-2012 John Reck <jreck@google.com> Add null parent check to startActionMode

Bug: 6012515

Change-Id: I9f684bf0fd314285c4d4933ba2a7645f10c9dc7b
/frameworks/base/core/java/android/view/View.java
4d6f066b19f654917bbbd4650a68bea79a471270 22-Feb-2012 Adam Powell <adamp@google.com> Have View call setPressed explicitly instead of just twiddling flags.

This allows apps to override setPressed to reliably observe changes in
pressed state for custom views.

Change-Id: I59f472a9d864f4abcc4f692fef0a13f004348432
/frameworks/base/core/java/android/view/View.java
539ee8716b4f81260bab2e9f3dc5d88d81c99985 04-Feb-2012 Adam Powell <adamp@google.com> Add transient state tracking to Views

Transient state is temporary bookkeeping that Views need to perform
that the app should not need to be aware of. Examples include text
selection regions and animation state.

Transient state is a problem for AdapterViews like ListView that do
view recycling. Unless the app takes responsibility for tracking and
restoring transient state as if it were a part of the adapter's data
set, it cannot correctly recycle views. Selections disappear when an
EditText is scrolled out of sight and animations seem to play on the
wrong views.

Views can now flag themselves as having transient state. (As the name
implies, this should be a temporary condition.) If a ViewGroup
contains a child with transient state, that ViewGroup also has
transient state.

AbsListView's recycler now tracks views with transient state
separately. Views with transient state will be retained, and until a
data set change occurs the same view will be reused for that position
instead of calling the adapter's getView() method.

The API to set and check transient state is currently hidden.

Change-Id: Idfd8eaac2c548337686d8d9f98fda4c64be5b8a0
/frameworks/base/core/java/android/view/View.java
6917e6550d2dc11ad3b794be08cc9caa53970d32 18-Feb-2012 Romain Guy <romainguy@google.com> Merge "Record possible clip rejects when recording display lists"
33f6beb10f98e8ba96250e284876d607055d278d 17-Feb-2012 Romain Guy <romainguy@google.com> Record possible clip rejects when recording display lists

This optimization allows us to quickly skip operations that lie
entirely outside of the known bounds of a display list. Because
of ViewGroup.setClipChildren, we must keep the operations recorded
in the display list. setClipChildren(false) is however a very
uncommon operation and we will therefore often benefit from this
new optimization.

Change-Id: I0942c864e55298e6dccd9977d15adefbce3ba3ad
/frameworks/base/core/java/android/view/View.java
50eb3b9bf9bf0b014ad19066951b6c1dffd4e3f3 17-Feb-2012 Jeff Brown <jeffbrown@google.com> Merge "Encapsulate the ViewRootImpl's handler."
101d5aade4a280a4c553e3ef3aa24faf388a207f 17-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix #5050417 Update View class Javadoc for padding start / end

Change-Id: Iec9533616d94e4a738378bafeb1867dd74e53127
/frameworks/base/core/java/android/view/View.java
30e2fbe0d2565952928feaf9d3d9194340113af4 17-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Improve textDirection APIs"
6d3d5057b445069e73fd06adbc11fa412e7c48c3 16-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Improve textDirection APIs

Change-Id: I8bff30f5adb0ab4077145d83ac4a716e04f289ac
/frameworks/base/core/java/android/view/View.java
069bbe79fbb35b7cc09048118cf42a929be0ed31 17-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix Javadoc for View

Change-Id: Iccae458320273253637017c6f32329150bae479e
/frameworks/base/core/java/android/view/View.java
23677064730117feefff3d477ecf5f93baf28704 16-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Add View.onResolvePadding() as a public API"
a175a5b7ea3682cb58cca7f9726d0b8171cd549d 16-Feb-2012 Jeff Brown <jeffbrown@google.com> Encapsulate the ViewRootImpl's handler.

This change makes it much easier to make sense of the messages that
get posted to the ViewRootImpl's handler by encapsulating their point
of dispatch within the ViewRootImpl itself.

As part of this change, the View.AttachInfo now carries a reference
to the ViewRootImpl itself, which simplifies some code that used
to try to find the ViewRootImpl by getting the root view's parent.

In principle, it might have been nice to hide the ViewRootImpl from
the View hierarchy but in practice the two were coupled in many ways.

Change-Id: I51ebccdf5f8c8c505cd6f17cdf594174d041dc54
/frameworks/base/core/java/android/view/View.java
f7280ccbfe6d71686a4e609ee7628f84e514a32d 16-Feb-2012 Romain Guy <romainguy@google.com> Merge "Add a compile time condition to remove unnecessary code"
fe455af277183f910eb74653a3ad172c717e7abf 16-Feb-2012 Romain Guy <romainguy@google.com> Add a compile time condition to remove unnecessary code

Change-Id: Ia44916af8e22e548fbb62cb2b53da285d5959102
/frameworks/base/core/java/android/view/View.java
ccb1562e90d955416b9096d802464e37925486ef 16-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Add View.onResolvePadding() as a public API

- following a comment from Dianne on this CL:

Change-Id: Ifa11d6ac423f205d0684297d25885eac1a89f279
https://android-git.corp.google.com/g/#/c/123009/1
/frameworks/base/core/java/android/view/View.java
2c884826b23e5c8cd3c9497a781c631927b74819 15-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Make View paddingStart and paddingEnd API public

Change-Id: I39fd987c866e8bfadbaa9a29c0e38b3b7ce03f7e
/frameworks/base/core/java/android/view/View.java
b36a0ac9709e9e1c7098559c0435cfbdc09e6c46 15-Feb-2012 Svetoslav Ganov <svetoslavganov@google.com> Incorrect behavior of View clear focus v2.0.

The framework tries to have a focused view all the time. For
that purpose when a view's focus is cleared the focus is given
to the first focusable found from the top. The implementation
of this behavior was causing the following issues:

1. If the fist focusable View tries to clear its focus it
was getting focus but the onFocusChange callbacks were not
properly invoked. Specifically, the onFocusChange for
gaining focus was called first and then the same
callback for clearing focus. Note that the callback
for clearing focus is called when the View is already
focused.

2. If not the first focusable View tries to clear focus,
the focus is given to another one but the callback
for getting focus was called before the one for clearing,
so client code may be mislead that there is more than
one focused view at a time.

3. (Nit) The implementaion of clearFocus and unFocus in ViewGroup
was calling the super implementaion when there is a
focused child. Since there could be only one focused View,
having a focused child means that the group is not focused
and the call to the super implementation is not needed.

4. Added unit tests that verify the correct behavior, i.e.
the focus of the first focused view cannot be cleared
which means that no focus change callbacks are invoked.
The callbacks should be called in expected order.
Now the view focus clear precedes the view focus gain
callback. However, in between is invoked the global
focus change callback with the correct values. We may
want to call that one after the View callbacks. If
needed we can revisit this.

Change-Id: I8cfb141c948141703093cf6fa2037be60861cee0
/frameworks/base/core/java/android/view/View.java
dd29f8c4e3db3338bc055302145c3bc51a27566f 15-Feb-2012 Amith Yamasani <yamasani@google.com> Merge "Revert "Incorrect behavior of View clear focus.""
73eb97f628b298c7bd032aa9db11dadf05f5b539 15-Feb-2012 Amith Yamasani <yamasani@google.com> Revert "Incorrect behavior of View clear focus."

This reverts commit c6fd88e213703a581fe4680259981f09ae0444f2
/frameworks/base/core/java/android/view/View.java
d7c845c39a5585bd23952639d1a03f2fa603a0f1 14-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Make textDirection API public"
bcca79acb1ed31238a80079930bc69f8b9d8cceb 14-Feb-2012 Chet Haase <chet@google.com> Refactor animation code in new Draw() method into its own method.

Ongoing cleanup of View drawing code, continuation of drawChild() refactoring.

Change-Id: I6d7383bb858d39ced6917d559defe7713e53de38
/frameworks/base/core/java/android/view/View.java
4212d3fc736712d6e5fb69d5067ce8d9a83806ef 14-Feb-2012 Chet Haase <chet@google.com> Merge "Refactor ViewGroup.drawChild() into View.draw()"
e7beae3f4c9c170c7c6c42cf9b572f0ee1ec9c81 14-Feb-2012 Fabrice Di Meglio <fdimeglio@google.com> Make textDirection API public

Change-Id: I2d5a0e3a990b9a5b78a3bbc8df7f655702743e4b
/frameworks/base/core/java/android/view/View.java
64a48c1d3daca9e0565f2aa4d56f6e94ea073d9b 14-Feb-2012 Chet Haase <chet@google.com> Refactor ViewGroup.drawChild() into View.draw()

Some of the ongoing and upcoming jank work involves having
Views optimize their rendering. For example, it would be more
efficient for native display lists to be able to redraw themselves with
updated transform/alpha properties than it would be to do it the
way we do now, which causes view hierarchy invalidation and display
list recreation.

In order to do this, we need to push more intelligence for view
rendering into the Views themselves, rather than the complicated
mechanism we have now of ViewGroup handling some View properties
(transforms and alpha) and the Views handling the rest of their
rendering.

The first step toward this is to take the current drawChild() method
and push it into a new, package-private method in View that does the
same thing.

Future checkins will refactor the code further, simplifying it and
eventually optimizing around view property changes.

Change-Id: Id44b94536fc3ff80b474db7ef06862f4f51eedce
/frameworks/base/core/java/android/view/View.java
d7dd89095ff2041f0793317c4ee8e8be49388148 27-Jan-2012 Philip Milne <pmilne@google.com> New hooks to allow layouts to improve their performance by doing more caching

This change allows layouts to be notified of changes to LayoutParameters that have occurred
between layout operations.

If an assignment is made to the fields of LayoutParams instances that are already in use,
cachced data may become inconsistent with the new values. For complex layouts, like
GridLayout, in which the layout parameters define the structure of the layout, caching
could have caused ArrayOutOfBoundsException to be raised without this change. This case is
rare in normal code as initialisation is typically performed once. Its nevertheless possible
and much more likely in environments like design tools where layout parametrs may be being
edited on the fly.

Prevent errors as follows (belt and braces):

1. Change javadoc to request that changes to the fields of LayoutParams be accompanied with
a call to View.setLayoutParams(). (This calls requestLayout() which was what the previous
javadoc advised.) Provide a (for now, private) hook for layouts with caches to receive notification
of such calls so they can invalidate any relevant internal state.

2. For GridLayout, we cannot clone layout parameters as traditional Java grids do without retaining
two complete copies because of the public getLayoutParameters() method on View. Retaining two
copies is wasteful on constrainted devices. Instead, we keep just one copy and compute a hashCode
for the critical fields of a GridLayout's layoutParams. The hashChode is checked it prior to all
layout operations; clearing the cache and logging a warning when changes are detected, so that
developers can fix their code to provide the call to setLayoutParams() as above.

Change-Id: I819ea65ec0ab82202e2f94fd5cd3ae2723c1a9a0
/frameworks/base/core/java/android/view/View.java
967e2bf3ac8943a8e8a374bf86021915445cda67 08-Feb-2012 Romain Guy <romainguy@google.com> Preliminary support for clipRect(Rect, Op)

This adds basic support for clip regions. It is currently disabled at compile
time. Enabling clip regions will require setting up a stencil buffer.

Change-Id: I638616a972276e38737f8ac0633692c3845eaa74
/frameworks/base/core/java/android/view/View.java
a33de55404eb2133d1bae2add3f6e8708459f56d 04-Feb-2012 Chet Haase <chet@google.com> Make the TimeAnimator class public.

This class has existed since ICS, but was hidden. This change
just makes it public API.
Also, cleaned up some internal javadocs.

Change-Id: Id69408446ced183e01d2b065a67397eb305d9665
/frameworks/base/core/java/android/view/View.java
a553113a1f88e112b0999c12c7c2e8d724ed7fa8 02-Feb-2012 Chet Haase <chet@google.com> Fix bug in LayoutTransition that caused views to stay invisible

LayoutTransition side-effects the alpha property on View to fade views
in and out. This works fine if the layout transition is always used on
those views' container. But if you fade out a disappearing view and then
set the transition to null on the container and set that view to VISIBLE,
there is no transition logic to restore the alpha value to 1 (opaque).

The fix is to always restore alpha to its pre-animation value when fading
the view out.

Also, added extra info to alpha and the various View transform properties
to help hierarchyviewer debugging.

Issue #5958434: LayoutTransition temporary disablement may leave some views invisible

Change-Id: I3c21b0e7334dc29c10c5e372b589f0e2b59c2883
/frameworks/base/core/java/android/view/View.java
13fd561848ec43573d4cfeec899b4d308841c251 02-Feb-2012 Svetoslav Ganov <svetoslavganov@google.com> Update the comment for View#clearFocus

Change-Id: I779f94e88821574c74e5e76d99ae555a47042c12
/frameworks/base/core/java/android/view/View.java
2eecea3b48ece6f45b30fef9b41dc20075ccc94f 01-Feb-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Speedup the accessibility window querying APIs and clean up."
1e56fff3b90946b342ddabf68648dc3551ce47db 31-Jan-2012 Romain Guy <romainguy@google.com> Merge "Add debug markers to OpenGLRenderer"
13631f3da855f200a151e7837ed9f6b079622b58 31-Jan-2012 Romain Guy <romainguy@google.com> Add debug markers to OpenGLRenderer

These markers will be used to group the GL commands by View in the
OpenGL ES debugging tool. This will help correlate individual GL
calls to higher level components like Views.

Change-Id: I73607ba2e7224a80ac32527968261ee008f049c6
/frameworks/base/core/java/android/view/View.java
12df3cf156885a421beccfa6b6e20fd1a188847a 31-Jan-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Incorrect behavior of View clear focus."
0d29936ec3b5545a415e8d032150ea987aab36e3 26-Jan-2012 Chet Haase <chet@google.com> Fix bug in LayoutTransition for INVISIBLE views

When a view is becoming VISIBLE or INVISIBLE in a container with a
LayoutTransition, animations run to fade the view in and out and also
to run 'changing' animations on the view's other siblings. This logic
also cancels any running 'changin' animations to account for new ones
running.

However, in the specific case of INVISIBLE changes, there will be no
layout changes in the container - layout has already accounted for that
view (unlike in the case of GONE views); the visibility is just a matter of
drawing the view (or not). Therefore, we're canceling 'changing' animations
that should continue running and not replacing them with any other animations,
since new animations would only be started on layout chnages which are not
forthcoming.

One artifact seen from this bug is that the navigation bar buttons sometimes
disappear when changing orientation. This is because the menu button may
toggle between VISIBLE and INVISIBLE, causing animations on the other
buttons to get canceled, which leaves those views in a completely wrong
state.

The right thing to do is to avoid canceling in-process 'changing' animations
and to skip the logic of setting up new 'changing' animations which won't fire
anyway.

There is some minor API work in here because we did not previously have the
necessary information in LayoutTransition to know whether a view was being
hidden or shown to/from the INVISIBLE state.

Issue #5911213: LayoutTransitions ending in an odd state

Change-Id: I5c60c8583c8ea08965727b4ef17b550c40a3882c
/frameworks/base/core/java/android/view/View.java
c6fd88e213703a581fe4680259981f09ae0444f2 26-Jan-2012 Svetoslav Ganov <svetoslavganov@google.com> Incorrect behavior of View clear focus.

The framework tries to have a focused view all the time. For
that purpose when a view's focus is cleared the focus is given
to the first focusable found from the top. The implementation
of this behavior was causing the following issues:

1. If the fist focusable View tries to clear its focus it
was getting focus but the onFocusChange callbacks were not
properly invoked. Specifically, the onFocusChange for
gaining focus was called first and then the same
callback for clearing focus. Note that the callback
for clearing focus is called when the View is already
focused. Also note that at the end the View did not
clear its focus, hence no focus change callbacks
should be invoked.

2. If not the first focusable View tries to clear focus,
the focus is given to another one but the callback
for getting focus was called before the one for clearing,
so client code may be mislead that there is more than
one focused view at a time.

3. (Nit) The implementaion of clearFocus and unFocus in ViewGroup
was calling the super implementaion when there is a
focused child. Since there could be only one focused View,
having a focused child means that the group is not focused
and the call to the super implementation is not needed.

4. Added unit tests that verify the correct behavior, i.e.
the focus of the first focused view cannot be cleared
which means that no focus change callbacks are invoked.
The callbacks should be called in expected order.
Now the view focus clear precedes the view focus gain
callback. However, in between is invoked the global
focus change callback with the correct values. We may
want to call that one after the View callbacks. If
needed we can revisit this.

Change-Id: Iee80baf5c75c82d3cda09679e4949483cad475f1
/frameworks/base/core/java/android/view/View.java
79311c4af8b54d3cd47ab37a120c648bfc990511 18-Jan-2012 Svetoslav Ganov <svetoslavganov@google.com> Speedup the accessibility window querying APIs and clean up.

1. Now when an interrogating client requires an AccessibilibtyNodeInfo
we aggressively prefetch all the predecessors of that node and its
descendants. The number of fetched nodes in one call is limited to
keep the APIs responsive. The prefetched nodes infos are cached in
the client process. The node info cache is invalidated partially or
completely based on the fired accessibility events. For example,
TYPE_WINDOW_STATE_CHANGED event clears the cache while
TYPE_VIEW_FOCUSED removed the focused node from the cache, etc.
Note that the cache is only for the currently active window.
The ViewRootImple also keeps track of only the ids of the node
infos it has sent to each querying process to avoid duplicating
work. Usually only one process will query the screen content
but we support the general case. Also all the caches are
automatically invalidated so not additional bookkeeping is
required. This simple strategy leads to 10X improving the
speed of the querying APIs.

2. The Monkey and UI test automation framework were registering a
raw event listener for accessibility events and hence perform
connection and cache management in similar way to an AccessibilityService.
This is fragile and requires the implementer to know internal framework
stuff. Now the functionality required by the Monkey and the UI automation
is encapsulated in a new UiTestAutomationBridge class. To enable this
was requited some refactoring of AccessibilityService.

3. Removed the *doSomethiong*InActiveWindow methods from the
AccessibilityInteractionClient and the AccessibilityInteractionConnection.
The function of these methods is implemented by the not *InActiveWindow
version while passing appropriate constants.

4. Updated the internal window Querying tests to use the new
UiTestAutomationBridge.

5. If the ViewRootImple was not initialized the querying APIs of
the IAccessibilityInteractionConnection implementation were
returning immediately without calling the callback with null.
This was causing the client side to wait until it times out. Now
the client is notified as soon as the call fails.

6. Added a check to guarantee that Views with AccessibilityNodeProvider
do not have children.

bug:5879530

Change-Id: I3ee43718748fec6e570992c7073c8f6f1fc269b3
/frameworks/base/core/java/android/view/View.java
5a89672f3ef0781f0c28e63ee774970340dbb4dd 23-Jan-2012 Michael Jurka <mikejurka@google.com> Merge "Remove fastInvalidate and setFast* methods"
9e34b95a1db9f28b31560405687dd651492048e1 20-Jan-2012 Michael Jurka <mikejurka@google.com> Remove fastInvalidate and setFast* methods

- were only being used by Launcher, and they've been
removed from there too

Change-Id: I230e79c89a6450756220ad5cc07180bb5b725bd6
/frameworks/base/core/java/android/view/View.java
0764dee89cc82dd53196cce2865d3cabafed208f 18-Jan-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "AccessibilityEvent/AccessibilityNodeInfo class name property should be set to only framework classes."
73d27c3d46ce9a19c0cc358d0b2788f1f51706d7 18-Jan-2012 Michael Jurka <mikejurka@google.com> Merge "Check if View's alpha must be updated in setter"
8a78fd4d9572dff95432fcc4ba0e87563415b728 17-Jan-2012 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityEvent/AccessibilityNodeInfo class name property should be set to only framework classes.

AccessibilityEvent and AccessibilityNodeInfo have a property className which is set to the source
Java class. This is problematic since leads to leaking private classes which would allow an
accessibility service to load classes from other packages. This is strongly undesirable since
not trusted code can be loaded, and hence executed, in the accessibility service. To address
that the class name is set to the most concrete framework class extended by the info/event
source.

bug:5878943

Change-Id: I7b3114ece8772ea2773f5151e21b8a6f2006882a
/frameworks/base/core/java/android/view/View.java
a7a7eedee58b69ff3d36fa9d413ea902eb0d5d45 17-Jan-2012 Michael Jurka <mikejurka@google.com> Check if View's alpha must be updated in setter

Change-Id: I91094b43dbacbd637e04ce4074d8df6a27ddf6fb
/frameworks/base/core/java/android/view/View.java
b35ab7b72967adcfd01cec483a705dafe8b951d1 06-Dec-2011 Gilles Debunne <debunne@google.com> Sub display list in TextView

TextView uses a sub-display list to 'cache' the rendering of its
text. This saves time when drawing an editable text, where the blinking
cursor forces a re-draw twice per second, which creates pauses during
scrolling.

Added a sub-display list invalidation when an appearance span is
modified/added/removed.

Also added an invalidation of the display list when selection range
is changed.

Change-Id: I41e8068a12902b8a745c5bb77de8c77def76a270
/frameworks/base/core/java/android/view/View.java
4c1e00a8c29e532a5b0fce755bead691797eff94 06-Jan-2012 Fabrice Di Meglio <fdimeglio@google.com> Add textDirection="locale"

- also fix and update unit tests
- see bug #5242821

Change-Id: I29e029bab8ade336a430f9a2a5073caaf11b8dda
/frameworks/base/core/java/android/view/View.java
d47f1531d0653be33133cf05ec317a236e763646 16-Dec-2011 Chet Haase <chet@google.com> Make Property objects in View final

The various Properties added to View in 4.0 (ALPHA, TRANSLATION_X, etc.)
were not final, making it possible to assign on property to another.
Not something that someone would want to do, but we should try to prevent
that kind of mess. This API change makes those properties final.

Change-Id: I7d0c7f738eb2074d0781b1ba6a7c19339bac4477
/frameworks/base/core/java/android/view/View.java
e6513486ee83e3ce9e99ee3f08f470fc568f120f 07-Dec-2011 Gilles Debunne <debunne@google.com> Merge "Minor tweak in getLocationInWindow"
6583ce5b89c41a16aab815a09904b039ef9d8d8a 07-Dec-2011 Gilles Debunne <debunne@google.com> Minor tweak in getLocationInWindow

Change-Id: Ib3f30dbfb3aee7c46c58e1f7832e3394702c0ff6
/frameworks/base/core/java/android/view/View.java
9c4b79af221b53f602f946faa9ff317a596a0c39 11-Nov-2011 Romain Guy <romainguy@google.com> Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: Ie30700a29059d2ea60eb7bd3f8bd20ac48a149ab
/frameworks/base/core/java/android/view/View.java
f240ac99d6bc3a9c77c00fab0ff102f9da504fd5 03-Dec-2011 Gilles Debunne <debunne@google.com> am 0c7e894e: am 2f1e1e4a: Merge "Handle animations in Views\' rectangle clipping methods." into ics-mr1

* commit '0c7e894e79bea35f979d30e4e3bb6115b102cafd':
Handle animations in Views' rectangle clipping methods.
cea45132e3d5d32a6fc737abf10b8893a50f465b 24-Nov-2011 Gilles Debunne <debunne@google.com> Handle animations in Views' rectangle clipping methods.

getChildVisibleRect and getLocationInWindow do not take the new
mTransformationInfo View attribute.

As a result, these methods return invalid value during an animation
Bug 5638710

Changes in Patch Set 2:
- temporary allocations removed using static thread local variables (method
calls are NOT reentrant).

- scroll should be handled *before* applying the transformation matrix.
Fixed the call order in View#getLocationInWindow()

Patch set 4: fix from comments.
Patch set 5: <p>s

Change-Id: I15dc44c0659305d9029c59a47aba3a738bb35ae1
/frameworks/base/core/java/android/view/View.java
0ce49783083bf81cc1ea812e029fc94e1625a8fd 22-Nov-2011 Romain Guy <romainguy@google.com> am e25ed181: am 26dd54f8: Merge "Ensure we have an EGL context when building layers Bug #5638421" into ics-mr1

* commit 'e25ed181070579fca2522112b1659af2fbf8ddfc':
Ensure we have an EGL context when building layers Bug #5638421
26dd54f87c1daaa369576d9abea823c8105bd702 22-Nov-2011 Romain Guy <romainguy@google.com> Merge "Ensure we have an EGL context when building layers Bug #5638421" into ics-mr1
3526b00a53a2582a51ff8b98ac1400a48f351107 22-Nov-2011 Romain Guy <romainguy@google.com> am c26e4d18: am 8cd39e3a: Merge "Notify views when EGL resources are about to be destroyed Bug #5639899" into ics-mr1

* commit 'c26e4d18a20ab0b3e769fb3e547994f1c27d6713':
Notify views when EGL resources are about to be destroyed Bug #5639899
d0609e41ab0caa40058b711bbd03dd93fe8af607 22-Nov-2011 Romain Guy <romainguy@google.com> Ensure we have an EGL context when building layers
Bug #5638421

This bug was introduced by the recent changes that force more frequent
flushes of the GL renderer.

Change-Id: I55dd4ace6ba1e70ab41927150d6c60c37d7fb196
/frameworks/base/core/java/android/view/View.java
31f2c2e94656530fbf6282803e62edb47e9a894d 21-Nov-2011 Romain Guy <romainguy@google.com> Notify views when EGL resources are about to be destroyed
Bug #5639899

Change-Id: I7c5d8bebf02294426f5b3ab1358a31c38a4fd064
/frameworks/base/core/java/android/view/View.java
e9dc7c9f031b494c6ebe156de957f0a8f2cd58b0 19-Nov-2011 Svetoslav Ganov <svetoslavganov@google.com> am bdc2912d: am d8a3cabc: Merge "Text selection AccessibilityEvents are missing text." into ics-mr1

* commit 'bdc2912da64e5e6402c73997d637224d905ae825':
Text selection AccessibilityEvents are missing text.
84dd52e394d27b5cdf638132808e2585a9049480 18-Nov-2011 Svetoslav Ganov <svetoslavganov@google.com> Text selection AccessibilityEvents are missing text.

The text selection change event was not added to the text
populating accessibility events in View.

bug:5638709

Change-Id: Ie7e319bc07d7e6c48f178a6c1bd22b1fe32ff515
/frameworks/base/core/java/android/view/View.java
28a5ec9613a824d2ec15ce5e5cec77a6fcf444d5 14-Nov-2011 Dave Burke <daveburke@google.com> am 2cfb873c: am 9d66da8a: Merge "Revert "Discard framebuffer rendering queues when discarding layers"" into ics-mr1

* commit '2cfb873c9f0b56f2c7d694a21c968511223933af':
Revert "Discard framebuffer rendering queues when discarding layers"
7077506f9945b87b02bdd47ffce75a5b813c821c 14-Nov-2011 Dave Burke <daveburke@google.com> Revert "Discard framebuffer rendering queues when discarding layers"

This reverts commit da96f8ac2c1c35a54f3f36e6d776cb386a251d03.
/frameworks/base/core/java/android/view/View.java
3f511aaf1cb9dfa69e2f4225a5bd41bec0864cc7 14-Nov-2011 Mathias Agopian <mathias@google.com> am a16ee939: am 28587497: Merge "Discard framebuffer rendering queues when discarding layers Bug #5581817" into ics-mr1

* commit 'a16ee9390e1fcea8ff7cbefd253659c37f2999a3':
Discard framebuffer rendering queues when discarding layers Bug #5581817
da96f8ac2c1c35a54f3f36e6d776cb386a251d03 11-Nov-2011 Romain Guy <romainguy@google.com> Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: If612846ec5f7793710fc4df152791fb32c506551
/frameworks/base/core/java/android/view/View.java
5d35fd79a78f9e17089ab36096f7b4f2ba7d99b3 10-Nov-2011 Adam Powell <adamp@google.com> am ba44080d: am 67121fd7: Merge "Fix bug 5581874 - Animated drawables don\'t start as expected" into ics-mr1

* commit 'ba44080d834d23d0bc7d118a4950f837eeaca96a':
Fix bug 5581874 - Animated drawables don't start as expected
37419d7321e71edb179faa0eafd2a2acf12b62c1 10-Nov-2011 Adam Powell <adamp@google.com> Fix bug 5581874 - Animated drawables don't start as expected

Fix a bug that caused animated drawables to not schedule properly when
a view has not yet been attached. Also make ImageViews update their
drawable visibility state properly, which will handle scheduling
concerns as ImageViews are attached and detached from their windows.

This should also fix the bug where animated notification icons in the
status bar do not animate until the posting app posts an update to the
notification.

Change-Id: I24c403182831258d1f251736e920c9efe1d38299
/frameworks/base/core/java/android/view/View.java
4b6de4f5a9c2fa08a86b516a49dea97a56e3ce05 02-Nov-2011 Svetoslav Ganov <svetoslavganov@google.com> am 6e42470f: Merge "Accessibility window query APIs should respect root name space." into ics-mr1

* commit '6e42470f928bbf60c9fd3d17a2a69a4b96cec170':
Accessibility window query APIs should respect root name space.
cf3b31704ae7743ca85219bca9698adcf6fbc67a 02-Nov-2011 Dianne Hackborn <hackbod@google.com> am ad41a94b: Merge "Some optimizations." into ics-mr1

* commit 'ad41a94b298f834e13632ee29b27cefd75f10012':
Some optimizations.
6e42470f928bbf60c9fd3d17a2a69a4b96cec170 02-Nov-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Accessibility window query APIs should respect root name space." into ics-mr1
0500b3cfda5192efc09d6d4344b0c6c785c0a815 01-Nov-2011 Dianne Hackborn <hackbod@google.com> Some optimizations.

- Don't try to create a thumbnail bitmap on the client side. This
wastes 64k, and isn't needed since we are doing screenshots.
- Optimize View to put all of the callback pointers out of line.
Added a couple new APIs so these don't need to be protected/public.
- Lazily create ViewGroup's cache paint.
- Change FrameworkPerf app to not use HW accel drawing, to give better
comparison with GB.

Change-Id: Iec56d02459820d74a4cc9c7ec9c1856563c82c7b
/frameworks/base/core/java/android/view/View.java
57f3b566db630233087b121d3d43ecd81a6dfd95 01-Nov-2011 Svetoslav Ganov <svetoslavganov@google.com> Accessibility window query APIs should respect root name space.

1. The window query API used to not-respect the root name space
while traversing the parent relation i.e. a client was able
to fetch the parent of a root name space node.

2. Children that are root name space were reported but their descendants
not. Actually such children should not be reported since they are
the root of a separate logical sub-tree. Such a tree is exposed by
its root allowing its traversal. The accessibility APIs should be
able to explore a virtual tree, i.e. one with a descendant which is
root name space, only if an accessibility event from there was received.

bug:5480096

Change-Id: I4c4d805aa2f6d4edba86eda213b5239bea83eed2
/frameworks/base/core/java/android/view/View.java
021078554b902179442a345a9d080a165c3b5139 04-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Adding APIs to enable reporting virtual view hierarchies to accessibility serivces.

Added an interface that is the contract for a client to expose a virtual
view hierarchy to accessibility services. Clients impement this interface
and set it in the View that is the root of the virtual sub-tree. Adding
this finctionality via compostion as opposed to inheritance enables apps
to maintain backwards compatibility by setting the accessibility virtual
hierarchy provider on the View only if the API version is high enough.

bug:5382859

Change-Id: I7e3927b71a5517943c6cb071be2e87fba23132bf
/frameworks/base/core/java/android/view/View.java
e261e283eaedd38235fc93b2a5c35758c613b10c 19-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Add content description setter to RemoteViews

bug:5480389

Change-Id: I66616f379a244ba7f3552d766f3aaa77f207550a
/frameworks/base/core/java/android/view/View.java
b6233ffd602642cd47a08f951770744cbed54f22 18-Oct-2011 Romain Guy <romainguy@google.com> Merge "Return early when we cannot allocate a hardware layer Bug #5462308"
5cd5c3f7e4df99f47e3def6e3707b9eb8205aef3 18-Oct-2011 Romain Guy <romainguy@google.com> Return early when we cannot allocate a hardware layer
Bug #5462308

Change-Id: I52dab809662f6f42a49ca03edc50f6b98fc35a06
/frameworks/base/core/java/android/view/View.java
f755a2e8aabfd6b26df4f3f56f0e9cdfb06cc173 15-Oct-2011 Scott Main <smain@google.com> Merge "docs: a couple notes for a11y methods in View and cleanup to the A11y service HTML to be semantically correct and thus improve its accessibility :)" into ics-mr0
b303d8381d734f48c4e1de4f11bf25950b28adf1 13-Oct-2011 Scott Main <smain@google.com> docs: a couple notes for a11y methods in View and cleanup to the
A11y service HTML to be semantically correct and thus improve its accessibility :)

Change-Id: I483a8a441d802b056f68f82e0e782d86a73298ac
/frameworks/base/core/java/android/view/View.java
471fa9d10b4fa4da070c0ffb5fa5ea1354c8e6b8 14-Oct-2011 Joe Fernandez <joefernandez@google.com> Merge "docs: add developer guide cross-references, Project ACRE, Round 2" into ics-mr0
558459fe85f56f29a6ed6a4d0adb4a0bd6665884 14-Oct-2011 Joe Fernandez <joefernandez@google.com> docs: add developer guide cross-references, Project ACRE, Round 2

Change-Id: I39a534ae3a2a34b4dabc333a09961012ef911d3e
/frameworks/base/core/java/android/view/View.java
dba935659024a9ca83cb6bd3f1a9970e277f7658 06-Oct-2011 Daniel Sandler <dsandler@android.com> Break apart DISABLE_HOME and DISABLE_RECENT.

Additionally, start using setSystemUiVisibility() where
possible in the keyguard to allow activities and dialogs to
re-enable some of the navigation keys (notably: home but not
recents).

Finally, stop disabling MENU for activities atop the keyguard.

Bug: 5380495 // no home in driveabout, clock
Bug: 5396134 // able to show home/recent in keyguard
Change-Id: I04eb224554ee8cff79476b85148c4cda75bb0b62
/frameworks/base/core/java/android/view/View.java
a1a274f2794e29afd5ba5e2ca31352cae5c508fd 11-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Accessibility text changed event text not populated."
589b0bb6ab81657ba201cbc441a49f85305170bc 10-Oct-2011 Romain Guy <romainguy@google.com> Make sure we have the correct GL context when grabbing a bitmap
Bug #5427391

Change-Id: I4687a6a3e8968fc3ca8ef171833b2bb7afc16f89
/frameworks/base/core/java/android/view/View.java
9920f4fdeaa3a4c597f62c3d082becc48ea8a7ab 08-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Accessibility text changed event text not populated.

Added the TYPE_VIEW_TEXT_CHANGED event to the populating events.

bug:5430831

Change-Id: I78e87640ea4279227d89f399ad43e9b88eb4a486
/frameworks/base/core/java/android/view/View.java
85b9edf2da0534bc53d139bb88cda8866d265afe 07-Oct-2011 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately"
7853c579fa52e4365c6e44ba38aeb3299d776f44 07-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Fixing errors in position information of scrollable views reported for accessibility."
9a230e01a1237749a8a19a5de8d46531b0c8ca6a 06-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately

This cleans up how ui flags are managed between the client and window manager.
It still reports the global UI mode state to the callback, but we now only clear
certain flags when the system goes out of a state (currently this just means the
hide nav bar mode), and don't corrupt other flags in the application when the
global state changes.

Also introduces a sequence number between the app and window manager, to avoid
using bad old data coming from the app during these transitions.

Change-Id: I40bbd12d9b7b69fc0ff1c7dc0cb58a933d4dfb23
/frameworks/base/core/java/android/view/View.java
d9ee72fddb8be40e414a831fb80458dc48699613 06-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Fixing errors in position information of scrollable views reported for accessibility.

1. ScrollView/HorizontalScroll view were reporting only the scroll X and Y but
failed to convey the max scroll along X and Y so the position can be determined.

2. WebView was not reporting correctly its scroll position for accessibility.

3. Some descendants of AdapterView were reporting incorrect position information.

4. Updated the accessibility docs with some details about the scroll information.

5. Cleaned up duplicated code.

bug:5412132
bug:5412265

Change-Id: I165e73ecde027dad811425b9f395a3f758c923ba
/frameworks/base/core/java/android/view/View.java
1a76dcd6d1e30f92668b5df309398d545cef9ace 06-Oct-2011 Chet Haase <chet@google.com> Fix issue #5367164: memory leak in LayoutTransition

When a transition occurs, layout change listeners are added to the container
being transitioned as well as every container up the view hierarchy. The
parent views were not having those listeners removed, so every time a transition
ran, more listeners would be added. Adding to that, the use of an ArrayList
as the collection to hold the listeners meant that adding duplicate items
would just increase the size of the list. There's now a sanity-check on the add
call to make sure that the listener does not exist already, but more importantly
we remove all listeners added when the transition ends.

Change-Id: I4ea05adf30765db091124065539b0ffd32729b3b
/frameworks/base/core/java/android/view/View.java
cac15eb21cab68e5b76fe06f9aff273978c92054 04-Oct-2011 Joe Fernandez <joefernandez@google.com> Merge "docs: add developer guide cross-references, Project ACRE"
b54e7a3d9f60ac605f404f9eb3c5e92ca51bbd23 04-Oct-2011 Joe Fernandez <joefernandez@google.com> docs: add developer guide cross-references, Project ACRE

Change-Id: I5df1c4e13af67ff4c4a5b22f3cb1247bf0103b09
/frameworks/base/core/java/android/view/View.java
2588a07730ff511329c87b5f61b20419b2443d48 04-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "The logic for not populating text to some accessibility events is scattered."
2cdedffcfa5594f9d516fa235d5edf4d4f92c21d 03-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Accessibility services cannot obtain the source of an event coming from a root namespace descendant.

1. The user can touch the screen at an arbitrary location potentially crossing the root namespace
bounday which will send an accessibility event to accessibility services and they should be able
to obtain the event source. Also accessibility ids are guaranteed to be unique in the window.
Added a package scoped findViewByAccessibilityId method that dives into nested root namespaces.

2. Added accessibility support to the AnalogClock.

bug:5405934

Change-Id: I84edcb554bae41aafcbbc2723c5e62c1ef8a6ddf
/frameworks/base/core/java/android/view/View.java
82e236d72ac197d6673d0b4d484fe5f0b9436731 30-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> The logic for not populating text to some accessibility events is scattered.

1. Some accessibility evenents should not and were not dispatched for
text population but there was no centralized location for enforcing
this - rather the system was firing them in a specific way or there
were conditions in a few places enforcing that. Now this is centralized
and clean.

2. Updated the documentation with some new event types the were lacking.

3. Explicitly stated in the documentaition which events are dispatched to
the sub-tree of the source for text populatation.

bug:5394527

Change-Id: I86e383807d777019ac98b970c7d9d02a2f7afac6
/frameworks/base/core/java/android/view/View.java
59c7f80dd20258cefa1fc4bdd3c9a709a8dd53b8 30-Sep-2011 Romain Guy <romainguy@google.com> TextureView works best when it draws stuff.
Bug #5391188

Change-Id: I5e754881ccb08ff288ebd60de77282c9cbcf3f86
/frameworks/base/core/java/android/view/View.java
2a9fa89643ce796ee6dc7edae2742b291b6c5f40 29-Sep-2011 Romain Guy <romainguy@google.com> Don't build display lists for views with a layer.

This could cause the draw() code of views to be invoked too often
or worse, called with the wrong canvas. For instance, a view backed
by a software layer could get its draw() method called to record a
display list. Using a software layer is the recommended way to use
drawing operations not supported in hardware. Since we would
sometimes call the draw() method with the hardware backend anyway,
the app could crash by executing an unsupported operation.

Change-Id: Ib5f9a3a4c6f3efff5e0162ecd73d2dffe06e30a6
/frameworks/base/core/java/android/view/View.java
83a559e78f57703645066c822a1ec7257c06ba56 23-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Scroll accessibility events should not populate text."
2b2f6d6c544d7a3b5b150ce6f62451ad0a6e390b 23-Sep-2011 Adam Powell <adamp@google.com> Remove unnecessary parameter

Change-Id: I32810a31140263a996d4f600fa53db5f29e60f42
/frameworks/base/core/java/android/view/View.java
b84b94e1a04cd1f396dd6fef98d65ca1a2729c92 23-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> Scroll accessibility events should not populate text.

Scroll events are used to report position change and should not
contain the text content of the view that fires them because it
is usiually a containter for many other views and the text will
be long and not informative for accessibility purposes. Also
such evens are fired relatively frequently. If a client wants
to fetch some textual content for a scroll event he can use
the interrogation APIs.

bug:5352059

Change-Id: I43e02aca895c8ab16ba82ebe1cee3aea8ce7711a
/frameworks/base/core/java/android/view/View.java
7db82acd8151684a886d4725ddf2790ef3a2f80e 23-Sep-2011 Adam Powell <adamp@google.com> Fix leaky view tags

The implementation of the method View#setTag(int, Object) stored tag
objects as entries in a static WeakHashMap associated with the View as
a key. This was problematic for any tag object that stored a hard
reference back to the View the tag was placed on, as it would cause
the WeakReference key to never be collected and the entry to persist
forever.

This was particularly nasty if an app used a keyed tag to store a
ViewHolder object referencing child views for use in the Adapter
implementaion for an AdapterView, since child views will always have
hard references leading back to the parent.

Change-Id: Ia17840a301ba0e0c928861405388fb2f625dac2c
/frameworks/base/core/java/android/view/View.java
705240631beffaedc28bc0b950e8b7f09b6d3b5d 21-Sep-2011 Daniel Sandler <dsandler@android.com> Revert "Allow views to setSystemUiVisibility() with the same value and have it work."

This reverts commit fad9555217ce3a657ffc7cba458a0d2622f7a379.
Because it just didn't work. (The views kept aggressively
re-applying their preferred flags every time view attributes
were aggregated.)

We'll pursue the original strategy, like lights out mode in
HC: if you want to tickle this mode, un-set and re-set the
flags (preferably synchronized with the global SystemUI
visibility state as reported by onSystemUiVisibilityChanged
callbacks).

Bug: 5052456
/frameworks/base/core/java/android/view/View.java
ea515aeafa01de6f50c854ee381b972ef2478284 15-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> Update the public APIs for finding views by text to optionally use content description.

1. Added flags to the search method to specify whether to match text or
content description or both.

2. Added test case for the seach by content description.

3. Updated the code in AccessibilityManager service to reflect the latest
changes there so test automation service works - this is the fake
service used for UI automation.

Change-Id: I14a6779a920ff0430e78947ea5aaf876c2e66076
/frameworks/base/core/java/android/view/View.java
8f73b5dfac9be998fcd6cdc30bcb1e4b210ba575 13-Sep-2011 Christopher Tate <ctate@google.com> Fix bug 5297302 - Remember to release surface after starting drag

Forgetting to release it was "safe" in that GC would eventually
tidy it up anyway, but in the meantime it was possible for a user to
do lots of drag operations, racing ahead of the progress of the garbage
collector, and wind up with drags failing because we'd run out of
surface slots due to all the piled up stale drag shadows.

Change-Id: I7ac93b13cc9996dda04a404571fbc44cb4314694
/frameworks/base/core/java/android/view/View.java
ab0f485e64418eb22f0a1d89d7064902b381e9c2 13-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix problems where we were allocating TypedArray when not needed.

Fixes up some recycling of TypedArray objects to reduce the
number we need to allocate during inflation etc.

Change-Id: I948dccc052997779001eaa99db2a710b04be01ae
/frameworks/base/core/java/android/view/View.java
bd5c9768c4432c6cb2bfa5f521d49ff03c087ff8 13-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Adding accessibility delegate mechanism for backwards compatibility support."
031d9c1389de2b9dac7f175af0b962e24b21d5be 10-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> Adding accessibility delegate mechanism for backwards compatibility support.

1. Added an AccessibilityDelegate class in View which can be set by
a client that wants to cutomize accessibility behavior via
composition as opposed to inheritance. Insead overriding a new method in
View thus being bound to the API version that introduced this
method a developer can conditionally inject the accessibility
customization if the platform API version is heigh enough. The
developer will have to override the method of interest of the
delegate. The default implementation of the delegate methods is
the same as that of View in the case that there is no delegate
set. If a delegate is set calling an accessibility related method
on View will be handed off to the corresponsing method of the
delegate.

bug:5259555

Change-Id: I00e750e22e5e7164a1b571cb3d12ecaf4ab93db4
/frameworks/base/core/java/android/view/View.java
6a6977e8728f3a3d209daadf587079dc7369050b 11-Sep-2011 Chet Haase <chet@google.com> Merge "Fix 5266335: bad DIRTY/invalidation logic"
f186f30a7cbbf84e9b7ef52403d77f252b5229ed 11-Sep-2011 Chet Haase <chet@google.com> Fix 5266335: bad DIRTY/invalidation logic

The DIRTY flag is used to track which elements of the view hierarchy need
to be redrawn on the next drawing operation. This flag is set on the parent
hierarchy of a view when that view is invalidated. There is an optimization for
opaque views that tells the parent that it is dirty, but that it need not
redraw its own content because the view will cover it (since it is opaque).

This dirty-opaque logic breaks down in the current code because we only set
these dirty flags on the parent hierarchy, not on the view itself. In the situation
raised by this bug, we would invalidate the parent container directly (which does
not case the dirty flag to be set), then we would invalidate a child of that view.
Because the child is opaque, the DIRTY_OPAQUE flag would be set on the parent
container. This would cause us, in the later rendering process, to skip the
drawing on that parent container, assuming that it was only asked to be redrawn
because of its opaque child's invalidation.

The fix is to now set the DIRTY flag on an invalidated view, not just on its parent
hierarchy. The DIRTY_OPAQUE logic will avoid setting the opaque flag on views/parents
that are already marked DIRTY, thus an invalidated parent will be correctly drawn
during the drawing process.

Change-Id: Ib5e014a125a4f5168f6a5a3166e941474659aca5
/frameworks/base/core/java/android/view/View.java
1ef3fdbe047c805ce33b2be463ea51dec5952729 10-Sep-2011 Romain Guy <romainguy@google.com> Go faster!!!!

The less we do, the faster we draw.

Change-Id: I7bbc3908b36d8ae295ea3e61ef71fd9ee2187970
/frameworks/base/core/java/android/view/View.java
7b8d7cb59cfdc492df920b0c48960a691994f598 10-Sep-2011 Dianne Hackborn <hackbod@google.com> Merge "Pull animation attributes out of main view class."
ddb715b238c098d8b561a44b9687f0bc67a4c141 09-Sep-2011 Dianne Hackborn <hackbod@google.com> Pull animation attributes out of main view class.

These are now in a separate class that is only allocated when
needed by the view.

Change-Id: I9601bb43b3b4bfdabd982b02f7cd7534437b8ac3
/frameworks/base/core/java/android/view/View.java
e080af37544f5d7d0cc8140289ac96dd21a8742d 09-Sep-2011 Romain Guy <romainguy@google.com> Save/restore display lists' canvas properly

Change-Id: Ic016f0215f9fe5c67af98f059ecce4ed94994810
/frameworks/base/core/java/android/view/View.java
e3238c98054688dd9a5b3ae4a776c023d70fb311 08-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Code cleaning"
8fc54f9b281eecdc1ee05d7c091968b75a640e7e 08-Sep-2011 Adam Powell <adamp@google.com> Fix build

Change-Id: I9efe13a7647088402c6759399a96de7831df964b
/frameworks/base/core/java/android/view/View.java
2b04cef9b49ae5bd5ff197124f2dfcf97af71d09 08-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Code cleaning

- removing CharCount TextDirectionHeuristic references

Change-Id: I8cdc03b0d7bd610c7b8224073ffedd89b8953c63
/frameworks/base/core/java/android/view/View.java
b6e43268f9a499b6d04b0d218e9bd46254ebbc8e 08-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Hide RTL related APIs"
2273b1e4eae27fa60b0b90d16a1891b4526c9b9c 08-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Hide RTL related APIs

Change-Id: Idda458fcdebe7afeb9b95e328e552fcbc7939157
/frameworks/base/core/java/android/view/View.java
c6fc20a91bdf6f5d8cd8784324a55e39bcb7077c 07-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #5262565 Need to remove CharCount TextDirectionHeuristics"
c529d8d8c709aed9c9e6d87af3ce2eb4c73da4bf 07-Sep-2011 Romain Guy <romainguy@google.com> Prevent crash in View.createSnapshot if getResources() returns null
Bug #5260241

Change-Id: I90b6d5a8961a6b7b50603a9f59a6e39093646bd4
/frameworks/base/core/java/android/view/View.java
e3bf88da23bfadd89a35b6dec769ea825e5ecd6e 06-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5262565 Need to remove CharCount TextDirectionHeuristics

- update unit tests too

Change-Id: I7c518f58a9f17cb679bc3913bdd38243f7ad2195
/frameworks/base/core/java/android/view/View.java
f679ed0939f10ee3da9363bb179802b8184d1880 02-Sep-2011 Romain Guy <romainguy@google.com> Merge "Prevent a leak when using View.postInvalidate(left, top, right, bottom)"
40c18f59ac3bd0e14ac9c7ed6467e52fb8f95640 02-Sep-2011 Romain Guy <romainguy@google.com> Prevent a leak when using View.postInvalidate(left, top, right, bottom)

Change-Id: I44c9a11d8b62d86d38f4600df2bbea13c874b991
/frameworks/base/core/java/android/view/View.java
8b5a8b5bed98bd1c048864abcf39dfc3875518cb 01-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Code cleaning"
4c1c101a91ed49089a1b81923385cb2f74253c57 01-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> Accessibility hover events are fired if hover otside of modal window.

1. Added a check whether the received hover event is in the bounds
if the view before sending accessiiblity hover events. Hence, if
a widnow gets a hover event and it gets to its topmost view the
latter will not fire an accessibility event.

bug:5233588

Change-Id: I61e81fbf0ce59a7f57377262ce066bcf8db98f56
/frameworks/base/core/java/android/view/View.java
7d892dcc8a18376f499527a160c6c0ed664e22b1 01-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Code cleaning

- remove unused constant
- fix spelling

Change-Id: I0053129b33c2ee472db84e14d4b2ace5d97d20a8
/frameworks/base/core/java/android/view/View.java
e4e6e206959560a420a765aac576a8da5ec91dbd 29-Aug-2011 Chet Haase <chet@google.com> Fixed bug with invalidation in top-level Views.

There was a bug in an InputMethod app, where popups for the keys
would not pop-down again. The problem was that they were being
marked INVISIBLE, but the new invalidation logic noop'd the
invalidate() call that used to take place. Adding to that was logic
in setFlags() that only invalidated a parent for parents that are
instanceof ViewGroup. In this case, the parent is a ViewRootImpl.

Fix is to call invalidateChild() on the parent if it's not a ViewGroup.

Change-Id: I2c2352072d383cee1367ea7ee6c2207077721fd5
/frameworks/base/core/java/android/view/View.java
aceafe63eeb7d3bfc05ef5ab0b3957572d61ecf5 27-Aug-2011 Chet Haase <chet@google.com> Fixed error in invalidation/LayoutTransition logic

A recent fix for invalidation noop'd calls to invalidate() on
GONE/INVISIBLE views. This logic also noop'd views which might
be GONE, but which are in the process of fading in/out via
LayoutTransition animations. These views should invalidate as
usual.

Change-Id: Ie90a340f70290391a3aa4e68df535c6aabf4e5eb
/frameworks/base/core/java/android/view/View.java
27bf191327cd509daf52e3ebea2385ce66545093 25-Aug-2011 Romain Guy <romainguy@google.com> Merge "Optimize display lists"
04c9d8c2ffd028c35c750bac0a4a7b79e48059b5 25-Aug-2011 Romain Guy <romainguy@google.com> Optimize display lists

Remove redundant or useless operations

Change-Id: If989b4eaa9143eef4254c38b39959aeed1f2b9ab
/frameworks/base/core/java/android/view/View.java
4324eadc89676e860d063fb5f18aabc9f335a48b 25-Aug-2011 Chet Haase <chet@google.com> Fix issue with views becoming visible with stale content.

An earlier fix nooop'd invalidate calls on non-visible views. This
caused an issue where changes to the view while it was not visible
(such as changing the text of a TextView) would not get picked up
by the invalidation process.

The fix is to automatically invalidate() a view when it becomes
visible, to account for any changes that may have occurred to its
content while it was not visible.

Change-Id: Ia0f8fb42ca627b5a38f08761fa622b23f2dfa38b
/frameworks/base/core/java/android/view/View.java
c2d256b41587ff44efb6373885affe02e5df80b5 23-Aug-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Improve TextDirection resolution"
a68c5cf8a111d0c901474b5819d49ca5eea42a65 22-Aug-2011 Chet Haase <chet@google.com> Fix invalidation bug with INVISIBLE views.

There was a bug in the invalidation code that prevented some
animations fropm starting. An INVISIBLE view would mark some dirty
flags then propagate the invaliation up the parent hierarchy. This would
cause a redraw of the hierarchy, but would not include the invisible
view (invisible children do not get drawn). Thus the flags wouldn't get cleared.

Later, an animation to fade the view in (making it VISIBLE on start) would
be started on the view. But the invalidation triggered by that animation would
not propagate because the invisible view would see that it was already
invalidated, and wouldn't send the message along. No invalidation means no drawing,
so the animation wouldn't start because the invalidation didn't make it's way up to the
top and the child's parent did not redraw.

The fix is to noop the invalidate() call for GONE/INVISIBLE views which do not
have animations set on them. Making these views VISIBLE later will trigger
an invalidation, as will starting an animation on them, so the behavior should
not change except for the buggy situation.

Change-Id: I7a26a4bc7823f08fef56e52648e77ca256df6858
/frameworks/base/core/java/android/view/View.java
a646145c335ba821f01d9e4f8be2583eb9fd7266 20-Aug-2011 Fabrice Di Meglio <fdimeglio@google.com> Improve TextDirection resolution

- remove unuseful heuristics
- tune Javadoc

Change-Id: Id72a158b3a17a528423d278b1cbfd95b8c2951b5
/frameworks/base/core/java/android/view/View.java
3de510313a44977a25ecb5253603fb2df2cc34b2 18-Aug-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #5175022 Easy mode in MeasuredText.setPara() is no more used"
4b60c30838fbd635964f1e79c057de5048dcc66f 18-Aug-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5175022 Easy mode in MeasuredText.setPara() is no more used

- use the real TextDirectionHeuristics constants
- make more formal that LayoutDirection should be resolved BEFORE TextDirection
- reset TextDirection if LayoutDirection is recomputed
- remove non used TextDirectionHeuristic.isRtl(CharSequence...)

Change-Id: I1d53a7e3ee324cfd27785bb4d715d93de8d9ff4d
/frameworks/base/core/java/android/view/View.java
351eb33d84fb76f1addf6a18ce4c7ff5ca40dd5d 18-Aug-2011 Daniel Sandler <dsandler@google.com> Merge "Allow views to setSystemUiVisibility() with the same value and have it work."
fad9555217ce3a657ffc7cba458a0d2622f7a379 17-Aug-2011 Daniel Sandler <dsandler@google.com> Allow views to setSystemUiVisibility() with the same value and have it work.

This will save apps the trouble of having to first remove
the lights-out or hide-navigation flags before reapplying
them (in situations where the system UI has decided to
override those flags).

Bug: 5052456
Change-Id: I31f6ca9105379ae5f0216ebe3c39fc8d5d935f92
/frameworks/base/core/java/android/view/View.java
4dfbec2665bd5f567d7321f2e88a39e1ab45fdf8 15-Aug-2011 Jeff Brown <jeffbrown@google.com> Find next focus id from inside-out.
Bug: 5165543

This change fixes some problems when the view hierarchy contains
duplicate ids, such as when ListViews contain nested custom views.
If the custom views contain next focused id hints, then the system
should prefer the other views within the ListView item over any
other views outside of the ListView item.

Change-Id: I5653ff6bac0bf9f08bd6ecbe5a3bb22ea47ab566
/frameworks/base/core/java/android/view/View.java
e21f89c80256ed2aeaa53022770b140b58e75394 15-Aug-2011 Adam Powell <adamp@google.com> Merge "Fix bug 5159596 - Slider grabs touch point when trying to scroll a list"
f2452b997c4eacc09985a1861a973e305b476135 15-Aug-2011 Jeff Sharkey <jsharkey@android.com> Merge "Change Preferences padding to match UI spec."
1029866a12e04e9db52485e2ec0353e764d15549 15-Aug-2011 Adam Powell <adamp@google.com> Fix bug 5159596 - Slider grabs touch point when trying to scroll a list

SeekBar widgets were not good citizens when placed in scrolling containers.
Detect when a SeekBar being touched is in a scrolling container and fall
back to a touch slop-based method for beginning a drag. Taps along the
seek bar itself will still change the value on touch up, even if the touch
slop never initiated a proper drag.

Factor out the code used to determine scrolling container status in View
into something that can be reused elsewhere in the framework; leave it
@hidden for now.

Change-Id: I59a21e8ab2c3b0092fafedbcd6ae1ee15f45971c
/frameworks/base/core/java/android/view/View.java
010d7e51604b1cffed6c4a16ba1f8b2527fd27e8 09-Aug-2011 Jeff Sharkey <jsharkey@android.com> Change Preferences padding to match UI spec.

Bug: 5091431
Change-Id: I1b657534c3ecccbddda1bece910da7f31d85291c
/frameworks/base/core/java/android/view/View.java
e63a4f35c94f32dbc13533ddfb7334f9706be844 11-Aug-2011 Romain Guy <romainguy@google.com> Document threading limitations on various View methods
Bug #5150923

Change-Id: I765d8e4d63a1fee7a12b9c2992bec67b4b6d1131
/frameworks/base/core/java/android/view/View.java
6311d0a079702b29984c0d31937345be105e1a5e 03-Aug-2011 Dianne Hackborn <hackbod@google.com> Clear the bitmap from the canvas in a lot of places.

Change-Id: I6b2071ac7b348c473b9bdd1b972d095aebbb4fb3
/frameworks/base/core/java/android/view/View.java
8a2da33c77bae825444fffd326d064225241c7cc 02-Aug-2011 Romain Guy <romainguy@google.com> Merge "Allow Canvas.setBitmap() to receive a null Bitmap."
0965a3244b4c3009d08db2e084cdcb681ef66d26 02-Aug-2011 Romain Guy <romainguy@google.com> Allow Canvas.setBitmap() to receive a null Bitmap.

Change-Id: I6096f0b44866e532ccd96a29c816bf34d48c1dc2
/frameworks/base/core/java/android/view/View.java
07c6cc7b7b2ffece4e8149cf10eab31da1fc1d87 01-Aug-2011 Jeff Brown <jeffbrown@google.com> Merge "Tweak hover for better accessibility and compatibility. Bug: 5087943"
53f2531ba7bc72489d03fd17b6ce29c811fad8b5 29-Jul-2011 Daniel Sandler <dsandler@google.com> Merge "The fullest of fullscreen modes."
ea83503e8683531fac2534047e50bc1e5979b6dd 29-Jul-2011 Romain Guy <romainguy@google.com> Don't create hw layers when there's no hw context.
Bug #5093805

Change-Id: Ia58b3381c83b9a200e80020e5c1b9c337ad6c35c
/frameworks/base/core/java/android/view/View.java
a1b2418e647332e8bed8229d78a64f55a605d024 28-Jul-2011 Jeff Brown <jeffbrown@google.com> Tweak hover for better accessibility and compatibility.
Bug: 5087943

Change-Id: I5533c18ec042b8d9cb590d8d3b22ce4a391c910d
/frameworks/base/core/java/android/view/View.java
60ee25643e0a7b8841063a4e97b0f18c51807e91 22-Jul-2011 Daniel Sandler <dsandler@google.com> The fullest of fullscreen modes.

View.setSystemUiVisibility() now properly accepts a
bitfield, including:

* SYSTEM_UI_FLAG_LOW_PROFILE: "lights out mode"
(previously known, erroneously, as STATUS_BAR_HIDDEN)

* SYSTEM_UI_FLAG_HIDE_NAVIGATION: for when you need every
single pixel on a device that also has a navigation bar

These flags are painstakingly aggregated across the entire
view hierarchy and carefully delivered to the status bar
service, which in turn gently passes them along to the bar
implementation.

To really get access to the whole screen, you need to use
HIDE_NAVIGATION in conjunction with FLAG_FULLSCREEN and
FLAG_LAYOUT_IN_SCREEN. See development/samples/Overscan for
an example of how to do this.

Change-Id: I5fbfe009d9ceebbbf71db73f14a7008ea7c1d4da
/frameworks/base/core/java/android/view/View.java
b6f7a27c59fd170b5d7617e43e21bfd8587f234e 28-Jul-2011 Romain Guy <romainguy@google.com> Merge "Reclaim more memory, more often."
65b345fa22b878e141b8fd8ece9c208df00fa40f 28-Jul-2011 Romain Guy <romainguy@google.com> Reclaim more memory, more often.

Yay.

Change-Id: I04557ad575c307a55088549f48f0e9ad994b7275
/frameworks/base/core/java/android/view/View.java
c8ec222cd8e7d7056b0f01018ac0c38d2c7204c0 28-Jul-2011 Romain Guy <romainguy@google.com> Merge "Destroy layers and flush layers cache when a window is destroyed."
6d7475d666baefaa3ba9f0dcee25238739454241 28-Jul-2011 Romain Guy <romainguy@google.com> Destroy layers and flush layers cache when a window is destroyed.

Change-Id: I3fa1bc3ff50fb99e3d2e490925bd6b0a0f809fff
/frameworks/base/core/java/android/view/View.java
812634c236b83e100c8473d607e44f8d8c48e805 27-Jul-2011 Scott Main <smain@google.com> cherrypick Change-Id: I213711f4b5d867ba91c961a2f098b6cc415cfcb3
docs: clarify framelayout class summary, issue 5055437

Conflicts:

core/java/android/view/View.java
core/java/android/widget/FrameLayout.java

Change-Id: Ia446d2d4cc798757d7aea104cfaf75fc2315dc50
/frameworks/base/core/java/android/view/View.java
e3f5edf9755ca2ffbb654389251a61b35a3d9901 26-Jul-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Set initial bounds offset to (0,0) so that in-screen bounds reported by AccessibilityNodeInfo are correct"
5bd36eee8698553941bffdc795aa8f2cc66b6338 25-Jul-2011 Adam Powell <adamp@google.com> Merge "Fix bug 5060033 - No text-editing toolbar when in a dialog"
0bd1d0a15294345bf88b20df28466907f982cec7 23-Jul-2011 Adam Powell <adamp@google.com> Fix bug 5060033 - No text-editing toolbar when in a dialog

Fix a bug that caused standalone action mode bars to not appear
properly or account for system insets such as the status bar.

Add public API to View to toggle the fitsSystemWindows attribute.

Change-Id: I5d7669425b930c5d23f9df26a45f544b706e8242
/frameworks/base/core/java/android/view/View.java
d794acaa6b1c8333bb9c12a84cd74fe24662bb90 23-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Code cleaning

- this was a bit ugly, isnt it?

Change-Id: Ic479c180977d73d333afed7696b2920840d92abf
/frameworks/base/core/java/android/view/View.java
326804f81c0710f0ea0d0f871d2f24e6f332a23e 23-Jul-2011 Alan Viverette <alanv@google.com> Set initial bounds offset to (0,0) so that in-screen bounds reported by AccessibilityNodeInfo are correct

Bug: 5063700
Change-Id: I4814c78eb1d6eae007976a057358377560560363
/frameworks/base/core/java/android/view/View.java
08695111cffd239d0f9917ff197c86e12e2e150c 22-Jul-2011 Jeff Brown <jeffbrown@google.com> Merge "Decouple GLES20RecordingCanvas lifetime from GLES20DisplayList. Bug: 5062011"
162a0217563f4665da6eb183dfce0fef740f641f 22-Jul-2011 Jeff Brown <jeffbrown@google.com> Decouple GLES20RecordingCanvas lifetime from GLES20DisplayList.
Bug: 5062011

Previously, each GLES20DisplayList would hold onto an instance of
GLES20RecordingCanvas. In turn, each GLES20RecordingCanvas
held onto an SkWriter with a 16Kb buffer along with several other
objects. With one display list per view and hundreds of views,
the overhead could add up to a few megabytes.

Ensured that the GLES20RecordingCanvas is reset as soon as
the display list has been constructed, thereby promptly freeing
the 16Kb buffer.

Changed GLES20DisplayList so that it acquires a GLES20RecordingCanvas
from a pool as needed and recycles it when done.

Removed some dead code and cruft related to the construction of
GLES20Canvas objects in general. Some code was written with the
assumption that the underlying renderer object could change
behind the scenes or might be lazily constructed, but that isn't
actually the case so we can simplify things.

Removed an unnecessary weak reference from GLES20DisplayList
to the View. It isn't actually used anywhere.

Fixed a bug in GLES20DisplayList where isValid() would return
true while the display list was being recorded. This is incorrect
because the native display list might not actually exist. Worse,
even if the native display list does exist, it is stale and
potentially refers to old Bitmaps that have been GC'd (because the
mBitmaps list was cleared when recording started).

Change-Id: Ib12d5483688cb253478edeb0156d34c476c2566b
/frameworks/base/core/java/android/view/View.java
aff599b4abb10bad6711ff9348f97a56240e0612 21-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix CheckTextView padding

- fix for bug #5051724 and bug #5051674
- override resolvePadding for doing correct padding resolution

Change-Id: Id8c7bf4afa24ff2169fd1bd7f5024a342279aab2
/frameworks/base/core/java/android/view/View.java
1180644280a38f77756926531037bfd7b9f1974c 20-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #4772392 Check what needs to be done for RTL specific new attributes that are in public.xml

- cleanup public.xml
- make BiDiTest makefile non visible to the build system
- provide file for injecting the new attributes by hand

Change-Id: I5037ec323066ebd254be51fff7070a5a0101dff7
/frameworks/base/core/java/android/view/View.java
1003aeb9dee6cb9ccb9991b32a6be94cd933d0ce 20-Jul-2011 Romain Guy <romainguy@google.com> Merge "Reduce the fade area to save bandwidth."
f2fc460a9512500d9d5749fbaada88903d8e3b22 20-Jul-2011 Romain Guy <romainguy@google.com> Reduce the fade area to save bandwidth.

Change-Id: I8ccea17fc1fb3c132329baa0acc1b3d5a140a5c6
/frameworks/base/core/java/android/view/View.java
7dde1c8ccce049378b8aa9e757b6f907040c8640 19-Jul-2011 Chet Haase <chet@google.com> Merge "Don't recreate view's display list when size hasn't changed"
75755e23f30d7a1f8c7b0c76ff5b2bcc72d6844f 19-Jul-2011 Chet Haase <chet@google.com> Don't recreate view's display list when size hasn't changed

Minor optimization in setFrame(), to force recreation of
a view's display list only when the actual size of the view has
changed.

Change-Id: Id07bd6943beec30de731ae8469ba881f5c0d9ac6
/frameworks/base/core/java/android/view/View.java
6dd005b48138708762bfade0081d031a2a4a3822 18-Jul-2011 Dianne Hackborn <hackbod@google.com> I. Can. Not. Stand. ViewAncestor.

It was done so we would have the name "ViewRoot" available for a
public API. However, the name "ViewAncestor" just makes no sense.
So instead, change it to ViewRootImpl.

Change-Id: If9599ca67896f339f6fefa7d1dde121201171d97
/frameworks/base/core/java/android/view/View.java
989571eeca547db5f8972560c2d45f00be92a327 18-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix resolution padding glitch"
4d36ec11f21ccbb71fbf9277e14b440ad62ba31d 18-Jul-2011 Adam Powell <adamp@google.com> Make View#setBackgroundDrawable a no-op if setting the same background.

Change-Id: Idd3e0ae80609557d82a5564daa1cfb0abca42ded
/frameworks/base/core/java/android/view/View.java
9c83011005349f2f0ebefb47c8ea7fc4bb5a07f7 16-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #4972141 Overlapping content in single-choice dialogs"
f3e1a936c3d10fb13c3b1006cfc91dd4a224dc26 16-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix resolution padding glitch

- make LAYOUT_DIRECTION_LTR case same as LAYOUT_DIRECTION_RTL case

Change-Id: I910f3227c7f5e469cca2c59a6a26362da7965ee5
/frameworks/base/core/java/android/view/View.java
54d69625558f401d5fe65309effb713d2ea06f54 16-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #4972141 Overlapping content in single-choice dialogs

- need to take care about padding resolution

Change-Id: Ida9738ffada6c6455b7949f933fa61924c4f7961
/frameworks/base/core/java/android/view/View.java
50e95eba5c7cf70a0ecbc50c0cf5b700201aa67f 15-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Implement textDirection heuristic selection."
cb379120456d8065d742021fc5c66748fc8a11a8 07-Jul-2011 Doug Felt <dougfelt@google.com> Implement textDirection heuristic selection.

Change-Id: I2fcf18de573f2d66494fa5ed61e4273c3c6078c7
/frameworks/base/core/java/android/view/View.java
fe7e40dc0dabbe677308b87d0b5f538fc9161c7d 13-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5025936 TableLayout layout direction resolution is broken

- check is the parent's view can do resolution when there is inheritance

Change-Id: Ic21d4ee761982ee219229a95f170b6bf2e596b02
/frameworks/base/core/java/android/view/View.java
7f86c806ada21fc7a3feefd89d6fcb4282b0af40 02-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix View reset of layoutDirection and textDirection

- do it in onDetachedFromWindow()
- make naming consistent too
- update unit tests

Change-Id: I320fcdbf75166bae793c4409e7344608b696667f
/frameworks/base/core/java/android/view/View.java
0e591ab277e777b0422463823e3abf28bb1fd5d8 01-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Add charCount heuristic to TextView textDirection"
8f5026562f26dcde43ee9d9182b309c3204dc1ad 30-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Add charCount heuristic to TextView textDirection

- threshold set to 60% (using a constant)
- fix also one issue during layout direction resolution (parent could be null so delay resolution
up to when parent is no more null)

Change-Id: I65f24a297aac6bc0d5d482ee31b55db0b201e5bf
/frameworks/base/core/java/android/view/View.java
fe8b06cfb4cb4991bcfd09ffa60dcbb7b48ee45f 30-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Support control of text alignment."
c0ccf0c47c00942a9d0f2670600a8f2d4d7adb5b 24-Jun-2011 Doug Felt <dougfelt@google.com> Support control of text alignment.

Change-Id: Id6f3682f67ba2e6811e3014cd34a281e6dd0a469
/frameworks/base/core/java/android/view/View.java
222688682e6e072076489d8203d01bdf2366101a 28-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Add textDirection support for TextView and ViewGroup

- use ViewGroup inheritance if defined
- use different heuristics (inherit, firstStrong, anyRtl, ltr, rtl)
- add more unit tests

Change-Id: Ic1325aa7d9e4689b181e0a2d08b7dd7fb3f0dbeb
/frameworks/base/core/java/android/view/View.java
53ca3f13e70fda98aa9f39bb0c15afaf435e3904 28-Jun-2011 Jeff Brown <jeffbrown@google.com> Hover and stylus API cleanup.

Added missing setOnHoverListener method.
Removed BUTTON_STATE_ERASER.

Change-Id: I5d820d0a8e47fe5fd2d88e9fd9fc3fc6ce0dea0d
/frameworks/base/core/java/android/view/View.java
a0156177cdc809795dd8bc5a19943dd2b6f82b66 27-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> Added scroll and text selection change accessibility events.

1. Added scrolling accessibility event to provicde feedback
when a view is scrolled.

Note: We need scroll events for ICS since even though we have
touch exploration the user does not know when something
is scrollable and not feedback is provided while scrolling.

bug:4902097

2. Added a text selection change event to provide feedback
for selection changes including cursor movement.

Note: We need the text selection change events for ICS since
even though the IME supports navigation in text fields
the user receives no feedback for the current selection/
cursor position.

bug:4586186

3. Added a scrollable property to both AccessibilityEvent and
AccessibilityNodeInfo. The info has to describe the source
in terms of all properties that make sense for accessibility
purposes and the event has this property (kinda duplicated)
since clients will aways want to know if the source is
scrollable to provided clue to the user and we want to avoid
pulling the info of the source for every accessibility event.

Change-Id: I232d6825da78e6a12d52125f51320217e6fadb11
/frameworks/base/core/java/android/view/View.java
b76023afd192a1f5c81a8965cfd1b9dde2558726 21-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Introduce MarginLayoutParams marginStart and margingEnd

- update BiDiTest app for adding more unit tests concerning margin

Change-Id: Ia6a7e0a1948a2c375e8f3cc87d120a85351a8c27
/frameworks/base/core/java/android/view/View.java
c897fbfaf91f85a4f73643b2da6b58485350d574 24-Jun-2011 Romain Guy <romainguy@google.com> Merge "Code cleanup"
02ccac69fd1c0a03c24c5f3ace0ad4bed337b1fd 24-Jun-2011 Romain Guy <romainguy@google.com> Code cleanup

Change-Id: I64c346004e0adf9a776d0315534d4fe445f0c0ca
/frameworks/base/core/java/android/view/View.java
a54a600bc41c8ac760f85333b0c562cdc6770531 24-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #4813026 resolved direction of view doesn't change after layout direction changes"
a9489274d67b540804aafb587a226f7c2ae4464d 23-Jun-2011 Romain Guy <romainguy@google.com> Add the ability to specify the opacity of a TextureView

TextureView assumes its content is opaque by default.

Change-Id: Iba873423566a5b67c388081838bd910dceba32ba
/frameworks/base/core/java/android/view/View.java
80dc53d652b060d4dea7d70e9a5aa3b8321bcf8d 22-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #4813026 resolved direction of view doesn't change after layout direction changes

- reset resolution if setLayoutDirection() is called
- propagate resolution reset to the children if the View is a ViewGroup and direction is inherited

Change-Id: Iab1a75b17426aead7e28caba827614d7cf8e9450
/frameworks/base/core/java/android/view/View.java
87b7f805b94f5df53343264509f6d606d96dfb05 22-Jun-2011 Jeff Brown <jeffbrown@google.com> Send hover to all children under pointer.

Previously we only sent hover to the topmost child, but this doesn't
handle cases where multiple children are overlapped to achieve
certain special effects. Now we send hover to all children until
one of them handles it.

Also moved the call to send the accessibility event into the
main dispatch function so that we can send the accessibility event
for all innermost hovered views even when setHovered() might
not be called.

Change-Id: I6fb8b974db44b594c441deafc012b8415afdfac7
/frameworks/base/core/java/android/view/View.java
194f4a7afd6be1600e360b553f6d9a2f03a3f45b 22-Jun-2011 Jeff Brown <jeffbrown@google.com> Merge "Only handle onHoverEvent in actionable views."
aa4d46bb12e7fab8d9d8d6e0e2a8d6205420a318 22-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #4796027 left/right padding regression after recent View change (part 2)"
f9e36506f1d1d83d5a7266f955e861b9e819b205 22-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #4796027 left/right padding regression after recent View change (part 2)

- revert previous fix (transforming >=0 to >0)
- initialize mUserPaddingStart and mUserPaddingEnd to -1 in the specific View(Context context) constructor
- cache mUserPaddingStart and mUserPaddingEnd a bit earlier in View(Context context, AttributeSet attrs, int defStyle) constructor
- cache also mUserPaddingStart and mUserPaddingEnd in setPaddingRelative()

Change-Id: Ibe398da7af35f77655d7006444fa49c9c5387f62
/frameworks/base/core/java/android/view/View.java
10b6290c5f15ae512a2f6b5bf8d95bd2527c7235 21-Jun-2011 Jeff Brown <jeffbrown@google.com> Only handle onHoverEvent in actionable views.

Modified onHoverEvent so that a view only has its state changed to
hovered when the view is clickable. The intent is to prevent labels
from taking hover focus away from their containing view group despite
not being actionable in any way. The child will still receive
a hover event but, if it does not handle the event (returns false),
the hover event will bubble up to its parent and ancestors allowing
them a chance to handle the event instead.

The new onHoverEvent semantics are better because now they closely
mirror those of onTouchEvent. This makes it straightforward to
implement views that respond to hover by changing their visual
appearance (such as by making buttons glow when hovered).

Added onInterceptHoverEvent to enable ViewGroups to explicitly
intercept hover events within their bounds.

Exposed the new hover event API for real.

Change-Id: I63195c8f5c74b859f6047487f9a0f703e8f40ffe
/frameworks/base/core/java/android/view/View.java
f8ed444fad4c5bcb9c163ecb1303871c47e676d0 22-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #4796027 left/right padding regression after recent View change

- mUserPaddingStart and mUserPaddingEnd had be be greater than 0 for overriding

Change-Id: I588a9971bf73aa9461716cfd5a006373a14408f8
/frameworks/base/core/java/android/view/View.java
b53a68bbd96c3ffa22914c72315d50e6999dcb28 21-Jun-2011 Adam Powell <adamp@google.com> Fix bug 4738084 - Padding calculation regression

Make sure user padding values aren't clobbered during construction.

Change-Id: I90d1610e0bf50ccb10f058fb2b6c6d8ff34eec3b
/frameworks/base/core/java/android/view/View.java
d8703a98241ff190a26bc4b6089a0a8ab0122d8f 17-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Add View paddingStart and paddingEnd

- use a lazy padding resolution (because layout direction is lazyly resolved too)
- cache resolved layout direction as getResolvedLayoutDirection() will be more called
- enable resetting layout direction cache if needed
- update unit tests

Change-Id: I30ce19e3100cc137f84e60163b60e1577ff61819
/frameworks/base/core/java/android/view/View.java
1790a10eea34b777dcca54cfafb05ef4914b23fb 18-Jun-2011 Chet Haase <chet@google.com> Merge "Invisible views can't start animations"
ee452bcc06c6a42ecc78a154bb4fb9366e9178eb 18-Jun-2011 Romain Guy <romainguy@google.com> Merge "Fix rendering issue with paths when the stroke width is 0"
98029c825b9234e6b90721d910cc180885fcab1d 18-Jun-2011 Romain Guy <romainguy@google.com> Fix rendering issue with paths when the stroke width is 0

Change-Id: I5d8ac23dc69e9e17df4ef6b5195186b5207e2524
/frameworks/base/core/java/android/view/View.java
c8a9a70c5fe1be7e22f861f40b8cf3a9cf147cb2 17-Jun-2011 Chet Haase <chet@google.com> Invisible views can't start animations

The invalidation logic was broken for invisible views, causing
a problem when an animation was set to start on an invisible view
(to fade it in), but the view would not propagate the invalidation
event that would trigger the start of the animation rendering.
Fix: reset the DRAWN flag when a view becomes invisible to allow
the invalidation logic to work as intended.

Change-Id: Ibf49c6e8b39506a92a6e5f45cb8a12626ae4f931
/frameworks/base/core/java/android/view/View.java
4503c8dd714e1e40306d9356bf27b1f4925ea5f0 17-Jun-2011 Amith Yamasani <yamasani@google.com> Inform the InputMethodManager that a focused view has been attached.

This enables new fragments or views that have a focused EditText to register
the view with the input method framework as the served view.

Change-Id: I260439223b56626f2e57bd778bbe5194ed44e361
/frameworks/base/core/java/android/view/View.java
a47f45e4829f812ff47f9e5c9370b02284d92ae8 15-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Introduce LocalUtil and getLayoutDirectionFromLocale() now use likelySubtags

- move code from Configuration to LocaleUtil
- move unit tests

Change-Id: Ic14b0131894a0c5618f00d4acb3edb0daadefe01
/frameworks/base/core/java/android/view/View.java
c0053223bedf33581b0830fb87be32c1f26e5372 13-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Add View.getResolvedLayoutDirection()

- update Callback2 interface
- update Gravity.getAbsoluteGravity() and Gravity.apply() to be more generic
by changing "boolean isRtl" parameter to "int layoutDirection"
- fix BiDiTests for RTL FrameLayout

Change-Id: I97bb456c22d5fd3ecb34f08564ce4dbed37e7459
/frameworks/base/core/java/android/view/View.java
2714abff5cc50b1487c0979c99cc685f5ea113b1 14-Jun-2011 Adam Powell <adamp@google.com> Merge "Expose api on View to determine if the view can be scrolled."
6915944fc722fd8a7d4f26a02faaee51afdfc5c1 14-Jun-2011 Adam Powell <adamp@google.com> Expose api on View to determine if the view can be scrolled.

Change-Id: I41783237a975151392faec04c6a85803ebbccfb4
/frameworks/base/core/java/android/view/View.java
eeee4d2c01d3c4ed99e4891dbc75c7de69a803fa 11-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> Final polish of the interrogation feature.

1. Added a new event type for notifying client accessibilitiy
services for changes in the layout. The event is fired at
most once for a given time frame and is delivered to clients
only if it originates from the window that can be interrogated.

2. Exposed the findByText functionality in AccessibilityNodeInfo.
This is very useful for an accessibility service since it allows
searching for something the user knows is on the screen thus
avoiding touch exploring the content. Touch exploring is
excellent for learning the apps but knowing them search is
much faster.

3. Fixed a bug causing an accessibiliby service not to receive
the event source in case of more than one service is registered
and one of them does not have paermission to interrogate the window.
The same event was dispatched to multiple services but if one
of them does not have interrogation permission the event is
modified to remove the source causing subsequent serivices not
to get the later.

4. Moved the getSource setSource methods to AccessibilityRecord
instead in AccessibilityEvent.

5. Hiden some protected members in AccessibilityRecod which should
not be made public since getters exist.

6. Added the View absolute coordinates in the screen to AccessibilityNodeInfo.
This is needed for fast computation of relative positions of
views from accessibility - common use case for the later.

7. Fixed a couple of marshalling bugs.

8. Added a test for the object contract of AccessibilityNodeInfo.

Change-Id: Id9dc50c33aff441e4c93d25ea316c9bbc4bd7a35
/frameworks/base/core/java/android/view/View.java
26e432d25f2ba199ae8b762fc68da8463389dd9b 10-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Make View respect LAYOUT_DIRECTION_LOCALE

- update also unit tests for taking care of the locale direction
- code formatting on the layout test files

Change-Id: I4037eac3c572de9abb0178f36ca03803cc2c1522
/frameworks/base/core/java/android/view/View.java
59a12cae208790dd202656f50a40a53ef49baeeb 10-Jun-2011 Romain Guy <romainguy@google.com> Add a way to measure potential framerate of the view hierarchy.

Change-Id: Ia19c7ed143d8a823fd678ffab84613ea075d228a
/frameworks/base/core/java/android/view/View.java
b39f051631250c49936a475d0e64584afb7f1b93 24-May-2011 Chet Haase <chet@google.com> Add 'Property' object

This change adds a generic Property facility to the SDK, which allows an
easy way to reference fields (private or otherwise) in a general way.
For example, animations can use this facility to animate 'properties'
on target objects in a way that is more code- and compiler-friendly than
the existing String-based approach (for objects which have implemented
Properties, of course). The animator classes have been updated to use
this new approach (in addition to Strings, which are still more generally
useful for objects which have get/set functions but not Property objects).

The change also includes new Property objects on View (which can now be
used in creating animations on Views).

There is an unrelated change on GLES20RecordingCanvas to change the way we
cache bitmaps, which avoids spurious garbage by using an ArrayList instead of
a HashSet.

Change-Id: I167b43a3fca20e7695b1a23ca81274367539acda
/frameworks/base/core/java/android/view/View.java
c46f7ffa9079f3ae8a5204e7519ed7a1250116d0 07-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Rename atribute View horizontalDirection to layoutDirection and update unit tests

- update before/after to start/end in unit test app

Change-Id: Id7286ef5d9390540faf8ecd5f0b1c140d04bb364
/frameworks/base/core/java/android/view/View.java
8643aa0179e598e78d938c59035389054535a229 20-Apr-2011 Svetoslav Ganov <svetoslavganov@google.com> Interrogation of the view hierarchy from an AccessibilityService.

1. Views are represented as AccessibilityNodeInfos to AccessibilityServices.

2. An accessibility service receives AccessibilityEvents and can ask
for its source and gets an AccessibilityNodeInfo which can be used
to get its parent and children infos and so on.

3. AccessibilityNodeInfo contains some attributes and actions that
can be performed on the source.

4. AccessibilityService can request the system to preform an action
on the source of an AccessibilityNodeInfo.

5. ViewAncestor provides an interaction connection to the
AccessibiltyManagerService and an accessibility service uses
its connection to the latter to interact with screen content.

6. AccessibilityService can interact ONLY with the focused window
and all calls are routed through the AccessibilityManagerService
which imposes security.

7. Hidden APIs on AccessibilityService can find AccessibilityNodeInfos
based on some criteria. These API go through the AccessibilityManagerServcie
for security check.

8. Some actions are hidden and are exposes only to eng builds for UI testing.

Change-Id: Ie34fa4219f350eb3f4f6f9f45b24f709bd98783c
/frameworks/base/core/java/android/view/View.java
bce84d2bcaa30b9d937b629111091e9f6286c3eb 03-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Improve ViewDebug informations for View and LineaLayout

Change-Id: Ie34519c975027dead806b7859b638d78c39ace77
/frameworks/base/core/java/android/view/View.java
4f5aa91ba58486ff25904942320b234986094958 01-Jun-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix View default horizontal direction

- set default value to View.HORIZONTAL_DIRECTION_INHERIT
- code refactoring

Change-Id: Ib5b49c8f8ebd6461992bff87603fdbb4b261218e
/frameworks/base/core/java/android/view/View.java
5ff0f99b23da389f59fe736c4c670c60f13be8ea 27-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Add support for Gravity BEFORE and AFTER"
6a03640539405afbdefe72894759281b98aa6e6f 23-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Add support for Gravity BEFORE and AFTER

- update layouts
- add Callback2 for RTL aware Drawable
- add unit tests

Change-Id: Ic64d0291e262170aff7297c6580b0b422eaa8d89
/frameworks/base/core/java/android/view/View.java
ec6331b82a41beda86d9ff1797af6001603f0053 25-May-2011 Scott Main <smain@google.com> docs: add accepted values for setting status bar visibility

Change-Id: I67ef29f8ccc7b4a754ebb24efd96e9821e3d8662
/frameworks/base/core/java/android/view/View.java
cca2c9807206f320bd41bf8656a227e4f249e4ba 20-May-2011 Chet Haase <chet@google.com> Add ability to transition parent hierarchy in layout transitions

This change compensates for changes in the parent hierarchy of
transitioning views. It automatically animates parents with the same
animations as those used for the CHANGING animations run on the container
children.

Change-Id: I86471d16a9070b024cc09c8f6e0f504a881fa99f
/frameworks/base/core/java/android/view/View.java
71fcc865e3ac3a3b05ffa204e6a2eaa8bad48a8c 20-May-2011 Romain Guy <romainguy@google.com> Merge "Code cleanup."
88b4f153e2be863d79f4d7f68af95e0f9375e4ec 20-May-2011 Romain Guy <romainguy@google.com> Code cleanup.

Change-Id: Ia6ea04b83832db2f39e3168ef2596c24273a7ef3
/frameworks/base/core/java/android/view/View.java
1714c21c15b83e555cb6cd47019145eecf5e8871 22-Feb-2010 Cibu Johny <cibu@google.com> View horizontalDirection public attribute resolution to an internal var.

- add more comment

Change-Id: I514c6ace3a98d56aa0b5c52221dee3045656071f
/frameworks/base/core/java/android/view/View.java
dff789754865dff19792f0799cce2f76f7d41227 17-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "View horizontalDirection public attribute resolution to an internal var."
63e2c0888d1a4f91a48874052d13c95291fdfea7 17-May-2011 Chet Haase <chet@google.com> Merge "Fix for using HARDWARE layers on unaccelerated views."
6f33e81a0b3a95396318e987e234dc8e1dce1eb9 17-May-2011 Chet Haase <chet@google.com> Fix for using HARDWARE layers on unaccelerated views.

If a view is not accelerated but has its layer type set to
LAYER_TYPE_HARDWARE, then the framework will use the old drawing cache
approach, to cache it in a bitmap. This works fine, but when the layer
is set to NONE, that drawing cache is not destroyed, as it would be were
the layer set to LAYER_TYPE_SOFTWARE. This prevents future invalidations on
the view from working correctly because the bitmap cache has never been
destroyed and recreated.

The fix is to always destroy the drawing cache when the layer type is
changed from SOFTWARE or HARDWARE, to make sure that it gets set appropriately
regardless of the state of the view's acceleration.

Change-Id: I449649e6d370477825015505da76564455a156e6
/frameworks/base/core/java/android/view/View.java
8666663e6e6dfe615c8e29cae4a42c8f135b7554 22-Feb-2010 Cibu Johny <cibu@google.com> View horizontalDirection public attribute resolution to an internal var.

Change-Id: Id87ab188faef27ff039cf6a400118707ee74a27d
/frameworks/base/core/java/android/view/View.java
b5dde704cd2db7a0eb09243637ccbf4b3465ad3d 17-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Adding horizontalDirection public attribute for View."
7632cb9be5519ea9eace14a55fa9998f85c2af26 22-Feb-2010 Cibu Johny <cibu@google.com> Adding horizontalDirection public attribute for View.

Change-Id: Ic8a03447252e4e155c3ee874b1d8c8ac0bc9f7f5
/frameworks/base/core/java/android/view/View.java
aa126171ae5c4c6449345471500f9bb124558643 14-May-2011 Eric Fischer <enf@google.com> Fix the build by removing @Override within javadoc comments.

Change-Id: I984cc6224185ab84e904bfc89eae80d567fcb59b
/frameworks/base/core/java/android/view/View.java
8bd6d36c68ff8f32554b6d71323f44e71298e520 13-May-2011 Romain Guy <romainguy@google.com> Merge "Remove useless code."
4c8ed71cc70b9fdd2d90f3535aebb918d77747c8 13-May-2011 Romain Guy <romainguy@google.com> Remove useless code.

Change-Id: Ic2418438235e1fbcb8ccfece9c74c54fc46229df
/frameworks/base/core/java/android/view/View.java
73162196e712c5f71238642bf8ca0b5984ee51a4 13-May-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Factored out the Accessibility vertical initialization."
30401328c1026389171d454c934c15875c3f7ff0 13-May-2011 Svetoslav Ganov <svetoslavganov@google.com> Factored out the Accessibility vertical initialization.

1. Accessibility events were filled with data in
dispatchPopulateAccessibilityEvent and
onPopulateAccessibilityEvent. These events have
two axis of population 1) up the class
hierarchy to populate information for the event
source; 2) down the view hierarchy to populated
all the text contained in the source including
its descendants. These two axis of population
were done in on population pass now the populating
the source properties happens in initializeAccessiblityEvent
and the text in onPopulateAccessibilityEvent which
is called from dispatchPopulateAccessiblityEvent.

2. Removed the string description from events fired from
CompoundButton since the event has isChecked()
property and it is responsibility of the clients
to decide what utterrance to use and if to use such
for announcing the checked state.

Change-Id: I5d7f75cf8a87a7a4b3bb7b311e8e642ec9a0faa5
/frameworks/base/core/java/android/view/View.java
65f47d88107b2e34e4bab1f5208bff3f73ce4e8a 13-May-2011 Jeff Brown <jeffbrown@google.com> Merge "Add initial API for stylus and mouse buttons."
fe9f8ab03a63b1037f07dd85799fbea80ec6adaa 07-May-2011 Jeff Brown <jeffbrown@google.com> Add initial API for stylus and mouse buttons.

Added the concept of pointer properties in a MotionEvent.
This is currently used to track the pointer tool type to enable
applications to distinguish finger touches from a stylus.

Button states are also reported to application as part of touch events.

There are no new actions for detecting changes in button states.
The application should instead query the button state from the
MotionEvent and take appropriate action as needed.

A good time to check the button state is on ACTION_DOWN.

As a side-effect, applications that do not support multiple buttons
will treat primary, secondary and tertiary buttons identically
for all touch events.

The back button on the mouse is mapped to KEYCODE_BACK
and the forward button is mapped to KEYCODE_FORWARD.

Added basic plumbing for the secondary mouse button to invoke
the context menu, particularly in lists.

Added clamp and split methods on MotionEvent to take care of
common filtering operations so we don't have them scattered
in multiple places across the framework.

Bug: 4260011
Change-Id: Ie992b4d4e00c8f2e76b961da0a902145b27f6d83
/frameworks/base/core/java/android/view/View.java
5c22a8c80aefe8c0739e93321f8cead5b60571e4 13-May-2011 Romain Guy <romainguy@google.com> Fix waaayyy too many documentation links.

Change-Id: Ia8d56149d8b92d85239ad62adacbf65d1e9e127d
/frameworks/base/core/java/android/view/View.java
b51cc1dd63808da505cd8beb7300f57dc98ff1d3 05-May-2011 Patrick Dubroy <dubroy@google.com> Merge "Only delay pressed feedback for Views inside a scrolling parent"
e0a799a2ac1ca78e30fbac9e4e12a063425c08d3 05-May-2011 Patrick Dubroy <dubroy@google.com> Only delay pressed feedback for Views inside a scrolling parent

Add a method on ViewGroup to determine whether it supports scrolling.
This allows us to show the pressed feedback immediately in many cases,
improving responsiveness of buttons, etc.

This patch also lengthens the timeout in order to reduce flashes
when the user is scrolling.

Change-Id: Ieb91ae7a1f8e8f7e87448f2a730381a53947996f
/frameworks/base/core/java/android/view/View.java
c6cc0f8c19d9eccf408a443fa2bf668af261dcd0 12-Apr-2011 Joe Onorato <joeo@google.com> Rename ViewRoot to ViewAncestor.

ViewRoot is about to be a new public class for poking at ViewAncestor.

Change-Id: Ie95d707c6d8bbb48f78d093d7b2667851812a7d5
/frameworks/base/core/java/android/view/View.java
5a7e94ea89196074962a1864aa785bc4d855c771 26-Apr-2011 Adam Powell <adamp@google.com> Only set the accelerated drawable state for views when the hardware
renderer is available.

Change-Id: I5bcf2068771d47604e12a44e1ab870fa4c69fb4c
/frameworks/base/core/java/android/view/View.java
736c2756bf3c14ae9fef7255c119057f7a2be1ed 23-Apr-2011 Svetoslav Ganov <svetoslavganov@google.com> Touch exploration feature, event bubling, refactor

1. Added an Input Filter that interprets the touch screen motion
events to perfrom accessibility exploration. One finger explores.
Tapping within a given time and distance slop on the last exlopred
location does click and long press, respectively. Two fingers close
and in the same diretion drag. Multiple finglers or two fingers in
different directions or two fingers too far away are delegated to
the view hierarchy. Non moving fingers "accidentally grabbed the
device for the scrren" are ignored.

2. Added accessibility events for hover enter, hover exit, touch
exoloration gesture start, and end. Accessibility hover events
are fired by the hover pipeline. An accessibility event is
dispatched up the view tree and the topmost view fires it.
Thus predecessors can augment the fired event. An accessibility
event has several records and a predecessor can optionally
modify, delete, and add such to the event.

3. Added onPopulateAccessibilityEvent and refactored the existing
accessibility code to use it.

4. Added API for querying the currently enabled accessibility services
by feedback type.

Change-Id: Iea2258c07ffae9491071825d966dc453b07e5134
/frameworks/base/core/java/android/view/View.java
3fb3d7c4e756bd32d5abde0abca9ab52d559bc84 23-Apr-2011 Adam Powell <adamp@google.com> Revert "Touch exploration feature, event bubling, refactor"

This reverts commit ac84d3ba81f08036308b17e1ab919e43987a3df5.

There seems to be a problem with this API change. Reverting for now to
fix the build.

Change-Id: Ifa7426b080651b59afbcec2d3ede09a3ec49644c
/frameworks/base/core/java/android/view/View.java
f9fa622cc04028fd7c5f5036ea2e0ccfb80d55f3 23-Apr-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Touch exploration feature, event bubling, refactor"
ac84d3ba81f08036308b17e1ab919e43987a3df5 05-Apr-2011 Svetoslav Ganov <svetoslavganov@google.com> Touch exploration feature, event bubling, refactor

1. Added an Input Filter that interprets the touch screen motion
events to perfrom accessibility exploration. One finger explores.
Tapping within a given time and distance slop on the last exlopred
location does click and long press, respectively. Two fingers close
and in the same diretion drag. Multiple finglers or two fingers in
different directions or two fingers too far away are delegated to
the view hierarchy. Non moving fingers "accidentally grabbed the
device for the scrren" are ignored.

2. Added accessibility events for hover enter, hover exit, touch
exoloration gesture start, and end. Accessibility hover events
are fired by the hover pipeline. An accessibility event is
dispatched up the view tree and the topmost view fires it.
Thus predecessors can augment the fired event. An accessibility
event has several records and a predecessor can optionally
modify, delete, and add such to the event.

3. Added onPopulateAccessibilityEvent and refactored the existing
accessibility code to use it.

4. Added API for querying the currently enabled accessibility services
by feedback type.

Change-Id: Iec03c6c3fe298de3f14cb6efdbb9b198cd531a0c
/frameworks/base/core/java/android/view/View.java
44bc17c6b517aef35a390c81b5aa79c4f284f744 21-Apr-2011 Dianne Hackborn <hackbod@google.com> Rework display size access.

Applications now get the display size from the window manager. No
behavior should be changed yet, this is just prep for some real
changes.

Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
/frameworks/base/core/java/android/view/View.java
bbdc50b102faf52768ac3028bc49e027ff140656 20-Apr-2011 Jeff Brown <jeffbrown@google.com> Track unhandled input events in consistency verifiers.

This fixes spurious verification errors that would be generated
when a view declined an initial event such as ACTION_DOWN. Since
the view would not receive the rest of the event stream, it would
not see the corresponding ACTION_UP and the next ACTION_DOWN would
trigger a spurious verification error.

Change-Id: I2386acf378cd1765d5446faed5ad9c6525f8b400
/frameworks/base/core/java/android/view/View.java
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
/frameworks/base/core/java/android/view/View.java
21bc5c917d4ee2a9b2b8173091e6bba85eaff899 01-Mar-2011 Jeff Brown <jeffbrown@google.com> Add a little input event consistency verifier.

The idea is to assist with debugging by identifying cases in which
the input event stream is corrupted.

Change-Id: I0a00e52bbe2716be1b3dfc7c02a754492d8e7f1f
/frameworks/base/core/java/android/view/View.java
3d4bf17f49b82355b3b82d8bdaec4d65c4293bc9 29-Mar-2011 Christopher Tate <ctate@google.com> Add view/drawable states for drag-accepting / drag-hovered

Added new drag_can_accept and drag_hovered XML attributes and the View
logic to support them. Drawable states are now refreshed automatically
when a drag starts/ends and when a drag crosses the boundary of a
participating view.

Change-Id: I25f8ee02c83b3fa4f27201997d7eabf4be653fd8
/frameworks/base/core/java/android/view/View.java
dff626c56ac42bdcc7af5a300eefccd3fee3d166 25-Mar-2011 Jeff Brown <jeffbrown@google.com> Merge "Added a hovered state for drawables."
c33d8d49e44358d72f19e7f7730c03d3902fa1f2 15-Mar-2011 PY Laligand <pylaligand@google.com> Added a hovered state for drawables.

Change-Id: I2b12c8593e04e37c8eb748946ca6d4d7a61de36a
/frameworks/base/core/java/android/view/View.java
9c78930046a6e393764b58e6d7d4648963306d3f 25-Mar-2011 Michael Jurka <mikejurka@google.com> Merge "Fixing invalidate problems in software rendered mode"
d0872bd38a449012e3165ddf9cfca31b6044c05b 24-Mar-2011 Michael Jurka <mikejurka@google.com> Fixing invalidate problems in software rendered mode
/frameworks/base/core/java/android/view/View.java
b7c25ce3aef3c6e930fc3f31436f52aed8ebed14 24-Mar-2011 Jeff Brown <jeffbrown@google.com> Merge "Add MotionEvent.HOVER_ENTER and HOVER_EXIT."
a032cc008618b83ecbbede537517d1e7998e3264 08-Mar-2011 Jeff Brown <jeffbrown@google.com> Add MotionEvent.HOVER_ENTER and HOVER_EXIT.

The input dispatcher sends a HOVER_ENTER to a window before dispatching
it any HOVER_MOVE events. For compatibility reasons, the window will
*also* receive the HOVER_MOVE. When the pointer moves into a different
window or the pointer goes down or when events are canceled for some reason,
the input dispatcher sends a HOVER_EXIT to the previously hovered window.

The view hierarchy behavior is similar. All views under the pointer
receive onHoverEvent with HOVER_ENTER followed by any number of HOVER_MOVE
events. When the pointer leaves a view, the view receives HOVER_EXIT.
Similarly, if a parent view decides to capture hover by returning true
from onHoverEvent, the hovered descendants will receive HOVER_EXIT.

The default behavior of onHoverEvent is to update the view's hovered
state by calling setHovered(true/false). Views can query their current
hovered state using isHovered().

For testing purposes, the hovered state is mapped to the pressed
drawable state. This will change in a subsequent commit with the
introduction of a new hovered drawable state.

Change-Id: Ib76a7a90236c8f2c7336e55773acade6346cacbe
/frameworks/base/core/java/android/view/View.java
c5a43a249baad41acede2ab132d797c342c321e7 24-Mar-2011 Romain Guy <romainguy@google.com> Avoid NPE in postInvalidate().
Bug #4048131

Change-Id: I020400fc97015240924461674ca7bf8077059152
/frameworks/base/core/java/android/view/View.java
77b80c06af064403d9d6e8fbe04d76dd6f7d2dbb 16-Mar-2011 Svetoslav Ganov <svetoslavganov@google.com> Pressed state not cleared if view is disabled in long click handler

bug:2133127

If a View is disabled its onTouchEvent handler uses a shortcut
path for efficient handling which does not clear the pressed
flag. As a result if the view is disabled in a long click
handler the view keeps being in pressed state. The fix is to
clear if needed the pressed flag in the shortcut path
of onTouchEvent.

Change-Id: I046a62c2fce751c27fec3cfb756b74431fc003c3
/frameworks/base/core/java/android/view/View.java
7b5b6abf852c039983eded25ebe43a70fef5a4ab 15-Mar-2011 Romain Guy <romainguy@google.com> Fix rendering artifact in edge fades.
Bug #4092053

The problem always existed but was made visible by partial invalidation.
When saving a layer, the renderer would try to postpone glClear()
operations until the next drawing command. This however does not work
since the clip might have changed. The fix is rather simple and
simply gets rid of this "optimization" (that turned out to be
usless anyway given how View issues saveLayer() calls.)

This change also fixes an issue with gradients (color stops where
not properly computed when using a null stops array) and optimizes
display lists rendering (quickly rejects larger portions of the
tree to avoid executing unnecessary code.)

Change-Id: I0f5b5f6e1220d41a09cc2fa84c212b0b4afd9c46
/frameworks/base/core/java/android/view/View.java
88172fe49cf78f73fa7bf2b1bde665b45b1712ca 08-Mar-2011 Chet Haase <chet@google.com> Restore save/restore calls removed recently

Calls thought to be duplicates were removed, which caused rendering problems
for Browser as well as crashes in the widget list and music.

Change-Id: I6364aaa362619ea3dd368990304d61d84bbe2a90
/frameworks/base/core/java/android/view/View.java
d6cf477e5d6245a63f71958b75c3d658cd6c100e 05-Mar-2011 Romain Guy <romainguy@google.com> Remove many unnecessary save/restore calls.

This should help complex applications by reducing the amount of
unnecessary work performed by the renderer.

Change-Id: I9bdebb1a35cdbcc3d926b7485f19d9e88a019040
/frameworks/base/core/java/android/view/View.java
acc3944dd16074491885bf0252c456e0ac190168 03-Mar-2011 Romain Guy <romainguy@google.com> Merge "Add an API to force Views to render their layer."
f1ae10640fe152b56465e7e7184731226f95b0dd 03-Mar-2011 Romain Guy <romainguy@google.com> Add an API to force Views to render their layer.

Change-Id: Id5776f3b0880fdf75835f16560a1d03a3175d139
/frameworks/base/core/java/android/view/View.java
05dc66ada6b61a6bdf806ffaa62617ac5394695d 02-Mar-2011 Jeff Brown <jeffbrown@google.com> Fade out the mouse pointer after inactivity or other events.

Fades out the mouse pointer:
- after 15 seconds of inactivity normally
- after 3 seconds of inactivity in lights out mode
- after a non-modifier key down
- after a touch down

Extended the native Looper to support enqueuing time delayed
messages. This is used by the PointerController to control
pointer fade timing.

Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
/frameworks/base/core/java/android/view/View.java
33bbfd2232ea9eaae9a9d87a05a95a430f09bd83 25-Feb-2011 Jeff Brown <jeffbrown@google.com> Add support for mouse hover and scroll wheel.

Dispatch ACTION_HOVER_MOVE and ACTION_SCROLL through the View
hierarchy as onGenericTouchEvent. Pointer events dispatched
this way are delivered to the view under the pointer. Non-pointer
events continue to be delivered to the focused view.

Added scroll wheel support to AbsListView, ScrollView,
HorizontalScrollView and WebView. Shift+VSCROLL is translated
to HSCROLL as appropriate.

Added logging of new pointer events in PointerLocationView.

Fixed a problem in EventHub when a USB device is removed that
resulted in a long stream of ENODEV errors being logged until INotify
noticed the device was gone.

Note that the new events are not supported by wallpapers at this time
because the wallpaper engine only delivers touch events.

Make all mouse buttons behave identically. (Effectively we only
support one button.)

Change-Id: I9ab445ffb63c813fcb07db6693987b02475f3756
/frameworks/base/core/java/android/view/View.java
0277c171283826dce53cc48e8dd66187051227e4 25-Feb-2011 Gilles Debunne <debunne@google.com> Merge "Code clean-up around ScrollView."
2ed2eacd7e0569675410f1e62238b708c5dcc8ac 25-Feb-2011 Gilles Debunne <debunne@google.com> Code clean-up around ScrollView.

Change-Id: Ia110f30279a93c96741e9afbd93ed6231aa97ef1
/frameworks/base/core/java/android/view/View.java
a00f3865f55c5c9cb74510ee2b239d101230133c 22-Feb-2011 Chet Haase <chet@google.com> Add ViewPropertyAnimator for easy animation of View properties

Change-Id: I2bc52ca16507d8d20004d2d6823e587791272aac
/frameworks/base/core/java/android/view/View.java
a5364ee8942cd9f0546f80f6430812ca2ee59f30 24-Feb-2011 Romain Guy <romainguy@google.com> Add an API to control the distance between a View and its camera.

Change-Id: Ibaf4e7dc827933f7ad2bb7ab50c1dcef45fee83c
/frameworks/base/core/java/android/view/View.java
47b8adec3904535c8d8ce2b6e42ecd736f2d90ce 24-Feb-2011 Romain Guy <romainguy@google.com> Add a new Camera API to control the camera's location

Change-Id: Id9a082d2def803eb527e1987875e0d8a22c6e8aa
/frameworks/base/core/java/android/view/View.java
795e42e91ad049d7ddf5c3672a40f044fbc4d1e2 22-Feb-2011 Romain Guy <romainguy@google.com> Merge "Add more info to View.getLayoutParams()"
01c174bce3ab78ff85bf27f549b29ab9fcb70ac2 22-Feb-2011 Romain Guy <romainguy@google.com> Add more info to View.getLayoutParams()

Change-Id: I9abc64c9bbf726a02256a9ab692d9c555a6e3525
/frameworks/base/core/java/android/view/View.java
4afd62b18c52a55371ab923d54f93615ad68fd7a 19-Feb-2011 Adam Powell <adamp@google.com> Add an API to listen for window attach/detach events on a View.

Fix bug 3312949 - inconsistent state in MenuPopupHelper

Change-Id: Ie802ada3f8de4cf71c92fcc7c6abce9ba85e7b75
/frameworks/base/core/java/android/view/View.java
e9140a72b1059574046a624b471b2c3a35806496 17-Feb-2011 Chet Haase <chet@google.com> Fix invalidation bug with View bounds properties

When setLeft/Right/Top/Bottom() functions were called on View,
invalidation was only happening at the parent level. When an
app is hardware accelerated, this means that the view's display
list is not being recreated. So views that were changing size due
to these calls were not getting redrawn properly, causing some
artifacts in animations (especially LayoutTransition, which
calls these setters).

Fix is to invalidate the child instead of just the child's bounds
in the parent.

Change-Id: Ic8b2a5db519345dce617f914c2214738f22031b2
/frameworks/base/core/java/android/view/View.java
93a4dc6c3f5705d5e45ba6d7288fb824992a5749 15-Feb-2011 Christopher Tate <ctate@google.com> Merge "Disable cross-app drag/drop"
7f9ff9d191f00354c564a70eeeb1eda2b32eb1c7 15-Feb-2011 Christopher Tate <ctate@google.com> Disable cross-app drag/drop

@hides the View constant that designates a drag as cross-app, and also
forcibly ignores that flag on the system_server side even if it's passed
to startDrag() as a literal.

Change-Id: I6f321bdf0389db5bb44131fd0f8d6b92f049be52
/frameworks/base/core/java/android/view/View.java
0211a0a10d20ec99bd78905ea9cd2960f7beb4c8 15-Feb-2011 Romain Guy <romainguy@google.com> Gracefully handle drawing caches allocation failure.
Bug #3431451

This bug was causing ListView to not render properly when showing an item
larger than the maximum drawing cache size. ListView relies on the drawing
cache to correctly mask all the background pixels. However, if the cache
is not properly created, the background will show through even though
ListView.isOpaque() == true. This change detects this case and falls
back to the default non opaque behavior.

Change-Id: I30a45e7a03fb7ebb2b12f0e85c075c2901954c44
/frameworks/base/core/java/android/view/View.java
676b17391fb6583e5df944c36b1bd4c1be835689 14-Feb-2011 Romain Guy <romainguy@google.com> Deprecate ARGB_4444.

It looks awful.
Don't use it.
Use ARGB_8888, it's much better.
If you think you need ARGB_4444, you are wrong.
You are.

Change-Id: I4d6963cf98b6a8fb34cebcd0d24b9fd66b5a0fbf
/frameworks/base/core/java/android/view/View.java
bb01f8a2d0656648cef6b4d665ad66b711f88157 04-Feb-2011 Michael Jurka <mikejurka@google.com> am d51e0820: am 8275c608: Merge "adding fast setters for translationx/y" into honeycomb

* commit 'd51e0820b3b7a71f2b3e0447bdf05188588c6003':
adding fast setters for translationx/y
b0905c998da7d4f7c8b7275ec0dcfa691d370e4e 04-Feb-2011 Romain Guy <romainguy@google.com> am 20bf23e5: am ac14db72: Merge "Fast transform properties setters. Bug #3413510" into honeycomb

* commit '20bf23e5e4172f5f80ce6c4cc16168355b107f0d':
Fast transform properties setters. Bug #3413510
dece29ffd345c08f63f331e5766a5df906656798 03-Feb-2011 Michael Jurka <mikejurka@google.com> adding fast setters for translationx/y
/frameworks/base/core/java/android/view/View.java
da489796e5836b7db4cf3c925c40db449ac6e9ec 03-Feb-2011 Romain Guy <romainguy@google.com> Fast transform properties setters.
Bug #3413510

Change-Id: I2c83e219faff697a48a160fee627f87422a2cd08
/frameworks/base/core/java/android/view/View.java
dcbcb680bc21059bf527f5c3c72373f26b2cd298 03-Feb-2011 Romain Guy <romainguy@google.com> am 44e3b0d0: am f44ed5ad: Merge "Don\'t clobber the local dirty rect after rendering a layer. Bug #3417254 Bug #3413433" into honeycomb

* commit '44e3b0d0344955d5ce1bbb0b329627e24b7dd468':
Don't clobber the local dirty rect after rendering a layer. Bug #3417254 Bug #3413433
62687ec12cb8e0b1d4044a235b1387b9a8c3b4b4 03-Feb-2011 Romain Guy <romainguy@google.com> Don't clobber the local dirty rect after rendering a layer.
Bug #3417254
Bug #3413433

Change-Id: I8045e9ec414ebe4ce4d38124142a00726d2c634d
/frameworks/base/core/java/android/view/View.java
34cdf5bbb7d4d09e95cc6579a96c384284f99455 02-Feb-2011 Romain Guy <romainguy@google.com> am debeeef5: am d51eaa64: Merge "Update layers based on the dirty region. Bug #3413433" into honeycomb

* commit 'debeeef50408cf12f1041426e7438be266789a62':
Update layers based on the dirty region. Bug #3413433
3a3133d876caf60ebff2176ad75c3dcf0259148d 02-Feb-2011 Romain Guy <romainguy@google.com> Update layers based on the dirty region.
Bug #3413433

This helps Launcher when a widget updates during a scroll, or when interacting
with widgets on the workspace if layers are still turned on.

Change-Id: Ic7a42eb34f74f4ae988039754f815e2efd1d1e4f
/frameworks/base/core/java/android/view/View.java
4e96efe2edb73a8fbe4b89e85e03327da9796d80 02-Feb-2011 Romain Guy <romainguy@google.com> am a42ee699: am 518813ec: Merge "New API to let apps draw without layers. Bug #3413433" into honeycomb

* commit 'a42ee6994b59c02a745cb5d0f8ec257d01424753':
New API to let apps draw without layers. Bug #3413433
849d0a37cf2ca6c6a6c2d4d4456495e32e363120 02-Feb-2011 Romain Guy <romainguy@google.com> New API to let apps draw without layers.
Bug #3413433

Launcher now enables layers all the time, but in some cases (for instance, when the
workspace is not scrolling,) it is more efficient to draw without the layer.

Change-Id: I625fb5b48506acda9ae75356fdbbe812c85f2aab
/frameworks/base/core/java/android/view/View.java
74c86d3e3a5206fef8d2e0ad1727bf903a76a638 01-Feb-2011 Chet Haase <chet@google.com> am 0a198c80: am 2cd52c80: Merge "Fix invalidation issue with actionbar items" into honeycomb

* commit '0a198c80765a0fbf52bdc84fddd11bc86c83ed51':
Fix invalidation issue with actionbar items
2cd52c809e52c042ad61067c93a4b5521eadd503 01-Feb-2011 Chet Haase <chet@google.com> Merge "Fix invalidation issue with actionbar items" into honeycomb
f28595e47d7a2712df3e2d2e7b6591d1333add3b 01-Feb-2011 Chet Haase <chet@google.com> Fix invalidation issue with actionbar items

When a view hierarchy becomes VISIBLE, it is possible that the display
list of some of the subtrees needs to be recreated. In particular, if
the subtree was measured while it was GONE, then the children probably
didn't have a valid size. If a display list is created for any of the
subnodes in the tree during this time, then they may have clipped the
children out.

The fix is to force the parent to become INVALIDATED whenever a child
view's bounds change (and it is VISIBLE).

Change-Id: I3624253e65354289f4fb94c9ba76a7e6fb82af9a
/frameworks/base/core/java/android/view/View.java
b4e28848e3244096fc1a7cff7f6a5ad688c96022 31-Jan-2011 Joe Onorato <joeo@google.com> am 19a02219: am fe6fd242: Merge "Mask out the non public bits, not the public ones." into honeycomb

* commit '19a022194d0e049759112a743835af323f4b05a1':
Mask out the non public bits, not the public ones.
6ab77bd5b3e613b064ebfa5780f21b79f81390a9 31-Jan-2011 Joe Onorato <joeo@google.com> Mask out the non public bits, not the public ones.

Bug: 3406103
Change-Id: I44b16700567cb2bf76efe9e8c1f9c82d0eaa8f10
/frameworks/base/core/java/android/view/View.java
60d9d9cdba31e2d3483b33138d2e98ce8be4567b 31-Jan-2011 Joe Onorato <joeo@google.com> am 75057b15: am 4de68bae: Merge "Check for the STATUS_BAR permission for the system UI properties." into honeycomb

* commit '75057b1507881625368f76b2f401097b606bd530':
Check for the STATUS_BAR permission for the system UI properties.
ac0ee89bd985c024870fefca9a3422c4585b62d4 31-Jan-2011 Joe Onorato <joeo@google.com> Check for the STATUS_BAR permission for the system UI properties.

If the app doesn't have that permission, just mask out the bits.
Also makes the systemUiVisibility field visible in hierarchyviewer.

Change-Id: Ic3d3a3aed96b5c6448832755b4b2e6175117e5be
/frameworks/base/core/java/android/view/View.java
69aedbedfef2e2633076004000ae8931039ff7f5 30-Jan-2011 Joe Malin <jmalin@google.com> am f5002922: am 51990f9b: Merge "sdk doc change: Copy/Paste/Drag/Drop" into honeycomb

* commit 'f50029220664be6cc5b2b4c18377b0efa9fe6ca5':
sdk doc change: Copy/Paste/Drag/Drop
51990f9b0c7c0a22e1a3440c620ab97ebe4209c9 30-Jan-2011 Joe Malin <jmalin@google.com> Merge "sdk doc change: Copy/Paste/Drag/Drop" into honeycomb
9805d8e0818ea4e8ebddf20d40cf1856ecee6cc8 29-Jan-2011 Christopher Tate <ctate@google.com> Merge "Enable global (cross-application) drag/drop"
251602f410aaecc482a13d12984e67e3ddc1ef9c 29-Jan-2011 Christopher Tate <ctate@google.com> Enable global (cross-application) drag/drop

Also adds a new flag constant, View.DRAG_FLAG_GLOBAL, which indicates that
the drag operation should be allowed to propagate the drag outside the
originating app. When this flag is specified, all visible windows will
be notified about the ongoing drag.

Bug 3322724

Change-Id: Iaa3412a97f83f4e763019c9a03b5f09ebf75453f
/frameworks/base/core/java/android/view/View.java
b6689044e917e8ec4de8972e646eb58f65406c1b 29-Jan-2011 Joe Onorato <joeo@google.com> am 9fecc19f: am 430dde3e: Merge "Don\'t force all views to be asking for lights out just because somebody did." into honeycomb

* commit '9fecc19f97453cc3ef258100f3a8e323011a7e80':
Don't force all views to be asking for lights out just because somebody did.
957a189bf2b28b063d7268e38b6cdae3304f1ea7 29-Jan-2011 Joe Onorato <joeo@google.com> Don't force all views to be asking for lights out just because somebody did.

Bug: 3396308
Bug: 3395422
Change-Id: Ic97a689bda12d3b53a6ecace504d411f2beb87d5
/frameworks/base/core/java/android/view/View.java
489c8960b66387fb043350310e5b53554cff4c1f 28-Jan-2011 Romain Guy <romainguy@google.com> am 571a2c97: am b0c939ad: Merge "Prevent crash when detaching a SurfaceView. Bug #3400461" into honeycomb

* commit '571a2c971b9691f3ace247bf2110efccc782f3ba':
Prevent crash when detaching a SurfaceView. Bug #3400461
b0c939adfa339c5cbb7f458072119269368b3ba5 28-Jan-2011 Romain Guy <romainguy@google.com> Merge "Prevent crash when detaching a SurfaceView. Bug #3400461" into honeycomb
bafa3a31f58a52d49883db43167e28c16af1fc61 28-Jan-2011 Joe Onorato <joeo@google.com> am d6874a10: am cfd0bafd: Merge changes Iaa7bc042,Icc312fc9,I50ba06ed into honeycomb

* commit 'd6874a105ee584b1dc60aae2f2af7c78ee875114':
Make keyguard also ask to turn the back button off, now that it is controlled separately.
Allow independent control of the back and the other navigation buttons.
Allow the status bar disable flags to be used as View's system ui visibility fields.
01d5edc49ae8995aabffe1a30bfd966faaf70bd6 28-Jan-2011 Romain Guy <romainguy@google.com> Prevent crash when detaching a SurfaceView.
Bug #3400461

Change-Id: I837d9d47b12bc5a8798b6dbb720de43b7539c3bc
/frameworks/base/core/java/android/view/View.java
6478adc6b4c35f8c56176582bcde029998e7436f 28-Jan-2011 Joe Onorato <joeo@google.com> Allow independent control of the back and the other navigation buttons.

Bug: 3363046
Change-Id: Icc312fc9ffbf2f584dc541489c9769b07ed50315
/frameworks/base/core/java/android/view/View.java
7bb8eeb90cf55f409a282c1f36ca08aa48c10543 28-Jan-2011 Joe Onorato <joeo@google.com> Allow the status bar disable flags to be used as View's system ui visibility fields.

Bug: 3363046
Change-Id: I50ba06ed9a4d2f5d0e0c807437aea9900f44fee9
/frameworks/base/core/java/android/view/View.java
4d7b10630a5192bfe84181a83c70c38ef0655b5f 28-Jan-2011 Adam Powell <adamp@google.com> am e3ba5cfe: am d1f94e36: Merge "Fix bug 3399725 - externally reported issue 14317: android:scrollbarSize attribute does not work in ScrollView tag" into honeycomb

* commit 'e3ba5cfe9b4f524d955f77f5fff53440d80f9464':
Fix bug 3399725 - externally reported issue 14317: android:scrollbarSize attribute does not work in ScrollView tag
38d1f2530829ae14d5ee9bf7871cb359dbf03f89 28-Jan-2011 Chet Haase <chet@google.com> am 19312cfe: am 246bf85a: Merge "Fix NPE with display lists when view not attached" into honeycomb

* commit '19312cfef15608fca2c8403dc240e8ec4f54d6b7':
Fix NPE with display lists when view not attached
3ba6774263db28bdfaa88bfdc4f2dfb37d6ce26a 27-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3399725 - externally reported issue 14317:
android:scrollbarSize attribute does not work in ScrollView tag

Change-Id: Ic2cc908936991f473ccfc60d9c2711edfd45c132
/frameworks/base/core/java/android/view/View.java
32736f085b74c4dcc9da61212ccbd6fe2de193a7 20-Jan-2011 Joe Malin <jmalin@google.com> sdk doc change: Copy/Paste/Drag/Drop

Change-Id: Ifb9ed554ae1a72ce6badff1c79d95c02f30525e9
/frameworks/base/core/java/android/view/View.java
f4ac547f868db7c8a358e1f6e3d8fcebb02dbd49 27-Jan-2011 Chet Haase <chet@google.com> Fix NPE with display lists when view not attached

There was logic in ViewGroup that assumed that an accelerated
view must always be able to get a display list for any child
that it was drawing. One situation occurred, however, that
caused a problem with this - a contacts activity was started
and not yet attached, but was being asked to render into an
accelerated canvas. We assumed that the child would have a display
list and simply called getDisplayList(). But since that call
returned null, we later deref'd the null object.

The fix is to check whether a child can have a display list
instead of assuming that it can just because the container view
is accelerated.

Change-Id: I7de62fd597ad50720c9585d621bec02e77c171df
/frameworks/base/core/java/android/view/View.java
82782446cd0ea26604fcbd22d4b7e3608f32136d 27-Jan-2011 Chet Haase <chet@google.com> am fcf51a67: am a45c056e: Merge "Fix display List bugs" into honeycomb

* commit 'fcf51a67967a402bf2178c3d0e09828e8942cade':
Fix display List bugs
a45c056e62be0ca97edbdd6f6660822cf453c886 27-Jan-2011 Chet Haase <chet@google.com> Merge "Fix display List bugs" into honeycomb
a1eb2ff008ce1b7d9d7039718a8295113abcb81a 27-Jan-2011 Romain Guy <romainguy@google.com> am 38f34ed2: am 7c53a0d6: Merge "Don\'t draw the same triangles several times. Bug #3388197" into honeycomb

* commit '38f34ed20a52d027cbf1b72fe22c6d616810613b':
Don't draw the same triangles several times. Bug #3388197
678e0adbdbac5fa3f25ca8371fdff1b3182f67e9 25-Jan-2011 Chet Haase <chet@google.com> Fix display List bugs

Various property setters in View need to invalidate the parent's
cache to get redrawn properly when accelerated with display lists.

Also, fix logic around display lists and old-style Animations in
ViewGroup.

Change-Id: I70e1c2fa49e62228ee4a1301a006ce50bda4c305
/frameworks/base/core/java/android/view/View.java
4f09f5417b5c14fd31336dacfff86972e7885a03 27-Jan-2011 Romain Guy <romainguy@google.com> Don't draw the same triangles several times.
Bug #3388197

Change-Id: Ief1dfd9447f144e9992340a173d2893e5e049129
/frameworks/base/core/java/android/view/View.java
166f26e2c2378decaf023a4c829b03034a65d160 27-Jan-2011 Dianne Hackborn <hackbod@google.com> am f35d43f9: am 2dc9c784: Merge "Fix issue #3382992: IME close animation stutters from URL bar" into honeycomb

* commit 'f35d43f90b9e4553343a59b217430aaba91b0d1f':
Fix issue #3382992: IME close animation stutters from URL bar
2dc9c784b2fab67a8233318f559e65f444bf0c97 27-Jan-2011 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #3382992: IME close animation stutters from URL bar" into honeycomb
63042d6a0347017fcc4cd98560ca3407044c165c 27-Jan-2011 Dianne Hackborn <hackbod@google.com> Fix issue #3382992: IME close animation stutters from URL bar

Gross hack is grosser.

Change-Id: I0a34bf1d7c16c547402318f24776a5f7e8b7552b
/frameworks/base/core/java/android/view/View.java
c02a1cc1b148e1d57b6d2f91e23720c308ed5afb 27-Jan-2011 Romain Guy <romainguy@google.com> am 62bea428: am 9e7c2c6d: Merge "Optimize invalidate() calls." into honeycomb

* commit '62bea4287dafc88b640d7e3fc8a433ddd858a5b8':
Optimize invalidate() calls.
9e7c2c6ded1144122915cfb8bd663e789c7eb93b 27-Jan-2011 Romain Guy <romainguy@google.com> Merge "Optimize invalidate() calls." into honeycomb
0fd89bf7221431260883cee4597e2db942d799a0 27-Jan-2011 Romain Guy <romainguy@google.com> Optimize invalidate() calls.

Change-Id: I09d99290ca74f96046702bc2604f125a1276ce05
/frameworks/base/core/java/android/view/View.java
b648c60854e74ffda4caefa26b9e1d3f6cdbf13f 26-Jan-2011 Joe Onorato <joeo@google.com> am a4a5ec5e: am 1aadb210: Merge changes I48392c75,Id09437a4,I4a0aa878 into honeycomb

* commit 'a4a5ec5e748f99c40301c9c422b3d36cb44c6081':
Expose the window flags for lights out mode.
Make TabletStatusBar call into StatusBarManagerService when it goes out of lights out mode on its own.
Make FLAG_FULLSCREEN not go into lights out mode anymore.
1aadb2108d7614d9d1ff61b41c6c31cb8d211ab9 26-Jan-2011 Joe Onorato <joeo@google.com> Merge changes I48392c75,Id09437a4,I4a0aa878 into honeycomb

* changes:
Expose the window flags for lights out mode.
Make TabletStatusBar call into StatusBarManagerService when it goes out of lights out mode on its own.
Make FLAG_FULLSCREEN not go into lights out mode anymore.
f5240cddbd5732c3929f7cd298666eb9bc999a8f 26-Jan-2011 Romain Guy <romainguy@google.com> am 7c55da5d: am f5b27e35: Merge "Fix NPE in YouTube. Bug #3385339" into honeycomb

* commit '7c55da5db50400400efbcd53a5cdc1a79c04cc63':
Fix NPE in YouTube. Bug #3385339
d30b36d3cdccc7854dedf5e3c020d2f4a8afa7b8 26-Jan-2011 Romain Guy <romainguy@google.com> Fix NPE in YouTube.
Bug #3385339

Change-Id: Id7b307994e343cdb808161a7fae590536f04252e
/frameworks/base/core/java/android/view/View.java
f5b27e35c1e0e46ffd882606d0783875e1a1ff7b 26-Jan-2011 Romain Guy <romainguy@google.com> Merge "Fix NPE in YouTube. Bug #3385339" into honeycomb
14782f705e94d4e563a48efc85fd25129fd38a7d 26-Jan-2011 Joe Onorato <joeo@google.com> Expose the window flags for lights out mode.

I hadn't wanted to do this, but it makes porting the FLAG_FULLSCREEN
stuff over to this simpler because you don't have to go find a view
to proxy through.

This change also clears the flag everywhere when the window manager
notifies the views that the change has come back.

Change-Id: I48392c7550925bcca50c5bb9e1f263e99de6c7bc
/frameworks/base/core/java/android/view/View.java
e29131cac364d38e6ee598d190027a1b9bdda01d 26-Jan-2011 Chet Haase <chet@google.com> am b69e985b: am ace9233b: Merge "Fix invalidation problem with display lists" into honeycomb

* commit 'b69e985b9aa059d6cf7498a2350d3f814b4cf711':
Fix invalidation problem with display lists
77785f9d257f663087a8c27957f506b9f7aa24c2 26-Jan-2011 Chet Haase <chet@google.com> Fix invalidation problem with display lists

It was previously the case that a view marked ~DRAWN must be
invalidated correctly already, so we would not mark any flags.
Display lists added new logic such that an undrawn node must still
be checked to see if its cache has been marked invalid. If not,
we must mark it invalid to make sure that a future rendering call
will cause the view to refresh its display list, thus refreshing its
child node tree's display lists, since that's where the invalidate
call must have originated.

Change-Id: I0f73c85459174c0e3f16d703f7eb914a706c808a
/frameworks/base/core/java/android/view/View.java
335f1513d7644a62e8d1a5b47befd950371d4665 25-Jan-2011 Romain Guy <romainguy@google.com> am b372d7cb: am 89fca351: Merge "Make nested hardware layers work again" into honeycomb

* commit 'b372d7cbea0b80cda3c7b08dcaddbd5c398911b2':
Make nested hardware layers work again
5e7f766e99c679110fa95501728bb81a8e396e58 25-Jan-2011 Romain Guy <romainguy@google.com> Make nested hardware layers work again

Change-Id: I97bde694ec1b712a1e010c8137919e6d64af3148
/frameworks/base/core/java/android/view/View.java
e965dee34135e7bce186408d1265a5cfd05a9fb1 25-Jan-2011 Romain Guy <romainguy@google.com> am 4e1db6da: am 2ff6d705: Merge "Enable partial invalidates when rendering with OpenGL." into honeycomb

* commit '4e1db6dadd404c023b71ae1ab54e990fce56abc3':
Enable partial invalidates when rendering with OpenGL.
2ff6d70521fe1f537f8ebd631f0b9b3aa8becf94 25-Jan-2011 Romain Guy <romainguy@google.com> Merge "Enable partial invalidates when rendering with OpenGL." into honeycomb
7d7b5490a0b0763e831b31bc11f17d8159b5914a 25-Jan-2011 Romain Guy <romainguy@google.com> Enable partial invalidates when rendering with OpenGL.

Change-Id: Ie8be06c4776b815e8737753eb8003b4fd8936130
/frameworks/base/core/java/android/view/View.java
63502a7fb2a0524d286d8ff1b2b84faf284927de 25-Jan-2011 Chet Haase <chet@google.com> am 2292fb4a: am 50d4de21: Merge "Fix bug with display lists and layout." into honeycomb

* commit '2292fb4afb942b5880ef20bca5b255c5e005fa5e':
Fix bug with display lists and layout.
5af048c791d1fc361e6fe3e901adc9598c8bfb72 25-Jan-2011 Chet Haase <chet@google.com> Fix bug with display lists and layout.

requestLayout() and forceLayout() should force the INVALIDATED
flag to be set, which causes a view's display list to be regenerated
on the next drawing operation. This is necessary when containers change
due to layout requests.

Change-Id: I5b18b5936b59f0605f93c8f45baf83a76dab4e5e
/frameworks/base/core/java/android/view/View.java
b05aacc1aea4eb7dec3126c88fd53680fb8765cc 24-Jan-2011 Joe Onorato <joeo@google.com> am ab8967ae: am da34e13b: Merge "Remove unwanted parameter (it was a typo)." into honeycomb

* commit 'ab8967ae9db71291094da2967e744038b7e91ff7':
Remove unwanted parameter (it was a typo).
3873da3c6ee0a63de0d91e6045b7546402f4ce3d 24-Jan-2011 Chet Haase <chet@google.com> am 2acb67ec: am 67005b05: Merge "Use optimized display lists for all hwaccelerated rendering" into honeycomb

* commit '2acb67ec9fe34316231519373f59dfb76c03d57b':
Use optimized display lists for all hwaccelerated rendering
10f4126a367071a49f208f10ceb1ed0e1151d48c 24-Jan-2011 Joe Onorato <joeo@google.com> resolved conflicts for merge of faf083ef to master

Change-Id: I316a1b4356f6dba6c3880ccb02dbb2fa00d21a85
da34e13bb4ef97832c43489937a26d314437a1d7 24-Jan-2011 Joe Onorato <joeo@google.com> Merge "Remove unwanted parameter (it was a typo)." into honeycomb
e595cad6ee3971ff43b94a71fb46d1a72d84544f 24-Jan-2011 Joe Onorato <joeo@google.com> Remove unwanted parameter (it was a typo).

Bug: 3241144
Change-Id: I569f6c8dffb17041a422be6084b6eab89624a57b
/frameworks/base/core/java/android/view/View.java
daf98e941e140e8739458126640183b9f296a2ab 10-Jan-2011 Chet Haase <chet@google.com> Use optimized display lists for all hwaccelerated rendering

Previously, display lists were used only if hardware acceleration
was enabled for an application (hardwareAccelerated=true) *and* if
setDrawingCacheEnabled(true) was called. This change makes the framework
use display lists for all views in an application if hardware acceleration
is enabled.

In addition, display list renderering has been optimized so that
any view's recreation of its own display list (which is necessary whenever
the visuals of that view change) will not cause any other display list
in its parent hierarchy to change. Instead, when there are any visual
changes in the hierarchy, only those views which need to have new
display list content will recreate their display lists.

This optimization works by caching display list references in each
parent display list (so the container of some child will refer to its
child's display list by a reference to the child's display list). Then when
a view needs to recreate its display list, it will do so inside the same
display list object. This will cause the content to get refreshed, but not
the reference to that content. Then when the view hierarchy is redrawn,
it will automatically pick up the new content from the old reference.

This optimization will not necessarily improve performance when applications
need to update the entire view hierarchy or redraw the entire screen, but it does
show significant improvements when redrawing only a portion of the screen,
especially when the regions that are not refreshed are complex and time-
consuming to redraw.

Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
/frameworks/base/core/java/android/view/View.java
664644d9e012aa2a28ac96f305b1ce6499ec8806 24-Jan-2011 Joe Onorato <joeo@google.com> visibility ("lights out") API.

1. Views may setSystemUiVisibility() to recommend that
the system chrome (status bar or other UI) show or hide
itself. (This functionality was previously available only
via the FLAG_FULLSCREEN window flag for some SystemUI
implementations.)

2. Views may register a OnSystemUiVisibilityChangedListener
on a view, and find out when the system UI actually
appears or disappears, allowing apps to coordinate the
appearance of their own UI if desired.

Bug: 3241144
Change-Id: Ia1758d94099182d49a1e3688ea2738ae4995b829
/frameworks/base/core/java/android/view/View.java
d832d0b2406b930f04be1bbecd1da826c045c958 22-Jan-2011 Romain Guy <romainguy@google.com> am 10444a13: am 596ba2fa: Merge "Correctly invalidate views that transition from opaque to non-opaque. Bug #3337037" into honeycomb

* commit '10444a138ae98e940982096d802b2655cef0b645':
Correctly invalidate views that transition from opaque to non-opaque. Bug #3337037
596ba2fa791db7ae671bd79c346b54a7ea2f8113 22-Jan-2011 Romain Guy <romainguy@google.com> Merge "Correctly invalidate views that transition from opaque to non-opaque. Bug #3337037" into honeycomb
c5d55863ec0290370a17d37d06feab743626b12f 22-Jan-2011 Romain Guy <romainguy@google.com> Correctly invalidate views that transition from opaque to non-opaque.
Bug #3337037

Change-Id: I31397273a31b6004e2e3801866122bcbb3ebee5d
/frameworks/base/core/java/android/view/View.java
61d4504ec66827924f926e99361ebf432c2390cb 22-Jan-2011 Adam Powell <adamp@google.com> am a4f8e903: am 5fc3c84f: Merge "Fix bug 3362680 - calendar crash while tabbing among views" into honeycomb

* commit 'a4f8e903c3b4be9a840e0495be5bbfdb2a0a21e1':
Fix bug 3362680 - calendar crash while tabbing among views
3cb8b638c49b767354b62d853067ae8290ff7e80 22-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3362680 - calendar crash while tabbing among views

Remove pending click callbacks when a view is detached from its
window.

Change-Id: I51de184b8e95dbd594675ea6849647586a7c4ba2
/frameworks/base/core/java/android/view/View.java
4789b873a6d19f798aa8599a9391eb1bfcad9181 21-Jan-2011 Dianne Hackborn <hackbod@google.com> am 8a545b9e: am e69e0fde: Merge "Fix issue #3374356: Buttons sometimes don\'t highlight" into honeycomb

* commit '8a545b9e3f67fedcb18f3ab9de00e8003a7fcd51':
Fix issue #3374356: Buttons sometimes don't highlight
be1f62260ae4798cd80404dc595e1146f346cfe9 21-Jan-2011 Dianne Hackborn <hackbod@google.com> Fix issue #3374356: Buttons sometimes don't highlight

On touch up, View would move itself to the pressed state if it
hadn't already shown as pressed. However, it did this *after*
scheduling the message to deliver the onClick(). Thus if the
app took a little too long to execute inside of onClick(), the
invalidate to draw the highlight state would be executed right
before the following message to remove the highlight state,
causing it to basically not be shown.

This change just does the invalidate before scheduling the
onClick, so we can be sure it gets done first.

Change-Id: I6a4d1742a3aab60969c38b44bb3e163f48de62d4
/frameworks/base/core/java/android/view/View.java
741fbc13d287f7982b52a25b193b060477ebe834 19-Jan-2011 Romain Guy <romainguy@google.com> am 2c197a07: am 9335f5b2: Merge "Make embedded hardware layers work. Bug #3369474" into honeycomb

* commit '2c197a0708dc3cb26c335371b572a3c47ca33736':
Make embedded hardware layers work. Bug #3369474
42f3a4b7c35dd1ea1922356eb3611af8cde05179 19-Jan-2011 Romain Guy <romainguy@google.com> Make embedded hardware layers work.
Bug #3369474

Change-Id: Ib6d7fb44eedda9dc2933b5e1b176f307968af91d
/frameworks/base/core/java/android/view/View.java
a953359db5250d0f648c7ca210ef3954bf1f8b66 19-Jan-2011 Christopher Tate <ctate@google.com> am 31cd02ad: am 17ed60c3: API CHANGE: add a no-View ctor for DragShadowBuilder

* commit '31cd02ade3dd85c676bb278a1c2181f57179c390':
API CHANGE: add a no-View ctor for DragShadowBuilder
17ed60c3d2e480ab9788b445958a22b9ae7b6e96 18-Jan-2011 Christopher Tate <ctate@google.com> API CHANGE: add a no-View ctor for DragShadowBuilder

Cf conversation with the API council. Also expand the javadoc
a bit.

Change-Id: I9d4edb1042e00492b3db5c6bb7c7d9648581efad
/frameworks/base/core/java/android/view/View.java
0f6226b9f417182bbf791598000f0a153fbf191c 18-Jan-2011 Jeff Brown <jeffbrown@google.com> Merge "Add joystick support to framework."
d6cd572df8067c40b3e0e7e74e58cdb456b33e92 17-Jan-2011 Romain Guy <romainguy@google.com> Improve hardware layers rendering speed when setting a View's alpha.

Change-Id: Ib1275677f531c60d9919978c5538c663fdb823b5
/frameworks/base/core/java/android/view/View.java
cb1404e45639d20439d7700b06d57ca1a1aad1fa 16-Jan-2011 Jeff Brown <jeffbrown@google.com> Add joystick support to framework.

Change-Id: I95374436708752e1a9cff3f85c5b9bc3e0987961
/frameworks/base/core/java/android/view/View.java
8dd5b1e53184ed3b786dd329e12d665ae59ca3f4 15-Jan-2011 Romain Guy <romainguy@google.com> Prevent NPE when a View is detached without having been attached.
Bug #3355252

Change-Id: I58e03983ccf6a27a24619ec0f49659d6d7cc0a64
/frameworks/base/core/java/android/view/View.java
ec84c3a189e4aa70aa6ea8ba712e5a4f260a153b 14-Jan-2011 Patrick Dubroy <dubroy@google.com> Allow old view hierarchy to be GC'ed more quickly during rotation.
/frameworks/base/core/java/android/view/View.java
783e6c8b3ba7eecac3bdd796b53a1293f9cb1be4 13-Jan-2011 Gilles Debunne <debunne@google.com> Merge "fix for cts DuplicateParentStateEnabled bug with TextViews." into honeycomb
fb81703ab11c653a587b652b90ec3b550f500ccf 13-Jan-2011 Gilles Debunne <debunne@google.com> fix for cts DuplicateParentStateEnabled bug with TextViews.

Bug 3347206

Do not add an extra slot in the drawable state for multiline if it
is not needed.

Updated setDuplicateParentStateEnabled documentation.

Change-Id: I95f74284721e25b483e12e9b861e810a55c260b6
/frameworks/base/core/java/android/view/View.java
9cd1eca8546a6e633c94830d2195634fbfbb7144 13-Jan-2011 Svetoslav Ganov <svetoslavganov@google.com> Invisible of gone views fire accessibility events.

bug:3350110

1. Added a visibility check before sending an accessibility event.

Change-Id: I322ede3844502bc623ba2aff2b3586a9925ba682
/frameworks/base/core/java/android/view/View.java
9c0874408cfc6f6f4e4561973ca5ae52a5982db7 13-Jan-2011 Chet Haase <chet@google.com> Supress layout requests while a LayoutTransition is running.

LayoutTransition works by animating layout-related properties
(left, right, top, and bottom). This works great when that animation
is the only thing affecting the layout of the UI. But if there are other things
happening in the application that cause layout to run on that
container or in its parent hierarchy, this can cause the layout properties
on its children to get mis-set during the middle of the transition.
This results in artifacts like animating objects jumping to locations where
they would be were there no animation running.

The fix is to supress layout requests on that container (and its children)
until the transition is complete (then issue a layout request on the container
to make sure that the container has the correct layout data)

Change-Id: I15bf0423a11409f854076f86099233db7fe4edc0
/frameworks/base/core/java/android/view/View.java
3aaff3aef4998156226486d1fad297150dd7a6bf 12-Jan-2011 Romain Guy <romainguy@google.com> Better debug info for layers.

Change-Id: I816c2446a33a1135553eaeea2f89c7418641cfe1
/frameworks/base/core/java/android/view/View.java
02d2b3ba9ba830a8147db2739613f7bbb2d0fcbf 11-Jan-2011 Christopher Tate <ctate@google.com> API CHANGE: startDrag() now takes "int flags" instead of "boolean localOnly"

There will be, in the future, a flag (View.DRAG_FLAG_GLOBAL) that means
for the drag to be cross-application. For now that flag constant is @hide
and furthermore the server-side implementation strips it, enforcing
local-only drags.

Change-Id: I8db840480ab90e18a5b8ecf29d62b4e6eafd405e
/frameworks/base/core/java/android/view/View.java
6c319ca1275c8db892c39b48fc54864c949f9171 11-Jan-2011 Romain Guy <romainguy@google.com> Better backend for hardware layers.

With this new backend, a hardware layer is only recreated when
its associated view is udpated. This offers fast composition
in GL and fast update of the layer in GL as well.

Change-Id: I97c43a612f5955c6bf1c192c8ca4af10fdf1d076
/frameworks/base/core/java/android/view/View.java
36d4c3f02b4c3366b965896bc3da8bb332db1a64 07-Jan-2011 Christopher Tate <ctate@google.com> Rename drag "thumbnail" to the drag "shadow"

No functional changes; just a rename of the relevant class/method/parameters.

Change-Id: I55d9ef7c2c17892b0bc99f5da622c281e006b53e
/frameworks/base/core/java/android/view/View.java
171c592f0b7066acf279863c8a52ddabea49d3db 06-Jan-2011 Romain Guy <romainguy@google.com> New layers API for Views.

This API can be used to back a view and its children with either a
software layer (bitmap) or hardware layer (FBO). Layers have
various usages, including color filtering and performance
improvements during animations.

Change-Id: Ifc3bea847918042730fc5a8c2d4206dd6c9420a3
/frameworks/base/core/java/android/view/View.java
dab559a24f58d502aeeba62d2e341f0438f52b35 05-Jan-2011 Michael Jurka <mikejurka@google.com> exposing isDirty() method on View

- needed in Launcher2 for implementation of caching views to bitmaps

Change-Id: I1dc1e8e4328106f88e1aa8e55ccb17b08fc9756b
/frameworks/base/core/java/android/view/View.java
9e90a9953b65ae575ec8db3989857e0c145724b1 05-Jan-2011 Chet Haase <chet@google.com> Reuse display lists at the java level.

Objects are invalidated and reset instead of being nulled out
and recreated. This avoids creating small amounts of garbage for
the display list and canvas objects.

Change-Id: I464fac7ea8944c19ad6d03f13a95d9017e3f4262
/frameworks/base/core/java/android/view/View.java
64da12ab1f472e01325b6c6d094153ac110eaf7b 05-Jan-2011 Jeff Brown <jeffbrown@google.com> Add dispatch key shortcut window callback.

Enables Activities and Dialogs to implement key shortcut behavior.
Useful for global key shortcuts that are not bound to the focused
view or to a menu.

Change-Id: If377d20b227ee1c5cac84c47c9630b2d77f67e2c
/frameworks/base/core/java/android/view/View.java
70588bf864f961974c93aace7586d3e2773a54a8 05-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> resolved conflicts for merge of 3a2c6bf0 to master

Change-Id: I1963d8fc391bb84de1054f2b20ce4e082d764cbe
3a2c6bf0fcae9421cccf113ff972df7aaeb6d3e9 05-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 69ea4e15: Documentation fixes found over vacation hacking.

* commit '69ea4e15e52c456537575d21443ac1efdb03a902':
Documentation fixes found over vacation hacking.
69ea4e15e52c456537575d21443ac1efdb03a902 05-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> Documentation fixes found over vacation hacking.

Change-Id: I28900026465d66d950cf4f05f0c202b46c3c2d43
/frameworks/base/core/java/android/view/View.java
3dbf55c3a2d993b89d0947885061cf8421930639 16-Dec-2010 Gilles Debunne <debunne@google.com> TextView's color transparency is taken into account.

Unless it has a background, the TextView will be able to support
alpha (text, cursor and highlighted text colors).

Background colored spans should be detected and should also multiply
their alpha by mCurrentAlpha.

Bug 3144861

Change-Id: If640895b8c0b25dc00b909a0a118b68fac0cfd76
/frameworks/base/core/java/android/view/View.java
6c7ad5dbed878a4b477edd8d92004a9be672a731 28-Dec-2010 Chet Haase <chet@google.com> Changes to view position update pivot point

Change-Id: I8ca8e2c8c016ae5ced32c8f8fbcbcded9fa3a466
/frameworks/base/core/java/android/view/View.java
995e77431982f9a320451dbe6132a62e69f73bab 23-Dec-2010 Jeff Brown <jeffbrown@google.com> Enable touch splitting by default for Honeycomb apps.

Also fixed some bad comments I noticed along the way.

Change-Id: I4328c8aaa22f48a5c1fd274e889abb7823747330
/frameworks/base/core/java/android/view/View.java
55dbb6516d8b3d04ed23cfd613aee24bd525b965 22-Dec-2010 Chet Haase <chet@google.com> Account for background drawable size changing when lrtb properties change

LayoutTransition may set the left, right, top, bottom properties of a View when
animating it. If the View has a background drawable, and if these properties change
the actual dimensions of the view, then the background drawable must be informed
of the size change in order to display itself correctly.

Change-Id: I8ae47a051b250d0d4bdee97b1f1b5d27fe3f7f8b
/frameworks/base/core/java/android/view/View.java
a9b61ac69cd40bf019e640abb34f2b027378994c 20-Dec-2010 Chet Haase <chet@google.com> Make sure background drawables are correct when View is attached

Books had a bug where the search menu item would come back with an
out of date background color. The problem was that the logic to
change the background color was tied into StateListDrawable animations.
These animations were not always completing because the action bar would
remove the associated View and the drawable animations would stop being
scheduled (no handler to post to).
The fix is to always set the drawable state to the current state when
a View is added to the hierarchy.

Change-Id: I0fc8008381f7439b9e49d6449ae618512c8e9dd0
/frameworks/base/core/java/android/view/View.java
4e6319b73c85082e18d1c532b86336ddd1f8cfaa 13-Dec-2010 Jeff Brown <jeffbrown@google.com> Add initial support for TAB navigation.

Bug: 3286652
Change-Id: I813a0318b3b8d9c9bc791ea6a2427be11c08de00
/frameworks/base/core/java/android/view/View.java
c75ec3324e9e3e6500148cc2978caab90ea962e4 17-Dec-2010 Chet Haase <chet@google.com> Fix for TimePicker not redrawing itself.

The problem was that NumberPicker override View.draw(), but did not
call the superclass version of the method in some situations. This
resulted in the DIRTY flag for the view not getting cleared properly,
and future invalidations not propagating correctly.

The fix was to call super.draw() from NumberPicker.draw().

Change-Id: Ic17215dea86d54b77375494ada124dd6970e3ad6
/frameworks/base/core/java/android/view/View.java
20232d0f7ce2220df72dd78bed052f6b4a643f10 09-Dec-2010 Adam Powell <adamp@google.com> Holo scrollbars and related tweaks.

Added setting for placing vertical scrollbars on left or right.

Added setting for showing fast scroll persistently.

Fixed a bug where inset padding was miscalculated for horizontal scroll bars.

Fixed a bug where padded ListViews would draw fading edges incorrectly

Change-Id: I1f8499895272d42598b4b3fd3375301115def461
/frameworks/base/core/java/android/view/View.java
af636ebf5feb2837683fbfe965040cb706b32ec1 10-Dec-2010 Romain Guy <romainguy@google.com> Don't set the invisible flag when saving an empty layer.
Bug #3270371

Change-Id: I65e85671c2fb70d74553c91213e5e759e0ac64ee
/frameworks/base/core/java/android/view/View.java
49ed71db425c5054e3ad9526496a7e116c89556b 07-Dec-2010 Jeff Brown <jeffbrown@google.com> Add support for fallback keycodes.

This change enables the framework to synthesize key events to implement
default behavior when an application does not handle a key.
For example, this change enables numeric keypad keys to perform
their associated special function when numlock is off.

The application is informed that it is processing a fallback keypress
so it can choose to ignore it.

Added a new keycode for switching applications.

Added ALT key deadkeys.

New default key mappings:
- ESC -> BACK
- Meta+ESC -> HOME
- Alt+ESC -> MENU
- Meta+Space -> SEARCH
- Meta+Tab -> APP_SWITCH

Fixed some comments.
Fixed some tests.

Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe
/frameworks/base/core/java/android/view/View.java
4d2bd4c9ae028adbb863bf6dd0aa90f7249153fc 01-Dec-2010 Michael Jurka <mikejurka@google.com> fixing getLocationInWindow

- takes into account mTranslationX/Y

Change-Id: I7d622fe9e8b5e021f8585894b72ffd82c087cc57
/frameworks/base/core/java/android/view/View.java
f2f7d8f9dd75c6e32a46a28fd3f53435addf0746 03-Dec-2010 Chet Haase <chet@google.com> Fix invalidation issue for optimized/GL case.

The bug caused intermittent artifacts where some apps would not get
repainted until some overall screen invalidation occurred.

Change-Id: I82a3294429f15fe51cc8f4b47134e3b5540cb240
/frameworks/base/core/java/android/view/View.java
189ee18d6c6483ad63cc864267328259e2e00b95 03-Dec-2010 Dianne Hackborn <hackbod@google.com> Implement smarter sizing of WRAP_CONTENT windows.

This extends the view hierarchy's measure pass to allow view to
propagate up to their parent additional information besides just
their measured size. They can now report that their measured width
and/or height should be larger than the size their parent is
limiting them to (even though by definition they need to contrain
their reported measurements to the limits imposed by the parent).

ViewRoot uses this information to determine if it should remeasure
the window with a larger size limit to try to make it fit.

Change-Id: I90af3b7a8ec45d0a5c003fb009857025209d83eb
/frameworks/base/core/java/android/view/View.java
67f23ba649b99647873b5a61e4a38de25fa6d660 02-Dec-2010 Michael Jurka <mikejurka@google.com> Revert "Re-add performance optimization in View"

Found reproducible cases of Launcher freezing up due to this change

This reverts commit 62490bd358cd001e00cb643cf3879d736c448788.

Change-Id: I1b10e05ee9f0c43566b53c7a11e61fc168d17a75
/frameworks/base/core/java/android/view/View.java
407b4e91fe7627545b8110e683953353236b4543 01-Dec-2010 Christopher Tate <ctate@google.com> API CHANGE: drags can now carry an originator-only object payload

When calling startDrag(), the app can now supply an Object to be passed
along in every DragEvent that the app winds up receiving itself. This
object is *not* passed to any other applications; it's strictly app-
local. The purpose is to allow state tracking/management to be done
directly through the drag mechanism rather than requiring out-of-band
code.

An example of the utility here might be TextEdit widgets. A drag that
starts in one TextEdit but ends in a different one should be treated as
a copy/paste operation, where the originating TextEdit is not altered.
However, a drag that starts and ends in the *same* TextEdit is a 'move'
operation within that TextEdit; the text is removed from its original
position and inserted at the drop point. To support this easily, the
drag/drop code in TextEdit can now pass a pointer to the originating
view as the local state object. Then, the drop recipient could tell
whether the drag started within the same TextEdit without needing to
implement any other out-of-band state tracking.

This CL (and its accompanying CLs in a few other packages where the
startDrag() API is being used) adds the new local-state parameter to
the API, but does not actually change the behavior of any existing
clients.

Change-Id: Icba73b2ab4a650b7a94485a19633065b0ef9058c
/frameworks/base/core/java/android/view/View.java
62490bd358cd001e00cb643cf3879d736c448788 30-Nov-2010 Michael Jurka <mikejurka@google.com> Re-add performance optimization in View

- undoing change 79897

Change-Id: I52eb1247c4fead5e4203d7e7200129aa815e7c9b
/frameworks/base/core/java/android/view/View.java
730666858692ea396f5ad779654b5d86ff90b6ca 30-Nov-2010 Chet Haase <chet@google.com> animation bugfix plus xml resources for new View properties

There was a bug around animation duration where it was possible,
for small durations or large inter-frame times, to calculate
fractions outside of the 0-1 range, causing bad value calculations.

Unrelated: new View properties for translation, scale, and rotation
were added in this release. This commit addes XML resources for
those properties.

Change-Id: Ieaf5dd729588adb2a40656aa82beecc3576f4af5
/frameworks/base/core/java/android/view/View.java
637d337b58d8eec6de19230a5dd5ca5581c0478d 25-Aug-2010 Adam Powell <adamp@google.com> Merge overscrolling from gingerbread.

Change-Id: I3eb4413261b38ddd8c609d6153bdfd4ae46c6a0f
/frameworks/base/core/java/android/view/View.java
ebefea465893529230157d4a857ef52c3fb545e7 16-Nov-2010 Michael Jurka <mikejurka@google.com> Fix issue where Launcher was not getting redrawn

This is a temporary fix; will submit a change later that restores the performance improvement but fixes the drawing issue
/frameworks/base/core/java/android/view/View.java
7eec10e6c99c30d5ee061fec08ac89ad4254ac32 13-Nov-2010 Dianne Hackborn <hackbod@google.com> Get rid of the extended themes.

We now decide whether to use a bitmap background based on whether the
window's drawing is hardware accelerated. To do this, there is a new
"state_accelerated" that state list drawables can be parameterized on,
and the standard window background uses this to select a solid color
or bitmap drawable as appropriate.

Introduces a little hackery to have wm preview windows pretend like
they are hardware accelerated even if they aren't, so the preview looks
closer to the actual app.

Also Add a DialogWhenLarge variation for the light theme.

Change-Id: I215a79d5df65ba3eed52ab363cade9d8218a6588
/frameworks/base/core/java/android/view/View.java
9891e1fce5f29d0421d34aa481037417bd70853d 11-Nov-2010 Chet Haase <chet@google.com> Add invalidation to Drawable when its properties change

invalidateSelf() already exists on Drawable. This triggers a call to
callback listeners so that they know the drawable has been invalidated.
For example, the background drawable on View will cause the View itself
to be invalidated.

Change-Id: I45b231a7600dcf3bc139e4059b7c9940ff49f60c
/frameworks/base/core/java/android/view/View.java
848ae6e48b7942ced2ce149b167774db038cc741 09-Nov-2010 Adam Powell <adamp@google.com> am 6bb4f67a: am 26153a33: Fix bug 3163052 - always use 32-bit drawing caches when destination window is 32-bit

* commit '6bb4f67ac29b916b8ea4f08b79a7bc46c5844646':
Fix bug 3163052 - always use 32-bit drawing caches when destination window is 32-bit
6bb4f67ac29b916b8ea4f08b79a7bc46c5844646 09-Nov-2010 Adam Powell <adamp@google.com> am 26153a33: Fix bug 3163052 - always use 32-bit drawing caches when destination window is 32-bit

* commit '26153a33df8e6608bd37da7d44214b2a0db3195f':
Fix bug 3163052 - always use 32-bit drawing caches when destination window is 32-bit
26153a33df8e6608bd37da7d44214b2a0db3195f 09-Nov-2010 Adam Powell <adamp@google.com> Fix bug 3163052 - always use 32-bit drawing caches when destination
window is 32-bit

Change-Id: I0b6de28eb2de583e1d10d0a65c1ab534ef5bb047
/frameworks/base/core/java/android/view/View.java
079e23575024e103358c982152afb7a720ae1a8a 19-Oct-2010 Dianne Hackborn <hackbod@google.com> Add new fade in/out feature for drawable containers.

This is used to allow list view's pressed and activated indicators
to fade in an out, though of course it can be used elsewhere as well.

There is a lot of complexity in supporting this in list view. The
two main things that are being dealt with:

- When recycling views, we need to make sure that the view's drawable
state doesn't get animated from an old row's state. The recycler
now keeps track of which position a view was last in, and if it is
reused at a new position there is a new View/Drawable API to tell
it to jump to its current state instead of animating.

- For the pressed indicator to fade out, we need to keep displaying it
after it is hidden. There are new variables and code to keep track
of this state, and tweaks in various places to be able to remember
the last selected position and continue updating the drawable bounds
as needed.

Change-Id: Ic96aa1a3c05e519665abf3098892ff2cc4f0ef2f
/frameworks/base/core/java/android/view/View.java
079fd674fb9005771dd383a1a483d7dc5072b5b3 04-Nov-2010 Chet Haase <chet@google.com> invalidate() View when backgroundColor changes

Change-Id: I5dd41b6ccffe35a784eec74495649fede65e78f2
/frameworks/base/core/java/android/view/View.java
7c608f25d494c8a0a671e7373efbb47ca635367e 23-Oct-2010 Chet Haase <chet@google.com> optimizing for primitive types in animations

The animator classes caused autoboxing by converting primitive types (by far
the most typical types used in animations) to be converted to their
Object equivalents because of various APIs that required Object
(like getValue() to get the animated value). This change creates
factory methods on some classes instead of the former constructors
so that we can create and return private type-specific subclasses
which operate directly on the primitive types instead.

In particular, float and int are natively supported by the animators
now. Support in the APIs for double and long was removed because it
seemed like these less common types did not justify the extra
baggage of the added API and code.

Change-Id: I6008a3883e3d6dd5225005f45f112af148e5a4ea
/frameworks/base/core/java/android/view/View.java
ea40e9abb094496987ee40aeffc2a57edd4bbcab 02-Nov-2010 Chet Haase <chet@google.com> Fixed null deref when view parent null during invalidation

Change-Id: I4896b4af69f3a44351465e7524dd7b621050b415
/frameworks/base/core/java/android/view/View.java
70d4ba15b1f0c1133c5aabc86de828b41e482fff 06-Oct-2010 Chet Haase <chet@google.com> Performance optimizations for animations and toolkit

Change-Id: I316a48273a9cbb428a965e4b849b3e5e9e8202f1
/frameworks/base/core/java/android/view/View.java
0d9275e565551eed57297627188aa39f3897a50b 26-Oct-2010 Romain Guy <romainguy@google.com> Enable display lists.

Change-Id: Id0d9b987251da5b7ecbb5497a55dbb5937430316
/frameworks/base/core/java/android/view/View.java
5c13d89c1332fcc499379b9064b891187b75ca32 08-Oct-2010 Chet Haase <chet@google.com> Optimizing display lists by referencing pointers to resources instead of copying them

Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
/frameworks/base/core/java/android/view/View.java
32affef4f86961c57d9ba14572ec65dc2a5451de 19-Oct-2010 Chris Tate <ctate@google.com> Introduce an OnDragListener mechanism

If the listener's onDrag(view, event) returns 'false', the view's own
onDragEvent() will be called. If the listener returns 'true', it
consumes the event (and declares that it will handle the rest of the
drag event sequence, in the case of DRAG_STARTED actions).

Change-Id: I01aff0e4f59f71e55f5eea1049905c80714f0607
/frameworks/base/core/java/android/view/View.java
6b3912865c1530a6e06dd189dd95dc5be102b4de 15-Oct-2010 Chris Tate <ctate@google.com> Drag thumbnail fixes / improvements

* Properly wipe the thumbnail canvas before handing it to the app for
its contents to be drawn

* Provide a getView() method in DragThumbnailBuilder that allows
clients or subclasses to get at the associated view. This is
especially for clients that want to draw entire (sub)layouts as
the drag thumbnail, by overriding onDrawThumbnail(Canvas c)
like this:

// Override specifically for drawing a whole ViewGroup into
// the drag thumbnail canvas
@Override
public void onDrawThumbnail(Canvas c) {
getView().dispatchDraw(c);
}

Change-Id: Ib43ddd7cf1d44faf2d7f6ba79f102bc3c7f14596
/frameworks/base/core/java/android/view/View.java
a32dcf7f724137842b9b8d72add4e690fac74984 14-Oct-2010 Chris Tate <ctate@google.com> Actually draw the drag thumbnail

Now sets the layer and thumbnail dimensions correctly. Also removed the
leftover bits of the now-replaced thumbnail measurement/drawing mechanism.

Fixes bug 3077339

Change-Id: I02983648e0a7ce2ce5fee10825f744e20a3a5b8d
/frameworks/base/core/java/android/view/View.java
a3496a9e6011e73deadd33bd0edd9229512e23d3 12-Oct-2010 Romain Guy <romainguy@google.com> Fix invisible views issue in Launcher.

Change-Id: Ic7cb8f418b5879110eaea5a9c5fdb4f237ca4cab
/frameworks/base/core/java/android/view/View.java
5ada6cb0591c1106e3591a3b7adcdc77a1322209 05-Oct-2010 Christopher Tate <ctate@google.com> More drag/drop adjustments:

* Make View.onDragEvent() public instead of protected.
* No longer @hide View.startDrag()
* Properly manage the boundaries of DRAG_STARTED / DRAG_ENDED notifications
to windows (and as a result don't send bogus empty DRAG_STARTED events or
double-recycle pooled DragEvents)

Change-Id: Ib75f5c1417640c82a5b043c555e02d6e6f4b4d9c
/frameworks/base/core/java/android/view/View.java
e537858ba72b0cac0ae9d20df687853b5413fba4 06-Oct-2010 Neel Parekh <neel@google.com> Fix pressed vs selected typo in onCreateDrawableState

Change-Id: I7a415cacf29ed8c6c558f6b29902edd76fc98ea6
/frameworks/base/core/java/android/view/View.java
ee7e0efcc1314b994ba70d91f6e8fa951044c916 06-Oct-2010 Adam Powell <adamp@google.com> am 59c4cb9e: Merge "DO NOT MERGE Fix bug 3001751 and bug 3001584 - Gingerbread API review for over-scroll" into gingerbread

Merge commit '59c4cb9e8fee03f770aa0fa1a2f0ec84ffb945b8' into gingerbread-plus-aosp

* commit '59c4cb9e8fee03f770aa0fa1a2f0ec84ffb945b8':
DO NOT MERGE Fix bug 3001751 and bug 3001584 - Gingerbread API review for over-scroll
737e8fe2c7ce167bc68ad779160488007a5e0b1d 05-Oct-2010 Adam Powell <adamp@google.com> DO NOT MERGE Fix bug 3001751 and bug 3001584 - Gingerbread API review for over-scroll

Change-Id: If34c8ea4e15697420adad0bc404f3c278efd7c1b
/frameworks/base/core/java/android/view/View.java
a0374192b9669d00d85840ee3ddbfd41c2cc52f3 05-Oct-2010 Christopher Tate <ctate@google.com> Make View.DragThumbnailBuilder a static class

It also now uses a WeakReference to the associated View, not a hard
object pointer.

Change-Id: I37e10b3155ee7e089a72bdf050cc2d323794810f
/frameworks/base/core/java/android/view/View.java
2fe9a8f6f6a5264597a9dbed2fb2e02d84853189 05-Oct-2010 Romain Guy <romainguy@google.com> Correctly invalidate the drawing cache when an invalidate is requested.

Change-Id: Ic78f85d728a14a9f2e4a1925d46b6db9a204bbb1
/frameworks/base/core/java/android/view/View.java
2c095f367779ef32130c72849936a2e3013c8492 04-Oct-2010 Christopher Tate <ctate@google.com> Refinements to drag/drop

Thumbnail measurement & drawing has been moved out into a delegate
class called View.DragThumbnailBuilder. This consolidates the
thumbnail-related code as well as ensuring that the drag initiator
does not have to know a priori where to place the thumbnail relative
to the touch point *before* the thumbnail measurement step, as was
previously the case.

startDrag() no longer needs to be told where the current touch point
is at the time the drag is launched.

Drag events are now dispatched only to VISIBLE views.

Dispatch shouldn't double-recycle events any more when the target
window is local to the system process.

Change-Id: I49419103765a0cad2e18ddfcdd6dacb94daf1ff1
/frameworks/base/core/java/android/view/View.java
5e25c2c14593caee5638603120553ae1ec530f85 16-Sep-2010 Chet Haase <chet@google.com> Add ability to automate animated transitions on View show/hide

Change-Id: Id6ff92c8fd06c3f5fb30c41b020b4de4f567154f
/frameworks/base/core/java/android/view/View.java
ed03270fb0a6391df50134d69220f04df398f468 01-Oct-2010 Chet Haase <chet@google.com> Optimizing invalidation to avoid trashing the rendering cache

Objects whose size or contents do not change can use the same rendering cache as before, so in these cases we do invalidation without causing the rendering cache to be recreated.

Change-Id: I840737097b73017ae9ccc9e2cc0bc3d71527e555
/frameworks/base/core/java/android/view/View.java
866717406710595a487cdca33f698876dcd4e8af 01-Oct-2010 Jeff Brown <jeffbrown@google.com> Make View transformation matrix updating more explicit.

The original code depends on side-effects of hasIdentityMatrix()
to update the View transformation matrix. This change adds an
explicit updateMatrix() method to make it more explicit when
we are relying on the matrix having been updated. Among other
things, getInverseMatrix() did not update the matrix so the
caller had to know to call hasIdentityMatrix() first (which was
always the case, but still potentially error-prone).

Change-Id: I16d56f60a785a15c65f73e57b9aded9e4e3bca55
/frameworks/base/core/java/android/view/View.java
0bb5667b4ef91fefd0500fae0186789d15d54e0e 01-Oct-2010 Romain Guy <romainguy@android.com> Fix INVALID_OPERATION error with layers rendering.

This change is a workaround for a driver bug that causes an INVALID_OPERATION
to be thrown on every glCopyTexSubImage() call. This change also adds a new
test for gradients local matrices.

Change-Id: I41b7437481026702d0a3a9677f099b4557c0a84e
/frameworks/base/core/java/android/view/View.java
a53146c5569f8ff5f7eb55e9ad35d23ddacf2add 07-Sep-2010 Christopher Tate <ctate@google.com> Drag/drop APIs and infrastructure

A View initiates a drag-and-drop operation (hereafter just called a "drag")
by calling its startDrag(ClipData) method. Within the processing of that
call, two callbacks are made into the originating View. The first is to
onMeasureDragThumbnail(). Similarly to the core onMeasure() method, this
callback must respond by calling setDragThumbnailDimension(width, height) to
declare the size of the drag thumbnail image that should be used. Following
this, the View's onDrawDragThumbnail(canvas) method will be invoked to
actually produce the bits of the thumbnail image.

If all goes well, startDrag() will return 'true', and the drag is off and
running. (The other arguments to startDrag() provide reconciliation between
the current finger position and where the thumbnail should be placed on
the screen relative to it.)

Potential receipients of the ClipData behind the drag are notified by a
new dispatch mechanism, roughly parallel to motion event dispatch. The core
routine is the View's onDragEvent(event) callback, with the mechanics of
dispatch itself being routed through dispatchDragEvent(event) -- as in
the case of motion events, the dispatch logic is in ViewGroup, with leaf
View objects not needing to consider the dispatch flow.

Several different event 'actions' are delivered through this dispatch
mechanism:

ACTION_DRAG_STARTED: this event is propagated to every View in every window
(including windows created during the course of a drag). It serves as a
global notification that a drag has started with a payload whose matching
ClipDescription is supplied with the event. A View that is prepared to
consume the data described in this event should return 'true' from their
onDragEvent() method, and ideally will also make some visible on-screen
indication that they are a potential target of the drop.

ACTION_DRAG_ENTERED: this event is sent once when the drag point
enters the View's bounds. It is an opportunity for the View to set up
feedback that they are the one who will see the drop if the finger goes
up now.

ACTION_DRAG_LOCATION: when the drag point is over a given View, that
View will receive a stream of DRAG_LOCATION events, providing an
opportunity for the View to show visual feedback tied to the drag point.

ACTION_DRAG_EXITED: like DRAG_ENTERED, but called when the drag point
leaves the View's bounds. The View should undo any visuals meant to
emphasize their being the hovered-over target.

ACTION_DROP: when the drag ends at a given point, the View under that
point is sent this event, with the full ClipData of the payload.

ACTION_DRAG_ENDED: paralleling the DRAG_STARTED action, this is the global
broadcast that the drag has ended and all Views should return to their
normal visual state. This happens after the DROP event.

Change-Id: Ia8d0fb1516bce8c735d87ffd101af0976d7e84b6
/frameworks/base/core/java/android/view/View.java
20e987bfc35d0ae6cb6344ead65ed44ee7cf8750 23-Aug-2010 Jeff Brown <jeffbrown@google.com> Add MotionEvent Matrix transformations.

Fixed issued in ViewGroup's transformation of MotionEvents to ensure
that the entire historical trace is transformed, not just the current
pointer.

Simplified the code in ViewGroup for splitting events across Views.
The new code also handles the case where some pointers are dispatched
to the ViewGroup in addition to its children whereas the previous
code would drop some pointers on the floor.

Change-Id: I56ac31903e1de8a9c376d9c935b7217b0c42d93e
/frameworks/base/core/java/android/view/View.java
b051e895ccb696604349c6c5efe7c4747e1d1ab6 29-Sep-2010 Romain Guy <romainguy@google.com> Add display lists caching.

Change-Id: Iac3a248a81ed8cb076a83ef9d186b8ebba685b4c
/frameworks/base/core/java/android/view/View.java
79d716f7dec8558e282d13c4372b8b2999bab06d 26-Sep-2010 Jean-Baptiste Queru <jbq@google.com> am 74a8df20: am dcfb271b: Merge "Fix if ACTION_DOWN and lost focus time too close, it will become long press."

Merge commit '74a8df2026514025b186aba80a810a03377a80e9'

* commit '74a8df2026514025b186aba80a810a03377a80e9':
Fix if ACTION_DOWN and lost focus time too close, it will become long press.
74a8df2026514025b186aba80a810a03377a80e9 26-Sep-2010 Jean-Baptiste Queru <jbq@google.com> am dcfb271b: Merge "Fix if ACTION_DOWN and lost focus time too close, it will become long press."

Merge commit 'dcfb271b7fa364d567ffd7c495b2baa28a755251' into gingerbread-plus-aosp

* commit 'dcfb271b7fa364d567ffd7c495b2baa28a755251':
Fix if ACTION_DOWN and lost focus time too close, it will become long press.
879fb6b5d66bec90d3420fad12a2a9b2fe9592f3 20-Sep-2010 Adam Powell <adamp@google.com> Text selection anchors changed to use windows

Manually cherry-picked

Change-Id: Id080dfad0e2f324fef3a5175abc78f76c8bad4c8
/frameworks/base/core/java/android/view/View.java
9aed300279db6953356aed5ef24a42291f5829cb 20-Sep-2010 Adam Powell <adamp@google.com> Text selection anchors changed to use windows

Change-Id: I14f138039f5e3175a8c07f21985715b8447708e5
/frameworks/base/core/java/android/view/View.java
f37df070ea84c353ff8bed4b2591932126d7e2ca 18-Sep-2010 Adam Powell <adamp@google.com> resolved conflicts for merge of b39470b5 to master

Change-Id: If441c8684c576b6cbc485a37088d6869ad3fb23f
b08013c312e3d849029a2f4c11889274c00f438d 17-Sep-2010 Adam Powell <adamp@google.com> Added overlay support for drawing/responding to text anchors.

Overlays let views draw and respond to touch events outside of their
bounds. This allows selection anchors to be friendlier and easier to
grab. This is currently private API, pending further evaluation.

Added themes/styles for text selection anchors.

Added assets for text selection anchors as provided by UX. The
left/right anchors are currently not suitable for use. They are here
for bookkeeping and replacement later. The theme currently uses the
'middle' anchor asset for all three. This will be changed once assets
are ready.

Change-Id: I01b21e5ae90cab201f86f38f2f5eeaf2bd7f6bcd
/frameworks/base/core/java/android/view/View.java
c6669ca63299219d815464129dac051ab2404286 16-Sep-2010 Dianne Hackborn <hackbod@google.com> Add API for showing breadcrumbs of fragment back stack.

This adds a simple API to have your back stack automatically
shown as bread crumbs in the action bar. Introduces some APIs
to retrieve the current back stack.

Also fix a little bug in the "activated" state where it was
being propagated down the hierarchy as "selected". :p And from
that, fix the standard colors to be reasonable when in the
activated state.

Finally PreferenceActivity is updated to take advantage of
bread crumbs to show your place in the preferences.

Change-Id: I9d633bedf8d7c6e4ed9b25cb9698faa66c7dd9a4
/frameworks/base/core/java/android/view/View.java
9316232130fe831c998c9d7be9cf67294eccdcae 16-Sep-2010 Joe Onorato <joeo@google.com> Fix broken javadoc.

Change-Id: I4729ebee36117f281af613e0b49f70d7dee5f334
/frameworks/base/core/java/android/view/View.java
d0fa371f276fde32d81c037006941bc93da0bb03 15-Sep-2010 Dianne Hackborn <hackbod@google.com> Add a new "activated" state to View.

Use this in ListView and GridView if the top view is not checkable.

This allows PreferenceActivity to now highlight the current heading
that is being shown.

Change-Id: I0d28aded9a61a42962b4aece420ae4058712d963
/frameworks/base/core/java/android/view/View.java
57361ef001c13a28701dbe8ba3aa08e56310c3a7 14-Sep-2010 Adam Powell <adamp@google.com> DO NOT MERGE Fix bug 2995887 - overscroll effect initialization issue

Change-Id: I03cc18616dec05eb9e0383dc02371366c70cc12b
/frameworks/base/core/java/android/view/View.java
26edf20a0b9516f6021521bc8edd2d30c03fc2ad 13-Sep-2010 Tony Wu <Tony_Wu@acer.com.tw> Fix if ACTION_DOWN and lost focus time too close, it will become long press.

It will become long press because CheckForTap is still posted in background.
So remove the callback when lose focus, or it will become long press event.

Change-Id: I4f98a6fc077d256edbe555464095b2b81e75dd41
/frameworks/base/core/java/android/view/View.java
2bffd268f135df8308c9e67af110525a5c463424 13-Sep-2010 Romain Guy <romainguy@google.com> Fix text rendering issue with text scaling.

Change-Id: I1f3ae40025697e8f8ca0616ee6550fe215cadcc8
/frameworks/base/core/java/android/view/View.java
f607bdc167f66b3e7003acaa4736ae46d78c1492 11-Sep-2010 Romain Guy <romainguy@google.com> Correct implementation of saveLayer().

Change-Id: I5375126636913e0a84f2d6bbd0ebe40d2e4f2763
/frameworks/base/core/java/android/view/View.java
897247b2c419567d2d091b8da37a394f481f6f84 09-Sep-2010 Chet Haase <chet@google.com> Fix bug with pivot point not including translationXY factors

Change-Id: Ib16cd0acc007405fea24664327554019e24c2ac9
/frameworks/base/core/java/android/view/View.java
b380c4d7edc158788a85c906900232675c0164ac 08-Sep-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of a05088c1 to master

Change-Id: I7973f9f28586dec9b9659f8f662f40db7997a521
85a3176704b5bfbeece9bd928369fbb76eec7dc6 02-Sep-2010 Jeff Brown <jeffbrown@google.com> Add support for secure views.

Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the
input manager whenever another visible window is partly or wholly obscured
the target of a touch event so that applications can filter touches
accordingly.

Added a "filterTouchesWhenObscured" attribute to View which can be used to
enable filtering of touches when the view's window is obscured.

Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
/frameworks/base/core/java/android/view/View.java
5429e1d1026db8922478b715672e6c0703bbf4a9 07-Sep-2010 Romain Guy <romainguy@google.com> Use static final debug fields.

Change-Id: I304c39f54f609729bcec581091f285b2baa6fefa
/frameworks/base/core/java/android/view/View.java
14cd0653e493cc83041ab51af91399ba00b85c24 07-Sep-2010 Romain Guy <romainguy@google.com> Temporarily disable fading edges if solidColor=0 and hw is on.

Change-Id: I430d8d4d00cbabc99644b98ea832460339c196d8
/frameworks/base/core/java/android/view/View.java
a14c8e0c67223fdc9a0746b370ae594a92530e78 04-Sep-2010 Romain Guy <romainguy@google.com> Bring back instances counts to dumpsys meminfo.

Change-Id: Idd846e137e8e87cb93551ba13751df60a8046eed
/frameworks/base/core/java/android/view/View.java
21cd1389d2ef218b20994b617c57af120841a57f 02-Sep-2010 Chet Haase <chet@google.com> Add transition effects for layout changes on ViewGroups

Change-Id: Ibefcca5692450188fbcec608f3f7e36be1213b21
/frameworks/base/core/java/android/view/View.java
9b34d45c8f164f1d4c51538f241263dfefc0f22e 02-Sep-2010 Romain Guy <romainguy@google.com> Correctly apply alpha on TextView.
Bug #2969691

Change-Id: Ied46e9a38718cb37df10f9dc79b48fbc3a8bd237
/frameworks/base/core/java/android/view/View.java
0a77ce277c6ed2aa25bbea5f8cd5687c0720cb68 25-Aug-2010 Adam Powell <adamp@google.com> New edge effects for scrolling widgets (overscroll)

TODO: Currently disabled for WebView. Assets used for the glow effect
need to be themable/styleable. Overscroll effect should take place
even when the user did not grab the widget within actual content.

Change-Id: I68277d14d37dc5bcdb9254eaddf6e4998b3f2bf4
/frameworks/base/core/java/android/view/View.java
0243caff24ee3b5e4c5e55c888ebb4cdf75b3602 25-Aug-2010 Gilles Debunne <debunne@google.com> Fixed typo in View id documentation

Change-Id: I2df4f0ff9dc0b229349c8accbd6ef962f1d345bb
/frameworks/base/core/java/android/view/View.java
49afa5bc100e5d4c069fea980dd6b09501f56397 23-Aug-2010 Chet Haase <chet@google.com> Add facilities for layout transitions

Change-Id: I5c73ce6c6ba3bc9e3b57fcfbbcab37d511db6132
/frameworks/base/core/java/android/view/View.java
2b342f0a76f3237e97f15dc2f4e8a0b72dd7c023 19-Aug-2010 Adam Powell <adamp@google.com> Allow ViewGroup to split MotionEvents to multiple targets during dispatch.

Use the layout xml attribute splitMotionEvents="true" or the ViewGroup
method setMotionEventSplittingEnabled(true) to enable motion event
splitting. Rules for splitting are as follows:

* Splitting is enabled per ViewGroup. When splitting is enabled any
MotionEvent dispatched to that ViewGroup can potentially be split
into several and dispatched to children independently.

* Each pointer is assigned a target child view when the ACTION_DOWN or
ACTION_POINTER_DOWN event is received. That will be the pointer's
target until it goes up, the target returns false from onTouchEvent,
or the MotionEvents are intercepted.

* Multiple pointers may be assigned to the same target. All pointer
data sent to a target are bundled into a single MotionEvent. Child
views do not need to be aware that splitting has occurred.

Change-Id: I993f838e2f6b455da9812f4742a016dfcd1c4cc9
/frameworks/base/core/java/android/view/View.java
b0d6ba1ec4f71b96cab7d1ff62b846d5cf162c4f 18-Aug-2010 Gilles Debunne <debunne@google.com> Text selection without trackball.

Backported from HC.

Squashed commit of the following:

commit af214a595c7a9fdd11a2dc384f7d4665abf751c0
Fixes in TextView's selection.

commit eb9fd59ebe6500a66c2003d46b5802299970ae8d
TextView with Selection Contextual Mode

commit 4c4c338ef355b369ce4b57d6c6fba7ee8f9dddf4
Cosmetic changes around TextView.

commit d4b4b054e87480d984ad18766f5e76553e3080d8
Double and one and a half tap removed from TextView.

commit 897c2847ba1fca8ef01eadadd1bc3de007af3ee5
Selection handlers in TextView

commit 832be74a5394649e28927484d9a86c6d53b430e7
New cursor controller in TextViews.

Change-Id: I01cc64736e2abea605317ee53907a1713617fc17
/frameworks/base/core/java/android/view/View.java
2542d199745cdf3ec910b8e3e4cff5851ed24e9b 18-Aug-2010 Romain Guy <romainguy@google.com> Layers were using an extra Snapshot causing extra clipping.

Bug #2919310

Change-Id: I72ccd44bba7a3f3db72f581aa96198b6226e4478
/frameworks/base/core/java/android/view/View.java
8fb954263dd2f918ad339045cc6d82e346515599 18-Aug-2010 Romain Guy <romainguy@google.com> Fix save()/restore() issues in the OpenGL renderer.

The save stack now behaves exactly like in Skia.

Change-Id: If7e642f41f2c8f693f6e8c26cba81507d466562e
/frameworks/base/core/java/android/view/View.java
12fb5a3573cd39e2bc4699600fe706cc9ef948db 11-Aug-2010 Konstantin Lopyrev <klopyrev@google.com> am 8279c754: am 91a7f5fe: Making sure that the prefix is handled properly.

Merge commit '8279c754d176d5c2aa23f6f7ad16fcea03278788'

* commit '8279c754d176d5c2aa23f6f7ad16fcea03278788':
Making sure that the prefix is handled properly.
ecb1d5ded9afee63735dc91cfb08ada2c639d237 11-Aug-2010 Konstantin Lopyrev <klopyrev@google.com> resolved conflicts for merge of f00ee0f7 to master

Change-Id: I13b968bde37fad8fffdaa9bb94a0f1da9b2e6e0c
91a7f5fef8a9fc496acef23f513cb48139e8dff5 11-Aug-2010 Konstantin Lopyrev <klopyrev@google.com> Making sure that the prefix is handled properly.

Change-Id: Ic50327b1ed4d6b54753b5b3887508a53cd7a3497
/frameworks/base/core/java/android/view/View.java
bea95162ca25bd00b0479d93739b6283795c3986 11-Aug-2010 Konstantin Lopyrev <klopyrev@google.com> Categorizing exported view properties.

Change-Id: I79c42019836973d80662c21d195d088ae01537a0
/frameworks/base/core/java/android/view/View.java
fd2b002bcfca73958233a4e83a737612393e8a16 06-Aug-2010 Chet Haase <chet@google.com> Add 3D rotation to View

Change-Id: I4aa2542eb821e82d44e13d69b0938de13ffd4f0d
/frameworks/base/core/java/android/view/View.java
6f4169cb285bae8225de8616a01f7a69c12f5799 10-Aug-2010 Konstantin Lopyrev <klopyrev@google.com> am 75493be9: am 63cca691: Merge "Make sure profiling is done only for views that are actually measured, laid out and drawn." into gingerbread

Merge commit '75493be9c0b4dd24fc5cddce6ee993ce5f0b2887'

* commit '75493be9c0b4dd24fc5cddce6ee993ce5f0b2887':
Make sure profiling is done only for views that are actually measured, laid out and drawn.
02890fd0f98b3b8d98baf0bda1ea906afd723d8b 07-Aug-2010 Romain Guy <romainguy@google.com> Replace Bitmap's finalizers with PhantomReferences.

This change also removes the use of SoftReferences for View's
drawing cache.

A bitmap now creates a PhantomReference enqueued in a reference
queue provided by the new Finalizers class. This queue is polled
from a thread started after forking zygote. That thread is in charge
of clearing the references after GC runs and of calling reclaim()
on them. The reclaim() method is now how finalizers are run.

Note that a PhantomReference cannot be kept in the instance it
refers to, which is why they are kept in a separate List.

Change-Id: If3c1a5e9dc23fa49e34857860d730f5cf5ad5926
/frameworks/base/core/java/android/view/View.java
c6dc45700bf0c18708b0ad2f695ea85fadcbf131 07-Aug-2010 Konstantin Lopyrev <klopyrev@google.com> Make sure profiling is done only for views that are actually measured, laid out and drawn.

Change-Id: I88c66e882be2781d079c51b6580a19c4e359c5b1
/frameworks/base/core/java/android/view/View.java
df030d2c160ff42927c58ff54c51049c69a48312 31-Jul-2010 Chet Haase <chet@google.com> View x/y properties now feed into matrix translation

Change-Id: I35d8953ab6c7a511cdf90f3f94a4a1b5ef549fc3
/frameworks/base/core/java/android/view/View.java
8fbf8d2b08a22a8f06abe8cff39d935865ec1c9d 31-Jul-2010 Chet Haase <chet@google.com> Fix problems with moving Views around (invalidation, conflict with layout)

Change-Id: I38f8f8a4e8082854a53a2975da258b5d946ed525
/frameworks/base/core/java/android/view/View.java
f788a9fccd9cdb662527aa375af24b8868069108 22-Jul-2010 Gilles Debunne <debunne@google.com> TextView with Selection Contextual Mode

Context menu entries have been moved to a contextual mode in the action bar.

Change Input Method has been removed and *should be added to the system bar instead*.

Add word to dictionnary has also been removed and should now be done using the suggestioni
bar "tap on word to add" feature.

Change-Id: I767373f53515b2d6a06500321b4b12ed0b05a9b6
/frameworks/base/core/java/android/view/View.java
6e34636749217654f43221885afb7a29bb5ca96a 23-Jul-2010 Adam Powell <adamp@google.com> Moved context modes into view, renamed to action modes

ContextualMode renamed to ActionMode. Adds a reference to the action
bar and reduces confusion around things named "Context".

Change-Id: Ia5098b1d0799a0ece0810c34e6696eda039fb005
/frameworks/base/core/java/android/view/View.java
33e72aef05c75699c9180626dbaa00b06f86ad5b 17-Jul-2010 Romain Guy <romainguy@android.com> Make View transforms work again.

Change-Id: I42aa8b5a55d7584ed242e1cb1f7123a6354edbc8
/frameworks/base/core/java/android/view/View.java
b5de9f3bafae2c30e7a67faa1cdf7d1c161820c3 17-Jul-2010 Adam Powell <adamp@google.com> Fix bug 2845609 - Touch event dispatching problem.

Maintain the state of the CANCEL_NEXT_UP_EVENT flag properly.

Change-Id: I5ca22409bf8557c486d02806811b10550c5576eb
/frameworks/base/core/java/android/view/View.java
82e2b4cb51e869a5c2014f56e5b0cf38569ff09a 15-Jul-2010 Scott Main <smain@google.com> am 4fd41688: am 5352d237: am 38137d7a: Merge "docs: lots of additions to the resources docs new drawable resources add <merge> and <include> to layout resource update drawable class descriptioons to point to resources guide add ID resource type" into froyo

Merge commit '4fd416880e53c172bac4a51b2eafea699b58badf'

* commit '4fd416880e53c172bac4a51b2eafea699b58badf':
docs: lots of additions to the resources docs
5352d2378d2f92ebe0657e4caedb4498492fc404 15-Jul-2010 Scott Main <smain@google.com> am 38137d7a: Merge "docs: lots of additions to the resources docs new drawable resources add <merge> and <include> to layout resource update drawable class descriptioons to point to resources guide add ID resource type" into froyo

Merge commit '38137d7a27b037611c70a9d900aa53b4c15563bf' into gingerbread

* commit '38137d7a27b037611c70a9d900aa53b4c15563bf':
docs: lots of additions to the resources docs
c3aa361d65119de503224202ae2296dbb1d3cf33 17-Jun-2010 Chet Haase <chet@google.com> Add various properties to View to allow it to be moved, scaled, faded, and rotated by property manipulation instead of just Animation operations.

Change-Id: Iefab11f243c7511f7bba0e32bd399ed716b9131f
/frameworks/base/core/java/android/view/View.java
839458d8d4dbf44cd1778a23471cf8f948a2012c 15-Jul-2010 Jim Miller <jaggies@google.com> resolved conflicts for merge of e03952c0 to master

Change-Id: I414d934101d452a2c2500e539f0b0aff1e1b3ff0
0b2a6d0773211449fbde9d2706388714beeffebb 14-Jul-2010 Jim Miller <jaggies@google.com> Fix 2797185: Re-enable thumbnail generation in framework

This re-enables thumbnail generation code in the framework
with a few improvements.

In addition to enabling the system to capture thumbnails,
it removes padding from the borders to account for space
overlapped by system widgets (status bar, etc.). Thus,
the contents of the bitmap are only those pixels unique to
the activity.

It also maximizes resolution of the bitmap by capturing the
image in the application's current orientation. In landscape
mode, it captures a bitmap with dimensions w x h. In portrait,
it captures a bitmap with dimensions h x w. Where w and h are
thumbnail_width and thumbnail_height as defined in dimens.xml.

Though enabled, the change is not currently used in this
branch. The work is being checked in here to avoid
complicated downstream merges.

Change-Id: Ifc8a4e0075d7d0697d8159589be3816ace31d70c
/frameworks/base/core/java/android/view/View.java
dac5f9f3caea71e9e0002582ee90ffddadb70d8f 08-Jul-2010 Romain Guy <romainguy@google.com> Do not draw the fade areas when it's not necessary.

Prior to this change, every singleLine TextView would create, draw
and compose a layer on every draw dispatch. This was unnecessary and
expensive.

Change-Id: Ia4f79d7fc8f485784fe6b795f0f196d38d579838
/frameworks/base/core/java/android/view/View.java
dfe5c204403bc56c29bb36410574eab8b1950417 09-Jun-2010 Scott Main <smain@google.com> docs: lots of additions to the resources docs
new drawable resources
add <merge> and <include> to layout resource
update drawable class descriptioons to point to resources guide
add ID resource type

Change-Id: I733eec50bb2671f28c9e6dd7dec14eb6586f5193
/frameworks/base/core/java/android/view/View.java
812ccbeb3ce55c50463fda1d161b2eeed8b19cd2 01-Jun-2010 Romain Guy <romainguy@google.com> Add new hardwareAccelerated manifest attribute to enable HW drawing.

Change-Id: I2bb0252f3699cb720e7f5b6868419c9904e4fb35
/frameworks/base/core/java/android/view/View.java
b4bc78b16a05554c57508b488e21dd8eca4e13e6 13-May-2010 Dianne Hackborn <hackbod@google.com> Further work on fragments:

- Implement all of the state saving and restoring machinery. This
caused some flux in the API.
- Add ability to have fragments that are retained across activity
instances.
- Fix some bugs.

Change-Id: Ib6b5b0752d7f8d667cfdcd3e76d127cc9b6d901b
/frameworks/base/core/java/android/view/View.java
8568c3a09bff9bd2f7c9462b116bed0537d19342 19-Apr-2010 Adam Powell <adamp@google.com> Fix bug 2587373 - awaken scrollbars when a scrolling view becomes visible.

Change-Id: I7eb38c53c3a03b23786b8b0c2d16139acd0eb38e
/frameworks/base/core/java/android/view/View.java
9d32d24dbd8a015c9d5c44ed4901d5a666eb8e7f 30-Mar-2010 Adam Powell <adamp@google.com> Remove overscrolling

Change-Id: I7e9db8d8a9b8ef67f0c0c82bf57c9155b7ebabea
/frameworks/base/core/java/android/view/View.java
6b1e6969828f05a2f5f55825fdf16b19c9dce2dd 29-Mar-2010 Romain Guy <romainguy@google.com> Rename tab widget attributes, remove scroll barrier constant.
Bug #2553515 #2553595

Change-Id: Id36280a57f00a1ee59251be6be1aae8df2189c09
/frameworks/base/core/java/android/view/View.java
52964243dc95f74ac2ab9a96d031a36931a11931 24-Feb-2010 Gilles Debunne <debunne@google.com> New OverScroller with edge bouncing effect.

OverScroller has been made a Scroller child class. Both use a physical constant deceleration
force to compute the animation. OverScroller also includes a rubber edge bounce effect.

Approved by Jim Palmer.

Change-Id: I3f43a03694b8cb6bfa0784c2663b37c9c39322cc
/frameworks/base/core/java/android/view/View.java
cc83c868b6a34c52060698ef441745ba9e4537a2 18-Mar-2010 Adam Powell <adamp@google.com> Fix the build

Change-Id: I4448a0c56c192d3d9f0308bb77301a3f18de6024
/frameworks/base/core/java/android/view/View.java
8a836a8b98557263152a476f614b6e05e19ffc5a 18-Mar-2010 Adam Powell <adamp@google.com> Eliminate haptic feedback when hitting an overscroll barrier due to a fling.

Change-Id: I434ec3edd95a19677ad9dbd1ac5ca3f3f5d091cb
/frameworks/base/core/java/android/view/View.java
a35d7687dda3617b5b8cd4e8876d620223dd1613 12-Mar-2010 Adam Powell <adamp@google.com> Make sure visible View state is updated before dispatching clicks

Change-Id: If2619ffa760be708efe8b0d2d04e17eb0dc9375e
/frameworks/base/core/java/android/view/View.java
3b0233959cc181baca896620b42e3cb6ceca2808 12-Mar-2010 Adam Powell <adamp@google.com> Fix tap detection after a long press

Change-Id: I004651b8522cac175a72e94a14128d2283da35a4
/frameworks/base/core/java/android/view/View.java
42e14d74f3a1e146091e627ae3067651c6dab104 11-Mar-2010 Joe Onorato <joeo@android.com> Throw a better error message when the automatic onClick handling doesn't work.

Change-Id: I61729e26f76a2ab8825e892cd6c70c06f0955e4c
/frameworks/base/core/java/android/view/View.java
51c5a0c50e8ec5e2cb59bd60f85f3e612eb08931 05-Mar-2010 Adam Powell <adamp@google.com> Added accessors for view overscroll modes
/frameworks/base/core/java/android/view/View.java
223ff5c0586adbbd1d6d57a3a4d176222e8b7434 03-Mar-2010 Romain Guy <romainguy@android.com> Add new CAPTURE_LAYERS command to HiearchyViewer protocol.

This command is used by the desktop tool to export a given view hierarchy into
a layered file format.
/frameworks/base/core/java/android/view/View.java
8bda24874f1da3ca10e40bd0a11154911337b2ac 02-Mar-2010 Romain Guy <romainguy@android.com> Turn on fading scrollbars by default.
Bug #2142162
/frameworks/base/core/java/android/view/View.java
8afa515936e78ccfc5563ca9164dc9a50ca73db4 26-Feb-2010 Romain Guy <romainguy@android.com> Send cancel event to recycled views instead of an up.
Bug #2309387

This was a problem in lists with list items that would cause notifyDatasetChanged()
interleaved with a series of up/down motion events. This is a pretty rare case
but it's worth fixing it to avoid getting views in a weird state.
/frameworks/base/core/java/android/view/View.java
82fe564267f276151063b2aa0d26075c3210d75f 24-Feb-2010 Carl Shapiro <cshapiro@google.com> Comment out the finalize() methods defined on the Activity,
ContextImpl, View and ViewRoot classes. This allows instances of
subclasses to be collected without the additional latency of
finalization.
/frameworks/base/core/java/android/view/View.java
8354fa65ebf4f44dd189d1d6f33767cf009b5769 25-Feb-2010 Bjorn Bringert <bringert@android.com> Make setBackgroundResource() remotable

Change-Id: Iad9c2bdf743a81a085024cad9dc340ae8a983f34
/frameworks/base/core/java/android/view/View.java
a440b002aa59e1455bdfa2c5a1ca51c74bbc19ac 25-Feb-2010 Romain Guy <romainguy@android.com> Prevents ListView items children to modify properties of other children.
Bug #2464502

This fix introduce a new dispatch mechanism to tell views when they are temporary
detached/reattached from/to a ListView. This is very important to remove pending
callbacks or cleanup temporary states.

This change also modifies TextView which was relying on that callback in a very
particular case: a focused EditText in a ListView. The modified code acts only
when in that case, not if onStart/FinishTemporaryDetach() is called via
dispatch*() (== recycled views in ListView.)
/frameworks/base/core/java/android/view/View.java
e36d6e277e49475076b7872d36ea6a5c5b996e9d 18-Feb-2010 Dianne Hackborn <hackbod@google.com> Work on issue #2263557: PMF3000 showing hybrid of portrait and landscape modes

This is a bunch of reworking of how configuration changes are handled:

- When orientation is changing (for whatever reason), the window manager no
longer tries to pre-emptively compute a new configuration. Instead, it
just determines change is happening and tells the window manager.
- The activity manager is now responsible for giving the window manager the
final configuration it is using. This is both so it knows whem the
activity manager is done with its configuration updates, and so the window
manager can use the "real" configuration.
- When an orientation or other configuration change is happening, freeze the
screen and keep it frozen until the activity manager has given us the
final configuration.
- The window manager can now send new configurations to its clients during
its layout pass, as part of a resize, if it has determined that it has
changed. This allows for a new View.onConfigurationChanged() API for any
view to easily find out when the configuration has changed.
- ViewRoot now also works with the activity thread to make sure the process's
current resources are updated to the new configuration when it receives one
from a window. This ensures that at the time onConfigurationChanged() and
other view callbacks are happening, the correct configuration is in force.
- There is now a sequence number associated with Configuration, which
ActivityThread uses to avoid using stale configurations. This is needed now
that it can receive configurations asynchronously from both the window
manager and activity manager.
- The hack for keeping the locale has been removed, and underlying problem
fixed by having Configuration initialize its locale to "unknown" instead of
a valid default value.
/frameworks/base/core/java/android/view/View.java
2b95c2413838c2e2b127ebab8fb4fead7d52e460 09-Feb-2010 Jeff Sharkey <jsharkey@android.com> Added more @RemotableViewMethod methods, mutate ImageView.

Catch some View methods missed during the first pass of
marking with @RemotableViewMethod annotation. Also adds new
ImageView.setColorFilter(int) to match the android:tint XML
attribute.

When ImageView touches ColorFilter or alpha, mutate the
underlying Drawable. Fix NPE in StateListDrawable.mutate().
/frameworks/base/core/java/android/view/View.java
c9fbaabc1bbf847b6e8bf2595068cbd990f3da55 17-Feb-2010 Adam Powell <adamp@google.com> XML attribute for overscrolling behavior
/frameworks/base/core/java/android/view/View.java
4886d40091ebf1fd71c0942224c0b4ad7410f6a7 12-Feb-2010 Adam Powell <adamp@google.com> Fix javadoc link for SDK build breakage
/frameworks/base/core/java/android/view/View.java
0b8bb4282a7d1afb24f8c4d5beb2ca4ecc731116 08-Feb-2010 Adam Powell <adamp@google.com> Overscrolling modifications. Overscroll will not allow the user to
scroll content out of view. Scrolling will slow down halfway to the
barrier point. API added in View. AbsListView, ScrollView,
HorizontalScrollView all use this API. Overscrolling uses haptic
feedback. Added scroll barrier pattern to config.xml.
/frameworks/base/core/java/android/view/View.java
b4a107d8269d1a75b8f270e0516c1fa3b517f8f9 10-Feb-2010 Romain Guy <romainguy@android.com> Fix the lock screen.
/frameworks/base/core/java/android/view/View.java
305a2eb8e5957a4f3db2734a8918faf1a39fb9a4 09-Feb-2010 Romain Guy <romainguy@android.com> Properly notifies listener when an animation is cancelled.
Bug: #2428005.
/frameworks/base/core/java/android/view/View.java
732ebb1bc3d7760fd424b84e0235ea9946100102 03-Feb-2010 Adam Powell <adamp@google.com> Fixed a regression in View.cancelLongPress
/frameworks/base/core/java/android/view/View.java
43c9cdffb619f93d9d4525dffd05701dc9c8c4bf 27-Jan-2010 Romain Guy <romainguy@android.com> New View.dispatchDisplayHint() API.
Bug #2399147

This new API will be used by scrollable containers to tell children that they
are/are not displayed. This will allow lists to hide their filter popup window
for instance.
/frameworks/base/core/java/android/view/View.java
52e2ef8cac0cd6d78c2c2f5783846e03c636a54c 14-Jan-2010 Romain Guy <romainguy@android.com> Update ListView's children when the drawing cache color hint changes.
Bug #2371777
/frameworks/base/core/java/android/view/View.java
980a938c1c9a6a5791a8240e5a1e6638ab28dc77 09-Jan-2010 Romain Guy <romainguy@android.com> Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
/frameworks/base/core/java/android/view/View.java
e14579bac59aa84523c2bfbfc3f28c7842ec664d 17-Dec-2009 Adam Powell <adamp@google.com> Tap delays; making tap UI feel better.
Addresses bug 2317577

Views now will not enter PRESSED state until
ViewConfiguration.getTapTimeout() milliseconds have elapsed. This
prevents scrolls and other gestures from causing views to enter
PRESSED state prematurely.

Quick taps within the same view still work as expected. There is now a
PREPRESSED state flag within View to help track quick taps.

If tapped quickly, views will remain pressed for
ViewConfiguration.getPressedStateDuration().

Tap timeout has been changed to 115ms. Pressed state duration has been
changed to 125ms.
/frameworks/base/core/java/android/view/View.java
1549dd1e6801a0240a2e2769c91181698910f98d 15-Dec-2009 Maryam Garrett <mkamvar@google.com> Fixes the IME not triggering on touch bug.

http://b/issue?id=2328818

Change-Id: I98cb3b5c3ba49d35e2b031e4fabd050bccccfa81
/frameworks/base/core/java/android/view/View.java
39f0efba92a4420f77e3abc53c367ea3cacde3cf 11-Dec-2009 Maryam Garrett <mkamvar@google.com> Fixes context-menu trigger behavior after scroll in TextView

This change fixes the context menu trigger behavior while
the user is selecting via touch. How if a user is selecting
text via dragging their finger, to trigger the context menu
they will have to lift their finger up, then issue a
longpress. This is consistent with the behavior of selecting
via the trackball.
/frameworks/base/core/java/android/view/View.java
326d808b858359464b2ffeb84f2e0a8e0c79b600 10-Dec-2009 Adam Powell <adamp@google.com> Added View#dispatchViewVisibilityChanged and View#onDispatchVisibilityChanged; updated api; tests

Reverted a change to InstrumentationTestCase that would have allowed @UiThreadTest on setUp() methods of tests.
/frameworks/base/core/java/android/view/View.java
ea4823c1c7fdee093789850d0f76a3df22ca58d2 09-Dec-2009 Romain Guy <romainguy@android.com> Improve javadoc in View.
/frameworks/base/core/java/android/view/View.java
237c1ceea36024cf4194212e713806e3ce8a1c49 08-Dec-2009 Romain Guy <romainguy@android.com> Improve exception message thrown when a View's state is of the wrong type.
/frameworks/base/core/java/android/view/View.java
ecd80ee31c23ac067bb420f44f046682c499e83c 04-Dec-2009 Romain Guy <romainguy@android.com> Fix invalidate code path (#2273209).

Cached views would, in some situations, not update if they contained an
animating child. This was caused by clearing the dirty cache flag too
early in View.buildDrawingCache().

Approved by Dr. No mcleron.

Change-Id: I8c5f2fc3e6605657e0da625d60d50b55bb133666
/frameworks/base/core/java/android/view/View.java
1d5b3a631cfcbfd2ea264f29a11a1366a16593b0 06-Nov-2009 Romain Guy <romainguy@android.com> Fix the build

Change-Id: Id7514858594772ab79c0f3db745b00f0bb59218b
/frameworks/base/core/java/android/view/View.java
732046f87412dc5da4e7290c9f7c4bd7fa3071e1 03-Nov-2009 Romain Guy <romainguy@android.com> Unhide View.isOpaque().

Change-Id: I96444af2a7e66a330a2c4b3fa0a173ec5ab4ed40
/frameworks/base/core/java/android/view/View.java
a62e4705d51e6f36ba1c02350813b6a12af49703 08-Oct-2009 Romain Guy <romainguy@android.com> Fixes #2175599. Prevents an NPE when AttachInfo is null.

This bug was introduced by a change made to query the window's opacity.

Approved by mcleron.

Change-Id: I95319bde72b0faade095bbbbb317e84b9be8efa8
/frameworks/base/core/java/android/view/View.java
35b38cefcc92f1ed599a652ac5736ab9e9e75039 07-Oct-2009 Romain Guy <romainguy@android.com> Improve drawing cache speed by selecting the correct opacity and keeping a 32 bits
format when the window is 32 bits.

Change-Id: I46762def67fa7d6a331a75fa8660c6422394ccf2
/frameworks/base/core/java/android/view/View.java
29e4a3c566f435c32f0b95e4ac8e8b33cac6faba 01-Oct-2009 Dianne Hackborn <hackbod@google.com> Update from API review.

Change-Id: I16b1c566f91167aac9615ac59dd297a154c828ea
/frameworks/base/core/java/android/view/View.java
290947bbf830a1ea335b01bcd8155c699b6713ca 30-Sep-2009 Mike Cleron <mcleron@google.com> Git sucks
/frameworks/base/core/java/android/view/View.java
52f0a6495277469bd7ede29ef89bc34cb2aa8a85 29-Sep-2009 Mike Cleron <mcleron@google.com> Finish off java API to allow fading scrollbars
/frameworks/base/core/java/android/view/View.java
fe81d386a818b386ffc0d5a789236531ab4e264f 28-Sep-2009 Mike Cleron <mcleron@google.com> Remove obsolete links; start at a method to turn on fading scrollbars
/frameworks/base/core/java/android/view/View.java
3ecd58c650371206008efd687933c370e4e28a34 28-Sep-2009 Mike Cleron <mcleron@google.com> Fix build
/frameworks/base/core/java/android/view/View.java
f116bf8884b5b58aae261d148003811aa4a7c6e9 28-Sep-2009 Mike Cleron <mcleron@google.com> Fading scrollbars return. But you have to opt in.
/frameworks/base/core/java/android/view/View.java
ffa424800d0338b8b894aef2ea1e3e3344cbda7a 24-Sep-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2133206: dialogs/menus should auto-dismiss when screen turns off

Lot of infrastructure for more things to go away when "clear system dialogs"
happens, and now do this when we turn on the lock screen.

Change-Id: I567130296fe47ce82df065ed58ef21b37416ceaf
/frameworks/base/core/java/android/view/View.java
83fe3f559249451706957b1a5f660b2b8272f114 13-Sep-2009 Dianne Hackborn <hackbod@google.com> Last big work on #1991910: Make swipes work with capacitive keys

This takes care of allowing us to cancel the back button. The
back button is a bear because it is strewn all over the place --
everywhere you can close something, there is some code looking
for the back button that now needs to deal with being canceled.

The main things changed are activity (of course), dialog,
input method, search dialog. There are some other misc places
in the framework (and some I missed here that I will get in a
second pass).

To facility all of this, the key dispatching APIs now provide
a lot more support for dealing with looking for cancelled keys,
and incidentally also provide an actual API for catching long
key presses. This also helped clean up the code in PhoneWindow
where it deals with all of the combinations of key pressed and
releases. (And also allows people to override
Activity.onKeyLongPress() to provide a different long press
action for a standard key like search.)

And while I was doing this, I reworked how we detect long
presses by having this be part of the key event delivered by
the window manager. This should greatly reduce (hopefully
outright eliminate) the problems with long presses being
mis-detected when an application is being slow.

Change-Id: Ia19066b8d588d573df3eee6d96e1c90fdc19f57d
/frameworks/base/core/java/android/view/View.java
8c11e31143726c9457280c6c0ec83472763c0de9 15-Sep-2009 Romain Guy <romainguy@android.com> Fix a possible NPE in View.

Change-Id: Ieebd176e1f42c78e298aca973e9e5eed2dc3c6d9
/frameworks/base/core/java/android/view/View.java
8cae124af2142687a6833dbaab8a43df6dd67b43 10-Sep-2009 Dianne Hackborn <hackbod@google.com> Various cleanup around resources and nine-patches.

Remove the stuff that doesn't use preloaded drawables when in
compatibility mode, since this works fine ever since we were able
to deal with drawables in a different density than the canvas.

Change the snapshot function on View to return a snapshot at
the same size that will actually be drawn on screen (when in
compatibility mode), to be able to show scaling artifacts and
all.

This change was original an attempt to fix issue #2101917: Text
field edges appears to be improperly rounded. That turns out to
probably be something deeper in the graphics system, but also
included here is the debugging code I did to try to track down the
problem to make it easy to turn on again later.

Change-Id: I34bfca629639c7ff103f3989d88874112ef778d9
/frameworks/base/core/java/android/view/View.java
e8853fc57093e781fa7c659c6eb4da3be9f8695a 04-Sep-2009 Mike Reed <reed@google.com> also expose onDrawHorizontalScrollBar() in View
retool WebView's calculations to correctly compute scrollbar height and parameters
/frameworks/base/core/java/android/view/View.java
4d6fe5ffdc62625726e5785edb0e01586d6072bf 03-Sep-2009 Mike Reed <reed@google.com> allow subclassing for drawing vertical scrollbar, so that clients (e.g. webview) can resize/position
/frameworks/base/core/java/android/view/View.java
6198ae8468668bf7374535c2eeeab8de7f8e7e99 01-Sep-2009 Romain Guy <romainguy@android.com> Prevent ListView from scrolling/flinging its content when the content fits on screen.

Change-Id: Id46313bca3ae53b0717cd74a4a6f889a01f9fcb1
/frameworks/base/core/java/android/view/View.java
e55e1a78857b5d952f593c912655011fced355d5 27-Aug-2009 Romain Guy <romainguy@android.com> Change fade to use a gradient from opaque color to transparent color.

Previously the fade was using a gradient from opaque color to transparent black.
/frameworks/base/core/java/android/view/View.java
7cd88e171391dd0c876bf7d928d946a70cf95373 04-Aug-2009 Wink Saville <wink@google.com> Update the comment for setBackgroundResource that 0 removes the background.
/frameworks/base/core/java/android/view/View.java
a2ef00b4282dcf122c3bdd6fc23cf772474f6abb 31-Jul-2009 Amith Yamasani <yamasani@google.com> Don't invalidate view if setEnabled doesn't change the state.

Check the current enabled state before setting it, in case there's
no change. Otherwise some apps are repeatedly redrawing buttons based
on validation of some text field (like gmail or mms message bodies).
Should slightly improve the performance of soft keyboard text entry.
/frameworks/base/core/java/android/view/View.java
11ea33471e1a14a8594f0b2cd012d86340dd3bd8 23-Jul-2009 Dianne Hackborn <hackbod@google.com> Allow for screen density drawables in compatibility mode.

This change allows us to use drawables that match the current screen
density even when being loaded in compatibility mode. In this case,
the bitmap is loaded in the screen density, and the bitmap and
nine-patch drawables take care of accounting for the density difference.

This should be safe for existing applications, for the most part, since
they shouldn't really be pulling the bitmap out of the drawable. For
the small rare chance of them breaking, it worth getting the correct
graphics. Also this will only happen when there is actually a resource
of the matching density, and no existing apps should have resources for
anything besides the default density (though of course all of the
framework resources will be available in the native density).

As part of this, the bitmap density API has been changed to a single
integer provider the DPI unit density.
/frameworks/base/core/java/android/view/View.java
870e09fcd2dfdc12ac318962efd28b0420c562bb 07-Jul-2009 Romain Guy <romainguy@android.com> Fixes #1963229. Introduces Context#isRestricted().

A restricted Context is a special type of Context that prevents specific features
from being used. For instance, android:onClick, used by View, can be dangerous when
used from within apps widgets. By using a restricted Context to inflate apps widgets,
widgets providers are prevented from using android:onClick.
/frameworks/base/core/java/android/view/View.java
e11232287296eefc82cd895b8392079feedb37cc 29-Jun-2009 Romain Guy <romainguy@android.com> Fixes #1949502. Prevents an NPE in View.buildDrawingCache().
/frameworks/base/core/java/android/view/View.java
fbd8f69a84163ef1cf52b07966320caf448c2bc9 26-Jun-2009 Romain Guy <romainguy@android.com> Fixes #1946141. Introduce new caching API to control scaling.

This change fixes issues with existing applications that access the drawing cache
directly. The API now lets application choose whether they want to get a scaled
drawing cache or not. The framework relies on the scaled cache for quality
purposes.
/frameworks/base/core/java/android/view/View.java
64f59342d41849bd365cb43fad7505d5e3daa417 21-Jun-2009 Mitsuru Oshima <oshima@google.com> * new screen resolution support impl.
* use full window for activities, and shift & clip the content
* refactored the compatibility code, and introdcued Translator class to handle cooridnate translations.
* removed a workaround to handle an activity with configChagne=rotation in old implementation.
* I'll fix background issue on rotation in next CL.

* removed unnecessary scaling code in SurfaceView, which I forgot to remove when I changed SurfaceView
not to scale the content.
/frameworks/base/core/java/android/view/View.java
61ab270c17094ef1373f54d8fb9ade6d287c3a60 23-Jun-2009 Karl Rosaen <krosaen@google.com> Add missing 'break's in switch statement, fixing bug 1876430
/frameworks/base/core/java/android/view/View.java
779398e7eb462ca1562eee50a919305849582e08 16-Jun-2009 Romain Guy <romainguy@android.com> Fixes a potential NPE in View.

Calling getLocationOnScreen() before the View is attached to a window can
throw an NPE. This change simply guards against the exception.
/frameworks/base/core/java/android/view/View.java
8506ab4ac062d0e1ccde136e5e2f4081560e0c11 12-Jun-2009 Romain Guy <romainguy@android.com> Fixes #1886237. Views drawing cache was not generated properly.

In compatibility mode, a View's drawing cache was created at the 160 density
scale instead of the right scale.
/frameworks/base/core/java/android/view/View.java
d6a463a9f23b3901bf729f2f27a6bb8f78b95248 22-May-2009 Romain Guy <romainguy@android.com> Add a new API to ListView: setGestures(int). This allows developers to enable gestures to jump inside the list or filter it. This change also introduces a new XML attribute to control this API. It also adds the ability to theme the GestureOverlayView from the gestures library. Finally, this adds a new VERSION header to the binary format used to store the letters for the recognizer.
/frameworks/base/core/java/android/view/View.java
8f1344f5e7c92f2fd532f65e5584afe0e4cc6b11 16-May-2009 Romain Guy <romainguy@android.com> Fixes #1855461, #1857290 and #1857365. Certain scrollbar styles make an opaque view not be opaque. ListView and View now account for this when indicating whether they are opaque or not.
/frameworks/base/core/java/android/view/View.java
75986cf9bc57ef11ad70f36fb77fbbf5d63af6ec 15-May-2009 svetoslavganov <svetoslavganov@google.com> Accessibility feature - framework changes (replacing 698, 699, 700, 701 and merging with the latest Donut)
/frameworks/base/core/java/android/view/View.java
5bcdff45bf4ada77ae7c95f520b795876adef75c 15-May-2009 Romain Guy <romainguy@android.com> Fixes #1846038. The dirty region can sometimes be modified by SurfaceFlinger. When this happens, force the view hierarchy to ignore the dirty flags.
/frameworks/base/core/java/android/view/View.java
809a7f6080312f3e12f1a3a30eacf0e0c7627305 15-May-2009 Romain Guy <romainguy@android.com> New feature to track down #1846038. Adds the ability to export flags encoded in int values so as to make them human readable in HierarchyViewer.
/frameworks/base/core/java/android/view/View.java
13922e03037d71a538f24ddf61c0b61bb4eb5af0 13-May-2009 Romain Guy <romainguy@android.com> Fixes #1836075. Adds consistency checks for the View hierarchy. To enable them, you need a debug build and ViewDebug.sConsistencyCheckEnabled set to true in debug.prop. This change also lets you easily enable drawing and layout profiling in ViewRoot by setting ViewRoot.sProfileDrawing, ViewRoot.sProfileLayout and ViewRoot.sShowFps in debug.prop with a debug build.
/frameworks/base/core/java/android/view/View.java
83b2107c4d2f07f46b6ae663115421749486f8b1 12-May-2009 Romain Guy <romainguy@android.com> Fixes #1846038. DrawableContainer was wrongly returning its opacity by ignoring the visibility of the currently selected layer. This change simply reports a TRANSPARENT opacity if there is no currently selected layer of if the selected layer is not visible. Otherwise it reports the opacity computed by the state class.
/frameworks/base/core/java/android/view/View.java
7ed6acdc084f5cbd37bd9b9d5422d75fa31f43ce 12-May-2009 Romain Guy <romainguy@android.com> Remove useless logging on every draw.
/frameworks/base/core/java/android/view/View.java
24443ea3992e372e47daa50266b0f2ec38cac388 11-May-2009 Romain Guy <romainguy@android.com> Fixes #1596240. Optimize invalidate/draw passes by marking opaque views and avoiding drawing them. Whenever a View requests an invalidate its parent check whether the view is opaque or not. When the view is not opaque, the framework behaves as it used to. However, when a view is opaque, the parent marks itself as being dirty because of an opaque view. Its parent then does the same, and so on. When the framework then starts drawing the views, it does not draw views marked as dirty opaque. If a view is dirty opaque and receives an invalidate request from a non-opaque view, it then clears the dirty opaque flag and behaves as before.
/frameworks/base/core/java/android/view/View.java
d90a33111b3f1d0b2fff7ba9bafabc63fdb67d3a 06-May-2009 Romain Guy <romainguy@android.com> Add new setTag(int, Object) API to allow applications to specify several tags.
/frameworks/base/core/java/android/view/View.java
9a81736176f507489f262344b6e3d55bbe53be7c 01-May-2009 Romain Guy <romainguy@google.com> Add the ability to specify the onClick handler with XML. The new android:onClick attribute defines the name of the method in the Activity to invoke when the button is clicked. The method has to be public and get one View parameter.
/frameworks/base/core/java/android/view/View.java
a2431d0ba24ca7d79d21b2df63f9a58025702c7e 01-May-2009 Romain Guy <romainguy@google.com> Fixes #1712631. Whenever a View loses focus/selection, reset its pressed state.
/frameworks/base/core/java/android/view/View.java
f8a7ceaef2e7d5cd530c9426bde91b6fa9a40b75 11-Apr-2009 Andy Stadler <> AI 145778: Manual merge changes 145382-145384 from cupcake.

Automated import of CL 145778
/frameworks/base/core/java/android/view/View.java
2e9bbce84d9697a9dcccd02cec55dc485d985746 01-Apr-2009 Romain Guy <> AI 144013: Rename PoolFactory to Pools, to follow the java.util convention (Collections, Arrays.)

Automated import of CL 144013
/frameworks/base/core/java/android/view/View.java
958b9adc086f126dcd757d29f0d7f443ae9064b2 01-Apr-2009 Dianne Hackborn <> AI 143899: am: CL 143896 Fix issue #1748954 and #1737952:
#1748954 (New status bar fades into all white background): FrameLayout wasn't updating its foreground drawable when its padding changed, which would happen as the status bar is shown and hidden. To fix this I also ended up fixing a problem in the view debug stuff where we couldn't get a bitmap for a view that is the full screen size because it is too big... actually I just went ahead and added another function to snapshot the view hierarchy which works a lot better for us anyway.
#1737952 (Home screen icons overlap with the notification bar after exiting any camera app): Originally I punted this because it only happened in rare situations, but now that home is always portrait it happens a lot more so it is more important to fix. This involved a few things to clean up hiding/showing the status bar:
- We now determine when to hide and show it during layout, which allows us to do this at the time it is actually needed rather than during animation after we can actually catch it for the initial display of a window. This required tweaking the layout API so the policy can request a second layout pass if needed.
- When doing layout, we are now much more aggressive about skipping the layout of windows. Basically anything that we know will be hidden in the near future is ignored for layout, so that it doesn't glitch as it is transfered out of the screen. The theory being that it is better to leave it as it was originally placed while we are transitioning it out, than to switch it to something slightly more correct.
Original author: hackbod
Merged from: //branches/cupcake/...

Automated import of CL 143899
/frameworks/base/core/java/android/view/View.java
d928d6837dee4df30b06529164326722075da063 01-Apr-2009 Romain Guy <> AI 143890: Fixes #1749387. Improve the pooling of the VelocityTracker class. This introduces a new, hidden, API for pooling objects easily.
BUG=1749387

Automated import of CL 143890
/frameworks/base/core/java/android/view/View.java
105925376f8d0f6b318c9938c7b83ef7fef094da 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/frameworks/base/core/java/android/view/View.java
c39a6e0c51e182338deb8b63d07933b585134929 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
/frameworks/base/core/java/android/view/View.java
b2a3dd88a53cc8c6d19f6dc8ec4f3d6c4abd9b54 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
/frameworks/base/core/java/android/view/View.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/view/View.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/view/View.java
076357b8567458d4b6dfdcf839ef751634cd2bfb 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
/frameworks/base/core/java/android/view/View.java
3dec7d563a2f3e1eb967ce2054a00b6620e3558c 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
/frameworks/base/core/java/android/view/View.java
3001a035439d8134a7d70d796376d1dfbff3cdcd 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
/frameworks/base/core/java/android/view/View.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
/frameworks/base/core/java/android/view/View.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/view/View.java
9266c558bf1d21ff647525ff99f7dadbca417309 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
/frameworks/base/core/java/android/view/View.java
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/frameworks/base/core/java/android/view/View.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/view/View.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/view/View.java