2464 Commits

Author SHA1 Message Date
Tsu Chiang Chuang
14c716be79 Make sure the app is still app after launching.
Bug:8755950

Change-Id: Ie30d84cb94787d8b2e7bdc65e329a311581f4a3f
2013-05-01 07:54:48 -07:00
Chris Craik
18455c307d Merge "Add input/output JSON data for baseline comparison" into jb-mr2-dev 2013-04-18 00:32:08 +00:00
Chris Craik
5f78311584 Add input/output JSON data for baseline comparison
CanvasCompare will output a JSON file with test results, and can take
such files as input for baseline comparison. The new logcat output
breaks down results into per-test and per-modifier improvement and
regressions.

Change-Id: I4da0251db0637841173ac95e9f431a7ff52c8b61
2013-04-10 15:07:28 -07:00
Maxim Siniavine
85478b5972 Skip apps without launch intent.
If an app from the apk cannot be launched then skip it in compatibility
test, rather than generate a null pointer exception.

Change-Id: I252031f249bfe25282b10394889ab8c5506cabcf
2013-04-10 12:14:11 -07:00
Daniel Sandler
9fa49cc330 Merge "Fix [-] buttons in the notification builder test." into jb-mr2-dev 2013-04-09 14:34:20 +00:00
Daniel Sandler
72dcb91393 Fix [-] buttons in the notification builder test.
(Broken by change I9fae5a4a).

Bug: 8564511
Change-Id: I0d5b65e6678018630c812c5616e9b3f068029e66
2013-04-09 13:34:04 +00:00
Ying Wang
cf5ccb8f81 Fix tests build.
Change-Id: I24d65c18018a8d6df6fa3414306fc0d586d4cfa2
2013-04-08 19:02:01 -07:00
Daniel Sandler
0e78de6c0f Add tag "foo" to builder test's notifications.
This allows them to be conveniently cleared via adb:

  $ adb shell service call notification 5 \
    s16 com.android.statusbartest \
	s16 foo \
	i32 <NOTIFICATIONID> \
	i32 <USERID>

Bug: 8564511
Change-Id: I9fae5a4a0be64d6707cc06ca938adeb8b3c0b735
2013-04-08 14:42:41 +00:00
Tim Murray
36b859a61f Merge "Specify SDK version for RS graphics tests." into jb-mr2-dev 2013-04-05 22:46:06 +00:00
Tim Murray
b2cb8e41f9 Specify SDK version for RS graphics tests.
Change-Id: Ia61c753392432b91f91260a9b8769dfd396c259f
2013-04-05 15:17:54 -07:00
Daniel Sandler
5feceebb89 New NotificationListenerService.
This is the best and only way for apps to listen for
notifications: create a NotificationListenerService, wait
for the NoMan to bind to you (as a result of the user
checking a box somewhere in Settings and agreeing to a
scary dialog box), and you'll start receiving notification
posted and dismissed callbacks. Your service, while enabled,
will also be able to clear one or all notifications.

Use this power wisely.

This change moves StatusBarNotification out of
com.android.internal into android.service.notification.
[Internal customers, including System UI and early users of
the system-only listener binder API, will need to be
updated.]

Bug: 8199624
Change-Id: I1be46f823d4b3ddc901109ec1e085cd6deb740c2
2013-04-05 19:54:44 +00:00
Guang Zhu
6266a436f3 add account checks to app launch test
This optional parameter ensures that, before test starts, device
has the listed account types configured already.

e.g. to test app launch time of Gmail, a valid Google account
must present on device

Change-Id: Idba11beff754fd1d201a9c44a562809d4a9495e2
2013-03-22 11:36:30 -07:00
Fabrice Di Meglio
19eceaadd7 Merge "Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies" into jb-mr2-dev 2013-03-20 22:27:37 +00:00
Fabrice Di Meglio
665f02c667 Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies
- remove the ICU related methods and update the methods using the "reserved" argument
- update to CTS in another CL too

