Commit Graph

4100 Commits

Author SHA1 Message Date
Svetoslav
e1c4b5c64d am e340e68f: Merge "Update JavaDoc"
# Via Android (Google) Code Review (1) and Svetoslav (1)
* commit 'e340e68f1fe9c539606ad1ec2b76a3edb8f835bd':
  Update JavaDoc
2013-01-29 03:26:29 -08:00
Svetoslav
14ff996ce8 Update JavaDoc
Change-Id: I9644677eb715de1c4ba2f1608b38980f02bdf75d
2013-01-29 03:21:37 -08:00
Guang Zhu
cf55195281 am 6b30ba86: fix the build
# Via Guang Zhu
* commit '6b30ba86a4bfdbe5d87fed29720c4b4431d3685b':
  fix the build
2013-01-29 00:45:26 -08:00
Guang Zhu
6b30ba86a4 fix the build
broken docs

Change-Id: I802d33c8ef2147adf36a495145a615cb206b9936
2013-01-29 00:36:42 -08:00
Svetoslav Ganov
984019868a am d0fd5464: Merge "Adding UI test automation APIs."
# Via Android (Google) Code Review (1) and Svetoslav (1)
* commit 'd0fd54648ca6249f56cf469c57181b5a7bbb71d0':
  Adding UI test automation APIs.
2013-01-28 19:23:22 -08:00
Svetoslav Ganov
d0fd54648c Merge "Adding UI test automation APIs." 2013-01-29 03:16:40 +00:00
Romain Guy
55dccf3e98 am 29e4aa7a: Merge "Reinitialize hardware renderer after eglTerminate() Bug #8066455"
# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit '29e4aa7abe6b0c62f31fb23b8572cd5b91f08f5c':
  Reinitialize hardware renderer after eglTerminate() Bug #8066455
2013-01-28 14:10:16 -08:00
Romain Guy
3696779bca Reinitialize hardware renderer after eglTerminate()
Bug #8066455

ViewRootImpl was properly detecting that the renderer was not
ready to draw but would simply schedule another frame, thus sending
the systemui into an inifite redraw loop. This change reinitializes
the renderer if needed (if the renderer is requested but not enabled.)

This CL also fixes an issue caused by the default wallpaper. Since it
never calls eglTerminate(), managed contexts are never reclaimed.

Change-Id: Idb8caa672be8ee35f6e6a7e942d9abd8aa100967
2013-01-28 14:04:07 -08:00
Siva Velusamy
bc0ed2ce8b am a6a5c8f6: Merge "Support invoking view methods from hierarchy viewer"
# Via Android (Google) Code Review (1) and Siva Velusamy (1)
* commit 'a6a5c8f6b66c0750a28d2ad9cba18d0c730c4393':
  Support invoking view methods from hierarchy viewer
2013-01-28 10:12:04 -08:00
Siva Velusamy
a6a5c8f6b6 Merge "Support invoking view methods from hierarchy viewer" 2013-01-28 18:03:35 +00:00
Dianne Hackborn
7af76f20cd am d8ba6cc9: Merge "Add new API to propagate contextual data to the assist action"
# Via Android (Google) Code Review (1) and Dianne Hackborn (1)
* commit 'd8ba6cc9217e2e042106870e9d2e70cfd80426d6':
  Add new API to propagate contextual data to the assist action
2013-01-23 14:51:07 -08:00
Dianne Hackborn
f9c5e0fe83 Add new API to propagate contextual data to the assist action
When launching an assist, we have a new API allowing the
current foreground activity/application to provide additional
arbitrary contextual information that is stuffed in the
assist intent before it is launched.

Change-Id: I0b2a6f5a266dc42cc0175327fa76774f814af3b4
2013-01-23 14:39:13 -08:00
Svetoslav Ganov
80943d8daa Adding UI test automation APIs.
This change adds APIs support for implementing UI tests. Such tests do
not rely on internal application structure and can span across application
boundaries. UI automation APIs are encapsulated in the UiAutomation object
that is provided by an Instrumentation object. It is initialized by the
system and can be used for both introspecting the screen and performing
interactions simulating a user. UI test are normal instrumentation tests
and are executed on the device.

UiAutomation uses the accessibility APIs to introspect the screen and
a special delegate object to perform privileged operations such as
injecting input events. Since instrumentation tests are invoked by a shell
command, the shell program launching the tests creates a delegate object and
passes it as an argument to started instrumentation. This delegate
allows the APK that runs the tests to access some privileged operations
protected by a signature level permissions which are explicitly granted
to the shell user.

