Commit Graph

4515 Commits

Author SHA1 Message Date
Kristian Monsen
155d965ab0 am 3d1edc03: am 6e7ed13b: Merge "Fix for bug 8623163: Call view methods on the UI thread" into jb-mr2-dev
* commit '3d1edc033ff00430e1f8118cd871d9996b7172a1':
  Fix for bug 8623163: Call view methods on the UI thread
2013-05-13 02:34:39 -07:00
Kristian Monsen
3d1edc033f am 6e7ed13b: Merge "Fix for bug 8623163: Call view methods on the UI thread" into jb-mr2-dev
* commit '6e7ed13b12edc9e02580a273c3aa546e62231b5a':
  Fix for bug 8623163: Call view methods on the UI thread
2013-05-13 02:33:01 -07:00
Kristian Monsen
6e7ed13b12 Merge "Fix for bug 8623163: Call view methods on the UI thread" into jb-mr2-dev 2013-05-13 09:30:07 +00:00
Craig Mautner
e555d16421 am c3797f40: am 4754f401: Merge "Avoid NullPointerException in getHandler()"
* commit 'c3797f40c1a8a8f7ca72816642110221933ff8fd':
  Avoid NullPointerException in getHandler()
2013-05-10 15:17:00 -07:00
Svetoslav
6f3a6a453a am 1e4c6589: am b3c2b21b: Merge "Accessibility should not query for list items when data set changed." into jb-mr2-dev
* commit '1e4c6589941e459871eed6e9d4675b05d977325c':
  Accessibility should not query for list items when data set changed.
2013-05-10 15:16:57 -07:00
Craig Mautner
c3797f40c1 am 4754f401: Merge "Avoid NullPointerException in getHandler()"
* commit '4754f401a912305e1ceec04b62ad9b9f7d3c2ff6':
  Avoid NullPointerException in getHandler()
2013-05-10 13:34:23 -07:00
Svetoslav
1e4c658994 am b3c2b21b: Merge "Accessibility should not query for list items when data set changed." into jb-mr2-dev
* commit 'b3c2b21b5ba30d82938ae2ef93d8120f5fd0cc80':
  Accessibility should not query for list items when data set changed.
2013-05-10 13:10:41 -07:00
Svetoslav
b3c2b21b5b Merge "Accessibility should not query for list items when data set changed." into jb-mr2-dev 2013-05-10 20:06:42 +00:00
Chet Haase
2d4edcf2e1 am a9d5adea: am fb32c824: Merge "Fix start delay jank in ViewPropertyAnimator" into jb-mr2-dev
* commit 'a9d5adea9e9676d19b7a50ce3d6c673c16ee7a6d':
  Fix start delay jank in ViewPropertyAnimator
2013-05-09 16:28:33 -07:00
Chet Haase
a9d5adea9e am fb32c824: Merge "Fix start delay jank in ViewPropertyAnimator" into jb-mr2-dev
* commit 'fb32c82412111983236f44cbc8fd90f113d7ea34':
  Fix start delay jank in ViewPropertyAnimator
2013-05-09 16:23:29 -07:00
Chet Haase
fb32c82412 Merge "Fix start delay jank in ViewPropertyAnimator" into jb-mr2-dev 2013-05-09 22:09:18 +00:00
Chet Haase
dcfbd6a2c9 Fix start delay jank in ViewPropertyAnimator
Issue #8892620 start delay jank in ViewPropertyAnimator

Change-Id: I17a57ac3351fb2c1516b594d135aa9ce9f78c88e
2013-05-09 14:40:21 -07:00
John Spurlock
68fcaa2c0b Merge "Navigation hideybar via new system ui opt-in flag." 2013-05-09 13:39:24 +00:00
Michael Jurka
82f92ee5bd am 7741b63c: am 6dee0a0f: Merge "Fix bug where thumbnails flashed more often in Recents" into jb-mr2-dev
* commit '7741b63c5a8e14b5123c4b735dc768cf55fa2ed5':
  Fix bug where thumbnails flashed more often in Recents