Change-Id: I5509736568c342d9d17bfeafc17951117ab5d3cc
2013-03-20 14:56:05 -07:00
Jason Sams
4e43d76e82 Merge "Move compute tests from frameworks/base to frameworks/rs" into jb-mr2-dev 2013-03-19 20:47:42 +00:00
Jason Sams
eacf9c8041 Move compute tests from frameworks/base to frameworks/rs
Change-Id: I670027782f5ba6df0713dbdc3c99ae7c1eef7d22
2013-03-19 12:43:46 -07:00
Romain Guy
d4289922ce Apply ComposeShader's local matrix to children
Change-Id: Idf9b8e7d7b30f8fcd8ba1fd4bfe8991e9ca148e2
2013-03-18 19:30:48 -07:00
Romain Guy
c46d07a29e Merge all shapes/paths caches to PathCache
This change will greatly simplify the multi-threading of all
shape types.

This change also uses PathTessellator to render convex paths.

Change-Id: I4e65bc95c9d24ecae2183b72204de5c2dfb6ada4
2013-03-18 18:32:17 -07:00
Dianne Hackborn
338b188444 Merge "Improve/flesh-out shared library version check." into jb-mr2-dev 2013-03-18 18:44:52 +00:00
Dianne Hackborn
ce5abb0a55 Improve/flesh-out shared library version check.
Change-Id: I3d6eb19c8aeaae07a6d17de81ac707c7741608fb
2013-03-15 11:37:01 -07:00
Fabrice Di Meglio
da12f389eb Revert "Clean Paint.mBidiFlags as it is no longer used"
This reverts commit 6d9fe5bd22b531bfce69b146254a4791c76acddc.
2013-03-15 11:26:56 -07:00
Guang Zhu
32abd66ebd change how app launch is tested
new approach:
  * for each app
    * initial launch
    * sleep 7.5s
    * do 10 iterations: launch app with force stop + sleep in between
    * report average of 10 launches

Change-Id: I9e68975325aa83af35620d727823f5c072aac488
2013-03-13 23:24:31 -07:00
Dianne Hackborn
53149acf7b Merge "Implement limited shared libraries in apks." into jb-mr2-dev 2013-03-12 23:03:59 +00:00
Romain Guy
5dc7fa7096 Add TaskManager API
This API can be used to run arbitrary tasks on a pool of worker
threads. The number of threads is calculated based on the number
of CPU cores available.

The API is made of 3 classes:

TaskManager
      Creates and manages the worker threads.

Task
      Describes the work to be done and the type of the output.
      A task contains a future used to wait for the worker thread
      to be done computing the result of the task.

TaskProcessor
      The processor dispatches tasks to the TaskManager and is
      responsible for performing the computation required by
      each task. A processor will only be asked to process tasks
      sent to the manager through the processor.

A typical use case:

class MyTask: Task<MyType>

class MyProcessor: TaskProcessor<MyType>

TaskManager m = new TaskManager();
MyProcessor p = new MyProcessor(m);
MyTask t = new MyTask();
p.add(t);

// Waits until the result is available
MyType result = t->getResult();

Change-Id: I1fe845ba4c49bb0e1b0627ab147f9a861c8e0749
2013-03-12 15:06:42 -07:00
Dianne Hackborn
c895be7bc6 Implement limited shared libraries in apks.
You can now declare shared libraries in apks that are
on the system image.  This is like the existing mechanism
of using raw jar files as shared libraries, but since they
are contained in an apk the library can actually be updated
from the Play Store.  And this even (mostly) works.

There are some deliberate limitations on this feature.  A
new shared library *must* be declared by an apk on the system
image.  Installing an update to a system image apk does not
allow you to add new shared libraries; they must be defined
by everything on the base system image.  This allows us to
get rid of a lot of ugly edge cases (shared libraries that were
there disappearing after an update is uninstalled for example)
and give some brakes on apps that happen to be pre-installed
on devices from being able to throw in new shared libraries
after the fact.

In working on this, I ran into a recently introduced bug where
uninstalling updated to system apps would fail.  This was done
to allow for the new restricted users that don't have all
system apps, but conflicts with the existing semantics for
uninstalling system apps.  To fix this I added a new uninstall
flag that lets you switch on the new mode if desired.

Also to implement the desired logic for limitations on declaring
new shared libraries in app updates, I needed to slightly tweak
the initial boot to keep the Package object for hidden system
packages associated with their PackageSetting, so we can look at
it to determine which shared libraries are allowed.  I think
this is probably more right than it was before -- we already
need to parse the package anyway, so we have it, and when you
install an update to a system app we are in this same state
until you reboot anyway.