The UiAutomation object also supports running tests in the legacy way
where the tests are run as a Java shell program. This enables existing
UiAutomator tests to keep working while the new ones should be implemented
using the new APIs. The UiAutomation object exposes lower level APIs which
allow simulation of arbitrary user interactions and writing complete UI test
cases. Clients, such as UiAutomator, are encouraged to implement higher-
level APIs which minimize development effort and can be used as a helper
library by the test developer.

The benefit of this change is decoupling UiAutomator from the system
since the former was calling hidden APIs which required that it is
bundled in the system image. This prevented UiAutomator from being
evolved separately from the system. Also UiAutomator was creating
additional API surface in the system image. Another benefit of the new
design is that now test cases have access to a context and can use
public platform APIs in addition to the UiAutomator ones. Further,
third-parties can develop their own higher level test APIs on top
of the lower level ones exposes by UiAutomation.

bug:8028258

Also this change adds the fully qualified resource name of the view's
id in the emitted AccessibilityNodeInfo if a special flag is set while
configuring the accessibility service. Also added is API for looking
up node infos by this id. The id resource name is relatively more stable
compared to the generaed id number which may change from one build to
another. This API facilitate reuing the already defined ids for UI
automation.

bug:7678973

Change-Id: I589ad14790320dec8a33095953926c2a2dd0228b
2013-01-22 17:56:53 -08:00
Siva Velusamy
f9455fafb6 Support invoking view methods from hierarchy viewer
This CL adds support for invoking any view method with
primtive arguments, and setting layout parameters from
the debugger (hierarchy viewer).

requestLayout() and invalidate() are now just implemented
using the more generic invokeMethod() command.

Change-Id: Icffda251728a4963b35266786b0b6143bae7fe8e
2013-01-22 17:25:46 -08:00
Dake Gu
ef1215d98b am ebf7c743: am 85a06152: am fe88f1be: Merge "Fix bug of SimulatedTrackball" into jb-mr1-aah-dev
* commit 'ebf7c74361baefb826591bd90cdacd9244a2eb59':
  Fix bug of SimulatedTrackball
2013-01-18 14:08:22 -08:00
Dake Gu
ebf7c74361 am 85a06152: am fe88f1be: Merge "Fix bug of SimulatedTrackball" into jb-mr1-aah-dev
* commit '85a06152ce9b7d3a198639eb1918a9c2a3fd34d4':
  Fix bug of SimulatedTrackball
2013-01-18 14:01:57 -08:00
Dake Gu
85a06152ce am fe88f1be: Merge "Fix bug of SimulatedTrackball" into jb-mr1-aah-dev
* commit 'fe88f1be3d197987a874f6c29fefdeb11db183f6':
  Fix bug of SimulatedTrackball
2013-01-18 13:26:02 -08:00
Dake Gu
f8739b992f Fix bug of SimulatedTrackball
Simulated trackball should not generate KeyEvent if dispatchGenericMotionEvent
returns true

b/8022205

Change-Id: I1857e25407c508c98ef4db85fe146b1e25a0803e
2013-01-17 18:15:44 -08:00
Romain Guy
e9a983b444 am b12db26f: Merge "Implement clipRect with a transform, clipRegion & clipPath Bug #7146141"
* commit 'b12db26fec178794915d819c3dd64f13d788c461':
  Implement clipRect with a transform, clipRegion & clipPath Bug #7146141
2013-01-17 15:50:17 -08:00
Romain Guy
8ce00301a0 Implement clipRect with a transform, clipRegion & clipPath
Bug #7146141

When non-rectangular clipping occurs in a layer the render buffer
used as the stencil buffer is not cached. If this happens on a
View's hardware layer the render buffer will live for as long
as the layer is bound to the view. When a stencil buffer is
required because of a call to Canvas.saveLayer() it will be allocated
on every frame. A future change will address this problem.

If "show GPU overdraw" is enabled, non-rectangular clips are not
supported anymore and we fall back to rectangular clips instead.
This is a limitation imposed by OpenGL ES that cannot be worked
around at this time.

This change also improves the Matrix4 implementation to easily
detect when a rect remains a rect after transform.

Change-Id: I0e69fb901792d38bc0c4ca1bf9fdb02d7db415b9
2013-01-17 15:39:31 -08:00
Siva Velusamy
0e4a842732 am 281184fb: Merge "Support hierarchy viewer commands via DDM"
* commit '281184fb86a1866b3e8f8a0d8b38a1aa934849dc':
  Support hierarchy viewer commands via DDM
2013-01-16 14:26:05 -08:00
Siva Velusamy
281184fb86 Merge "Support hierarchy viewer commands via DDM" 2013-01-16 22:23:55 +00:00
Siva Velusamy
945bfb6068 Support hierarchy viewer commands via DDM
Hierarchy Viewer currently interfaces to the host via a socket
opened by ViewServer which resides in the WindowManagerService.
Since this has access to all windows, it is enabled only on
debug builds.