2013-05-08 15:05:18 -07:00
Fabrice Di Meglio
8be78240f3 am 6eb036e7: am 366b97ba: Merge "Fix bug #8839681 Reversed Textbox focus order on RTL and android:imeOptions="flagNoExtractUi"" into jb-mr2-dev
* commit '6eb036e7894758bcc357fc282070aa8677227ce1':
  Fix bug #8839681 Reversed Textbox focus order on RTL and android:imeOptions="flagNoExtractUi"
2013-05-08 15:04:33 -07:00
Alan Viverette
5e6fbf2694 am fa4c935e: am 239a0c0e: Ensure ViewRootImpl.setAccessibilityFocus() doesn\'t crash when reentrant.
* commit 'fa4c935edcfa09bb53a3aac411a285842a00ddee':
  Ensure ViewRootImpl.setAccessibilityFocus() doesn't crash when reentrant.
2013-05-08 15:03:49 -07:00
Svetoslav
5b578daac9 Accessibility should not query for list items when data set changed.
AbsListView is backed by an adapter. After the adapter data changes
the view sets a flag that its state is dirty and requests a layout.
If an accessibility service asks for the state of a list item at
this point, it may incur an error since the views and the adapter
are not in sync.

Now if an accessibility service queries for a list item when the
data set is changed and the item views are dirty, we pretend the
children do not exist. After the layout happens, we notify the
accessibility layer that the screen content changed so it can
refetch the views if desired (this notification mechanism is
already in place in AbsListView#handleDataChanged()).

bug:8433433

Change-Id: I4287a0ac2ef6bb33f1f988d5ddad973556c305ca
2013-05-08 14:23:38 -07:00
Michael Jurka
7741b63c5a am 6dee0a0f: Merge "Fix bug where thumbnails flashed more often in Recents" into jb-mr2-dev
* commit '6dee0a0fe68096a6714b7d570241f61e4d6ea20a':
  Fix bug where thumbnails flashed more often in Recents
2013-05-08 14:10:44 -07:00
Michael Jurka
f42d9010f1 Fix bug where thumbnails flashed more often in Recents
Bug: 8867698

Change-Id: I2773601d83507dbb55c3a1d0b723e3853e22d352
2013-05-08 20:48:36 +02:00
Fabrice Di Meglio
6eb036e789 am 366b97ba: Merge "Fix bug #8839681 Reversed Textbox focus order on RTL and android:imeOptions="flagNoExtractUi"" into jb-mr2-dev
* commit '366b97ba25de237c42c815c5e8ca36303ce104df':
  Fix bug #8839681 Reversed Textbox focus order on RTL and android:imeOptions="flagNoExtractUi"
2013-05-08 11:17:25 -07:00
Fabrice Di Meglio
366b97ba25 Merge "Fix bug #8839681 Reversed Textbox focus order on RTL and android:imeOptions="flagNoExtractUi"" into jb-mr2-dev 2013-05-08 17:56:17 +00:00
John Spurlock
ad3e6cb4db Navigation hideybar via new system ui opt-in flag.
Apps using SYSTEM_UI_FLAG_HIDE_NAVIGATION to hide the nav bar
or SYSTEM_UI_FLAG_FULLSCREEN to hide the status bar can now
opt into hideybars by also using a new public sysui flag:
  View.SYSTEM_UI_FLAG_ALLOW_OVERLAY

When opting in, apps accept the fact that bars can be overlayed
over their content, but gain the ability to use the entire gesture
space - something that was not possible before, particularly when
hiding the nav bar.

Swiping from the nav bar edge of the screen will reveal the new hidey
version of the nav bar, if applicable.

Bug: 8682181
Change-Id: I6405bee50e6516667ba6b9a62d4f1e43490b5562
2013-05-08 12:22:16 -04:00
Alan Viverette
fa4c935edc am 239a0c0e: Ensure ViewRootImpl.setAccessibilityFocus() doesn\'t crash when reentrant.
* commit '239a0c0e6a6fc36025fdb1c662e1c7acaec144bb':
  Ensure ViewRootImpl.setAccessibilityFocus() doesn't crash when reentrant.
2013-05-07 17:43:18 -07:00
Alan Viverette
239a0c0e6a Ensure ViewRootImpl.setAccessibilityFocus() doesn't crash when reentrant.
Internal state must be cleared before calling any methods on the focus
host, since the method may be called again from the host and attempt to
recycle the same AccessibilityNodeInfo twice.

BUG: 8856860
Change-Id: I0410989fd6f3ce3ce29de8edebdfbf3847188843
2013-05-07 17:17:35 -07:00
Fabrice Di Meglio
3167c88c2c Fix bug #8839681 Reversed Textbox focus order on RTL and android:imeOptions="flagNoExtractUi"
- make SequentialFocusComparator RTL-aware

Change-Id: I3d9cc81f777d16933a8e1b69f8ed63efa5be0925
2013-05-07 15:46:22 -07:00
Romain Guy
fd06074c68 am c4818d86: am 4c95c537: Merge "Optimize list view scrolls Bug #8108706" into jb-mr2-dev
* commit 'c4818d860b90813bde082c381de933933abc574c':
  Optimize list view scrolls Bug #8108706
2013-05-07 10:25:20 -07:00
Romain Guy
c4818d860b am 4c95c537: Merge "Optimize list view scrolls Bug #8108706" into jb-mr2-dev
* commit '4c95c5377a75a3d6c5f3ed8b09a56071d51fadb1':
  Optimize list view scrolls Bug #8108706
2013-05-06 19:09:25 -07:00
Romain Guy
5549cb590d Optimize list view scrolls
Bug #8108706

Change-Id: I8679b584132e82b7bb3301a38800de4ddfc57be6
2013-05-06 18:42:08 -07:00
Fabrice Di Meglio
7caa1a87fe am a8549041: am 8c2e3a41: Merge "Optimize RTL properties resolution" into jb-mr2-dev
* commit 'a8549041ccdf38f8ddbdc5fc2bce84d737a89a7e':
  Optimize RTL properties resolution
2013-05-06 13:56:17 -07:00
Dave Burke
38996cdcf1 am 236cc476: Temporarily revert field name change (DO NOT MERGE)
* commit '236cc476e6792a11502ba4f40c7ab4586f40d282':
  Temporarily revert field name change (DO NOT MERGE)
2013-05-06 11:11:51 -07:00
Fabrice Di Meglio
a8549041cc am 8c2e3a41: Merge "Optimize RTL properties resolution" into jb-mr2-dev
* commit '8c2e3a412aaee8359a48265a101ca27e7b67301c':
  Optimize RTL properties resolution
2013-05-06 11:11:03 -07:00
Dave Burke
236cc476e6 Temporarily revert field name change (DO NOT MERGE)
VisualOn is using hidden fields, causing HBO and Xfinity to crash.
Bug: 8549617
Bug: 8331866

Change-Id: I35a9fe66dea8d56f4fcff9b492679226a17f4acc
2013-05-06 00:21:30 -07:00
Fabrice Di Meglio
09ecb255a6 Optimize RTL properties resolution
- dont bother children about resolving RTL properties if the ViewGroup parent
has not done anything

Change-Id: Iedf8a337097e04e1ab0054d59fc347e06b347ea7
2013-05-03 17:33:31 -07:00
Romain Guy
8add80211e Merge "Add an on-screen overdraw counter" 2013-05-04 00:27:28 +00:00
Romain Guy
78dd96d5af Add an on-screen overdraw counter
The counter can be enabled by setting the system property called
debug.hwui.overdraw to the string "count". If the string is set
to "show", overdraw will be highlighted on screen instead of
printing out a simple counter.

Change-Id: I9a9c970d54bffab43138bbb7682f6c04bc2c40bd
2013-05-03 17:08:20 -07:00
Romain Guy
89852c1401 Merge "Prevent a crash on devices that remove non-core services" 2013-05-03 20:36:51 +00:00
Romain Guy
927bc7d720 Prevent a crash on devices that remove non-core services
Change-Id: Id7fcf0f1f7b6ddec8e860b3c4cde98aec63d04b6
2013-05-03 11:32:09 -07:00
Jeff Brown
b468877f7f am f87d4ea7: am 17cf4e4d: Merge "Really make Surface thread-safe." into jb-mr2-dev
* commit 'f87d4ea77a6950c3d6d381347f2346c12bee25f4':
  Really make Surface thread-safe.
2013-05-03 11:24:20 -07:00
Jeff Brown
f87d4ea77a am 17cf4e4d: Merge "Really make Surface thread-safe." into jb-mr2-dev
* commit '17cf4e4d4a576009efbfce93bd64b687601b71c7':
  Really make Surface thread-safe.
2013-05-03 11:18:58 -07:00
Jeff Brown
17cf4e4d4a Merge "Really make Surface thread-safe." into jb-mr2-dev 2013-05-03 02:11:03 +00:00
Kristian Monsen
97e8f62804 Fix for bug 8623163: Call view methods on the UI thread
Routing all methods invoked via reflection to the UI
thread and waiting for the the return value.

Change-Id: I8c38309253187f752b715453acb7f4f7bf54f9f8
2013-05-02 18:57:21 -07:00
Mathias Agopian
b7446f9ddb Merge "simplify Surface{View} dirty rect handling" 2013-05-02 23:26:26 +00:00
Romain Guy
3b748a44c6 Pack preloaded framework assets in a texture atlas
When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
2013-05-02 13:32:09 -07:00
Jeff Brown
fc0ebd7d37 Really make Surface thread-safe.
There were many places where the native object was being
accessed improperly.  Also some places where CloseGuard might
not be acquired or released correctly or where the generation
count might not be updated.

Fixed them all.

That said, Surface isn't intended to be used concurrently
so please don't do it.  This is only intended to make
hard to find crashes less likely.

Bug: 8328715
Change-Id: I981ef33425823e0fd7ad6b64443f2ec9b0c8335e
2013-05-01 15:28:01 -07:00
Koji Fukui
c6031ab7c8 Avoid NullPointerException in getHandler()
mAttachInfo may be set to null by other threads while running
getHandler().

This fix assigns mAttachInfo to a local variable. Checking null pointer
and getting a member variable are executed through the local variable.
This local variable is constant. So NullPointerException doesn't occur
even if mAttachInfo is set to null while running getHandler().

Change-Id: I4013dfb7951bd864628868ed58f8c4f5b7cbd1d3
2013-05-01 17:20:25 +09:00
Romain Guy
fa4eb085c3 am b107b7e9: Merge "Prevent TextureView from ever setting a null layer paint Bug #8760436" into jb-mr2-dev
* commit 'b107b7e9ecaee799a7a18b8ab897969ef554fd9b':
  Prevent TextureView from ever setting a null layer paint Bug #8760436
2013-04-30 18:16:11 -07:00
Romain Guy
b107b7e9ec Merge "Prevent TextureView from ever setting a null layer paint Bug #8760436" into jb-mr2-dev 2013-05-01 01:14:41 +00:00
Chet Haase
b713a15f09 am 8afd195d: am 6b313da0: Merge "Clarify behavior of fullscreen mode and softInputMode\'s adjustResize" into jb-mr2-dev
* commit '8afd195d47d2813822a388fbd0ea69228deafcf0':
  Clarify behavior of fullscreen mode and softInputMode's adjustResize
2013-04-30 16:45:42 -07:00
Chet Haase
8afd195d47 am 6b313da0: Merge "Clarify behavior of fullscreen mode and softInputMode\'s adjustResize" into jb-mr2-dev
* commit '6b313da0d89564711acfc8c66b7790da0f52d187':
  Clarify behavior of fullscreen mode and softInputMode's adjustResize
2013-04-30 16:42:33 -07:00
Romain Guy
4225d79656 Merge "Handle Surface::lock errors in TextureView Bug #8689535" 2013-04-30 18:58:17 +00:00