And having this fixed also allowed me to fix another bug where
we wouldn't grant a new permission to an updated app if its
system image version is updated to request the permission but
its version is still older than whatever is currently installed
as an update.  So that's good.

Also add new sample code showing the implementation of an apk
shared library and a client app using it.

Change-Id: I8ccca8f3c3bffd036c5968e22bd7f8a73e69be22
2013-03-12 12:51:38 -07:00
Stephen Hines
9f6421a365 Merge "Update RSTest_v14 for stride changes." into jb-mr2-dev 2013-03-12 03:27:42 +00:00
Romain Guy
2a2ead93a9 Merge "Precache paths from a worker thread" into jb-mr2-dev 2013-03-12 01:43:20 +00:00
Romain Guy
ca89e2a687 Precache paths from a worker thread
Change-Id: I3e7b53d67e0e03e403beaf55c39350ead7f1e309
2013-03-11 17:05:28 -07:00
Jason Sams
990a08fcb4 Handle onPause in ImageProcessing.
Change-Id: I538ce0ac7b9da2f4ec6cd7bd35aa84fd710e063f
2013-03-08 16:35:29 -08:00
Jason Sams
f73e7fdd6d Update IP_JB to Mr1
Change-Id: I007b5048a187c90bc19c38e7155d0d5adcc34144
2013-03-08 14:31:15 -08:00
Jason Sams
e699147122 Update IP and IP2
Change-Id: I5e81ae906a36fc1f6dc8de872398c6aa580238f1
2013-03-08 14:00:27 -08:00
Stephen Hines
8b571d8577 Update RSTest_v14 for stride changes.
Change-Id: I8c5d392ba62050781f27c3a1745dbd1a2321b556
2013-03-07 17:04:27 -08:00
Romain Guy
19d4dd8599 Take text scale/skew into account only when rendering into a layer
3D rotations can undo scale/skew transforms; since FreeType only accepts
2x2 matrices we can end up generating very large glyphs that are drawn
at a 1:1 scale on screen. For instance, if the current transform has a
scale of 2000 set on both X and Y axis and a perspective Z factor set to
Z, the actual scale factor on screen ends up being 1. We would however
generate glyphs with a scale factor of 2000 causing the font renderer
to blow up.

Change-Id: Ia5c3618d36644e817825cb9c89e2f53aece2074e
2013-03-04 13:48:43 -08:00
Romain Guy
1361dff5eb Merge "Support 3D rotations when drawing text" into jb-mr2-dev 2013-03-01 00:05:51 +00:00
Romain Guy
a4adcf0239 Support 3D rotations when drawing text
If a perspective transform is set on the Canvas, drawText() should
not attempt to rasterize glyphs in screen space. This change uses
the old behavior instead (i.e. rasterize the glyphs at the native
font size and apply the transform on the resulting mesh.)

This change also adds an optimization: empty glyphs (spaces) do
not generate vertices anymore. This saves a lot of vertices in text
heavy applications such as Gmail.

Change-Id: Ib531384163f5165b5785501612a7b1474f3ff599
2013-02-28 16:04:48 -08:00
Dianne Hackborn
d6a3e485b5 Merge "Unify normal and overlay action bar layouts." into jb-mr2-dev 2013-02-28 22:14:48 +00:00
Romain Guy
29ce8c98ff Reorganize OpenGL renderer tests
The new UI works just like ApiDemos. The label of the activities
declared in the manifest defines where they go in the UI.

For instance Draw/Circles will create an entry called Draw in the
first screen of the test app. Click the "Draw" item will launch
a new activity containing an item called "Circles".

Change-Id: I98a4442ee3d992598af440b2078ae1925214da20
2013-02-28 13:08:34 -08:00
Dianne Hackborn
df7221ced3 Unify normal and overlay action bar layouts.
Switch the action bar to always use the overlay layout, and
make it smarter to do the right thing depending on whether the
action bar is in overlay mode or not.

This allows apps to use the system UI magic flags without
having to worry about whether the action bar is configured
in overlay mode or note -- just select a stable layout and it
will automatically go into overlay mode.