This CL adds necessary support to DDM to handle all the commands
required for Hierarchy Viewer. It only misses two commands that
are sent to the Window Manager (which we don't have access to
from the applications).

A future CL will remove the ViewServer functionality.

Change-Id: I1dae316a00737b0cae4e640ccc97bf9bb1d05973
2013-01-16 09:13:06 -08:00
Romain Guy
616a87736d am 61840eb0: Merge "Preliminary Support for region clipping"
* commit '61840eb03882e1a964ae971725bd21229c3db42c':
  Preliminary Support for region clipping
2013-01-15 10:28:01 -08:00
Romain Guy
61840eb038 Merge "Preliminary Support for region clipping" 2013-01-15 10:25:00 -08:00
Jeff Brown
31ea5707fa am 9afb2e1a: Optimize focused input event dispatch in view root. DO NOT MERGE
* commit '9afb2e1a95b92d5dfb0612bbb606a09aa528ee5d':
  Optimize focused input event dispatch in view root. DO NOT MERGE
2013-01-14 17:26:22 -08:00
Jeff Brown
9afb2e1a95 Optimize focused input event dispatch in view root. DO NOT MERGE
The efficiency of key, trackball and generic motion event
dispatch is greatly influenced by the IME dispatch cycle.
This change simplifies the dispatch of focused input events
and avoids causing event processing to be requeued on the
handler and delayed unnecessarily.

Bug: 7984576
Change-Id: Id82624a3f32c05efe6ee5c322bd55bf2ab21525d
2013-01-14 15:55:35 -08:00
Jeff Brown
b2e6538c59 am 22a94cb0: Merge "Optimize focused input event dispatch in view root."
* commit '22a94cb03ad39c5256608e4954fe4e85179d9ed6':
  Optimize focused input event dispatch in view root.
2013-01-14 15:46:16 -08:00
Jeff Brown
22a94cb03a Merge "Optimize focused input event dispatch in view root." 2013-01-14 15:44:08 -08:00
Jeff Brown
29c0ed2c13 Optimize focused input event dispatch in view root.
The efficiency of key, trackball and generic motion event
dispatch is greatly influenced by the IME dispatch cycle.
This change simplifies the dispatch of focused input events
and avoids causing event processing to be requeued on the
handler and delayed unnecessarily.

Bug: 7984576
Change-Id: Id82624a3f32c05efe6ee5c322bd55bf2ab21525d
2013-01-14 15:31:36 -08:00
Romain Guy
735738c4dd Preliminary Support for region clipping
Region clipping, using Canvas.clipPath or Canvas.clipRegion, requires
a stencil buffer to be always present. In addition, extra wiring is
required in JNI and display lists.

This change only adds the necessary JNI/C++ APIs and some extra
plumbing to start the real work on properly supporting region
clipping.

A new debug define called DEBUG_CLIP_REGIONS can be used to draw
the current clip region. It is off by default, as is region
clipping.

The default implementation of clipPath() and clipRegion(), now
in native, mimics the previous Dalvik implementation to prevent
regressions.

Change-Id: I7903e7cfd7412b9b9b622566d4dbfce7bdcec00c
2013-01-14 14:27:54 -08:00
Fabrice Di Meglio
c6a207c67b am 9003007d: Merge "Fix Volume icons for RTL languages"
* commit '9003007d35c6ae1cdeac4ca831a036292b7089e9':
  Fix Volume icons for RTL languages
2013-01-11 11:16:49 -08:00
Fabrice Di Meglio
9003007d35 Merge "Fix Volume icons for RTL languages" 2013-01-11 11:10:00 -08:00
Romain Guy
7962964a68 am fff06e97: Merge "Add a new type of profiling graph: lines"
* commit 'fff06e97e3e4e22271ec41ac0c44036aad3141fe':
  Add a new type of profiling graph: lines
2013-01-10 18:45:03 -08:00
Romain Guy
fff06e97e3 Merge "Add a new type of profiling graph: lines" 2013-01-10 18:41:37 -08:00
Romain Guy
48ef4a92a4 Add a new type of profiling graph: lines
Change-Id: I0e67d7227016fe37011e17d04220a200a6a5fba0
2013-01-10 18:38:46 -08:00
Svetoslav Ganov
2adc9bb1b4 am ea307734: Merge "Fixing a memory leak in ViewRootImpl and a focus change callback issue."
* commit 'ea307734e79e36a961d5184f89f7baa171f9915d':
  Fixing a memory leak in ViewRootImpl and a focus change callback issue.
2013-01-10 15:53:55 -08:00
Svetoslav Ganov
ea307734e7 Merge "Fixing a memory leak in ViewRootImpl and a focus change callback issue." 2013-01-10 15:45:38 -08:00
Dianne Hackborn
9e6575bc52 am 854458f4: am 0287ca3c: am e62fa825: Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
* commit '854458f4d52937f9a1385559d759bd8019eb3294':
  Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