In the future this should also allow us to simplify the action
bar code, since it is all sitting on one common implementation.
For example, much of the logic in ActionBarImpl can be moved
to the root action bar layout, and that layout can be optimized
to do custom layout with all of the known elements it has.

Also fixed a little bug in the performance tests.

Change-Id: Iec0c0c0699754f0d1ce37402d786b4966e052a56
2013-02-27 18:27:42 -08:00
Romain Guy
c74f45a334 Properly scale text
This change does not apply to drawPosText() and drawTextOnPath() yet.

Prior to this change, glyphs were always rasterized based on the
font size specified in the paint. All transforms were then applied
on the resulting texture. This creates rather ugly results when
text is scaled and/or rotated.

With this change, the font renderer will apply the current transform
matrix to the glyph before they are rasterized. This generates much
better looking results.

Change-Id: I0141b6ff18db35e1213e7a3ab9db1ecaf03d7a9c
2013-02-27 15:49:57 -08:00
Craig Mautner
2ad920759b Revert ActivityManager changes for tasks. DO NOT MERGE
Keeping all activity=>task changes in master and removing them
from jb-mr2.

Revert "Update histories simultaneously."
Revert "Add null check to setAppGroupId."
Revert "Fix crashing bug in validator."
Revert "Switch topRunning* and moveTaskTo*"
Revert "Begin switch over to task based history."
Revert "Reset and reuse Iterators and don't new() one."
Revert "Remove AppWindowToken lists."
Revert "Fix build."
Revert "Remove unused App methods."
Revert "Stop using AppToken movement and start using Task."
Revert "Replace access to mAppTokens with AppTokenIterator"
Revert "Refactor setAppOpVisibility implementation."
Revert "Add AppWindowTokens to TaskList."
Revert "Make ActivityStack.mHistory private."
Revert "Migrate AppWindowToken lists into DisplayContent."

Change-Id: I5722c9a4956dccb52864207e2967690bc58e4ebb
2013-02-25 17:07:39 -08:00
Jason Sams
fc0fd4f52c Remove surfaceTextureOpaque test.
This test was for an API we decided not to
expose publically and have removed.

Change-Id: Ic2b8449b286c8d1fb1432ccc2db47f96ad43cc4b
2013-02-22 13:53:44 -08:00
Jason Sams
72226e0543 Implement USAGE_IO_INPUT
Change-Id: Id5b9e3d0a17e4df15eec36d542fde6dc626138b2
2013-02-22 12:45:54 -08:00
Jason Sams
840b506970 Merge "Support typed YUV allocations." 2013-02-16 02:54:22 +00:00
Jason Sams
dd6c8b34f1 Support typed YUV allocations.
Change-Id: I56e7a318dc979f0b7454fcfa5773ea6d95bbaeaa
2013-02-15 17:27:24 -08:00
Chris Craik
62a42c13a6 Adjust offset for non-AA line drawing
bug:8114304

The original .375 was chosen to make GL_LINES align with Skia drawing.
The new value of .065 is chosen to be as small as possible to make
triangle-based lines align with Skia, while keeping lines drawn on
integer coordinates unambiguous as to which column/row they draw on.

Also adds more lines in CanvasCompare test to highlight the difference

Change-Id: If578684f2db320682219c3caa625cf79bc62d88f
2013-02-15 14:53:12 -08:00
Romain Guy
10c0aa246d Merge "Implement support for drawBitmapMesh's colors array" 2013-02-14 18:51:28 +00:00
Craig Mautner
ee006a14b2 Fix build.
Change-Id: I6fb00530536e5203d89805141792289ed7c1d8e3
2013-02-14 10:35:32 -08:00
Romain Guy
ff316ec7a7 Implement support for drawBitmapMesh's colors array
Change-Id: I3d901f6267c2918771ac30ff55c8d80c3ab5b725
2013-02-13 18:39:43 -08:00
Jason Sams
23496bdbba Convert live preview demo to IO_OUTPUT
Change-Id: I01193932a6fcd572841434a59d34eda60d9b8b02

Fix aspect ratio
2013-02-13 16:07:50 -08:00
Jason Sams
0a4b65e079 Merge "Reuse context and allocations across test." 2013-02-13 23:49:10 +00:00