2013-01-09 19:01:26 -08:00
Dianne Hackborn
854458f4d5 am 0287ca3c: am e62fa825: Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
* commit '0287ca3ca36ad98004ddabfa189105e6324a820e':
  Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
2013-01-09 19:00:06 -08:00
Dianne Hackborn
e62fa82579 Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
The volume panel now forces us out of the UI modes while it
is up.

Change-Id: If39fa33b1c52579bf5d376ce4722408cee3ca951
2013-01-09 18:51:51 -08:00
Dianne Hackborn
04ce447784 am 91893471: Merge "Fix issue #7966357: Super lights out mode vs. volume dialog"
* commit '91893471ba844287432db4473a15faf902889607':
  Fix issue #7966357: Super lights out mode vs. volume dialog
2013-01-09 18:47:31 -08:00
Dianne Hackborn
891d3fbb15 Fix issue #7966357: Super lights out mode vs. volume dialog
The volume panel now forces us out of the UI modes while it
is up.

Change-Id: I25f29af5b6518aba695b64a75977ae240b742118
2013-01-09 18:31:37 -08:00
Fabrice Di Meglio
8c02884c8c Fix Volume icons for RTL languages
- add mirrored version of the icons
- make VolumePanel respond to layout direction changes
- make AudioService propagate layout direction changes to the VolumePanel

Change-Id: Ibb884ab81641c319a9b7bea1381066f3f19581f0
2013-01-09 18:25:20 -08:00
Svetoslav Ganov
149567f9d5 Fixing a memory leak in ViewRootImpl and a focus change callback issue.
1. ViewRootImpl was keeping reference to the old focused view so it can
   call back the global on focus change listener when another view gets
   focus. The stashed reference, however was not cleared which caused a
   memory leak if the last focused view was removed from the view tree.
   In general keeping additional state for the last focus in ViewRootImpl
   is not a good idea since this add complexity due to additional book
   keeping work that is required. The view tree already keeps track of
   where the focus is and it should be the only place that holds this
   data. Since focus does not change that frequently it is fine to look
   up the focus since this operation is O(m) where m is the depth of the
   view tree. This change removes the duplicate book keeping from
   ViewRootImpl and the focus is looked up as needed.

2. ViewRootImpl was calling the global focus change callbacks when focus
   is gained, lost, or transferred to another view. This was done in
   *ChildFocus methods. In the case of a child losing focus, i.e. in
   clearChildFocus, there was a check whether focus searh yields a view
   to take focus and if so it did not call back the global focus listener
   assuming the the found view will take focus (the view tree gives focus
   to the first focusable when a view looses focus). This is not a correct
   assumption since some views override methods called as a result of
   View.requestFocus that determine what the next focused view should
   be. For example, HorizontalScrollView overrides onRequestFocusInDescendants
   and changes the direction of the search. In fact focus search does not
   take into accound ViewGroup descendant focusability. Hence, the view found
   by calling the focus search from the root is not necessarily the one
   that will get focus after calling requestFocus. Actually, it is
   possible that the focus search will find a view but no view will
   take focus. Now the View class is responsible for calling the
   global focus listeners which avoids the above problem. Also this
   saves book keeping in ViewRootImpl.

bug:7962363

Change-Id: Ic95a18b364e997021f3f6bb46943559aac07d95a
2013-01-09 12:34:49 -08:00
Derek Sollenberger
fc615a0f64 Remove calls to SkCanvas::setBitmapDevice()
Change-Id: Ib0aa2f65b77802b105c0e8a9d7cdde2e863d3673
2013-01-08 10:00:54 -05:00
Craig Mautner
e620507766 am 4b71aa1f: Move app transition constants
* commit '4b71aa1f8a1a3b7189fd29241ea7c594ce01623c':
  Move app transition constants
2013-01-08 00:02:12 -08:00
Craig Mautner
4b71aa1f8a Move app transition constants
Move app transition constants from WindowManagerPolicy to
AppTransition.

Change-Id: I8ae6c4d0da1db826c44eb4ea0c6b85016b50b1a3
2013-01-07 23:38:57 -08:00
Romain Guy
e64fb50701 am 7d1c4fa3: Remove out-of-date comment and rename constant
* commit '7d1c4fa322dec1247f7d509a066e436f1d2706fa':
  Remove out-of-date comment and rename constant
2013-01-07 11:59:27 -08:00
Romain Guy
7d1c4fa322 Remove out-of-date comment and rename constant
Change-Id: I0c60d349505776cff0d7e5360e87ac5584dc5876
2013-01-07 11:55:27 -08:00