288 Commits

Author SHA1 Message Date
Svetoslav
62ce332c14 Trim unnecessary pages when printing.
A user may request a subset of the document's pages to be printed.
In this case the expectation is that the resulting document does
not include not selected pages. While print serivices can do the
trimming themselves or the printer may do so, moving, potantually
many, redundant pages is inefficient. The real problem is when
saving to a PDF file where the saved file must not have the pages
the user did not select. This change adds shredding of undesired
pages from the PDF before saving it or passing it to a print service.
:
bug:17285994

Change-Id: I7deba535af99457bea3c118202314f0f3812e809
2014-09-09 09:38:07 -07:00
Yong WU
abd76d0a09 Integrate NativeActivity with NativeBridge interfaces
Bug: 16884833

(cherry picked from commit I73aab8e212860ba5aee9444d801806d3da326a41)

Change-Id: I67f037ea81d2a4ede4294afd8b84b7640e534a13
2014-08-15 13:22:30 +01:00
Neil Fuller
3b852e3489 Rewriting android.text.format.Time without the native _tz functions
(cherry picked from commit d7f0849b8c053ccc6abf0dc7d5bc07da502782a4)
Bug: 15765976

Change-Id: I00f72bd1043ef20f22d25559206b2f741334ba9c
2014-07-24 11:37:20 +01:00
Behdad Esfahbod
6ba30b85dd Add android.Paint that inherits SkPaint
The idea is that extra paint parameters that only affect text layout
(not rendering) will go in android.Paint instead of going into
SkPaintOptionsAndroid.  We will eventually move those out of SkPaint
too.

This is currently implemented in PaintImpl.cpp.  Will be renamed when
current Paint.cpp that has JNI bits is moved to android_graphics_Paint.cpp.

Change-Id: Iba66c34dea5da503a13b9c864cb9f2211ac4ba7d
2014-07-22 14:01:09 -04:00
Derek Sollenberger
8872b38ef4 Separate Canvas JNI code from the implementation.
This introduces Canvas.h which is a pure virtual interface that
is intended to be used by both Skia and HWUI implementation. To help
stage this transition this CL only introduces the interface and Skia
implementation.  The interface is not intended to be final and will
undoubtedly go through iterations in both style and location as we
look to introduce the HWUI implementation.

BUG:15672762
Change-Id: Ibaccdddb87d3b9358f4f0c1d317ead5282d4ee16
2014-07-21 12:08:57 -04:00
John Reck
580ff8142b Revert "Separate Canvas JNI code from the implementation."
This reverts commit e28a5afee885cd69a5be5809f88116b601cb1a72.

 Appears to cause memory corruption and random appearances of
 chinese

 Bug: 16343240
 Bug: 16336642

Change-Id: Ife169181f40adff4b12948ed5f9d3a88dcec935b
2014-07-17 17:36:24 +00:00
Derek Sollenberger
f5d6c555c3 Separate Canvas JNI code from the implementation. DO NOT MERGE
This introduces Canvas.h which is a pure virtual interface that
is intended to be used by both Skia and HWUI implementation. To help
stage this transition this CL only introduces the interface and Skia
implementation.  The interface is not intended to be final and will
undoubtedly go through iterations in both style and location as we
look to introduce the HWUI implementation.

BUG:15672762
Change-Id: Idefadede356f688edb8eb09b4a02aa01b4077f62
2014-07-15 15:08:29 +00:00
destradaa
a4fa3b5aa5 Add support in the platform for Activity Recognition Hardware.
Change-Id: I7c4fff3526583475a5edf1f4ba8fede4e9419ead
2014-07-11 15:58:36 -07:00
Eino-Ville Talvala
e1f57d6f44 Camera2: Add CPU/GPU overhead measurement to legacy mode
Dumps GL and CPU processing duration and frame timestamps to a file,
whenever the device is closed or the stream configuration is changed.

- Add PerfMeasurement class to legacy mode
- Wire up minimal usage to SurfaceTextureRenderer

Change-Id: Ic9d74ca26f706780b746175aa615c7aae4ae52e7
2014-07-10 23:49:07 +00:00
Colin Cross
0769e55001 android.os.Process: add killProcessGroup
Add Process.killProcessGroup to interface between ActivityManager and
libprocessgroup.

Bug: 15313911
Change-Id: I5226a6d86153b863e30d936cf1c84e256f0d7ea5
2014-07-10 18:08:08 +00:00
Elliott Hughes
b58d385e17 resolved conflicts for merge of f6be5a7a to master
Change-Id: I6dcfb33981df90877fb9f3752b853cf377633edf
2014-07-09 17:40:24 -07:00
Elliott Hughes
92b1896dfd Switch frameworks/base/core/jni to the new icu.
Change-Id: Id12ce02da377ce78f318e10633c47f500237d9d9
2014-07-09 16:56:11 -07:00
Anish Athalye
88b5b0be88 Implement line breaking using ICU break iterator
Change-Id: I4ad98757aa2eab5dbc2ae44c0391e900ef20c4d0
2014-06-30 22:14:05 +00:00
Raph Levien
3660789f06 Switch all text layout to Minikin
This patch switches all text layout operations to use Minikin, removes
the USE_MINIKIN #ifdef, and deletes some of the code that was only used
in the old TextLayout path (although some more refactoring remains).

Change-Id: I51b5c4e2bb46cfd9d204c12b9f16f135c769f5b5
2014-06-26 08:23:48 -07:00
Derek Sollenberger
4b0959d8db Refactor android.graphics.Picture JNI bindings.
This is the first CL in a series of CLs to refactor the Graphics JNI bindings.

bug: 15672762
Change-Id: I1455fa1330c7426407c06eeaad81ad37a57373b1
2014-06-17 15:31:43 -04:00
Robert Phillips
b59508fce5 Changes to framework for ToT Skia.
Consists of 3 cherry-pick from changes by robertphillips@google.com
in master-skia:

-----------------------------------------------------------------------

New AndroidPicture wrapper class

Address code review comments & use new SkPictureRecorder::partialReplay
entry point

Addressing code review issues

Switch MakePartialCopy to makePartialCopy

Conflicts:
	core/jni/android/graphics/Picture.cpp

Ie530ab15b3d549f0ecfb0ecc131f9144a7b72a91

Remove AndroidPicture from GraphicsJNI and split into .h and .cpp

-----------------------------------------------------------------------

Fix lingering legacy picture recording behavior
Address code review issues

Iaf870c2c400dbe70dc32d6d445574904f5ea718f

-----------------------------------------------------------------------

Update Android to new SkCanvas::drawPicture interface

As of Skia 9b14f26d (Alter SkCanvas::drawPicture (devirtualize,
take const SkPicture, take pointer) -
https://codereview.chromium.org/313613004) SkCanvas::drawPicture
has an alternate signature. The old entry point is deprecated.

I63395da61ecc3b58bfd2bc094752081f4b2f7535

-----------------------------------------------------------------------

Change-Id: I041133aeb5639abd853370e512acf93870f82aea
2014-06-11 18:27:48 -04:00
Eric Laurent
5edb85c17d Merge "add sound trigger JNI" 2014-06-05 21:04:50 +00:00
Eric Laurent
60b62bc5c1 add sound trigger JNI
Add JNI for sound trigger hardware native service.

Change-Id: Idd0ee42c7af5fe20e7d8295994211de3a517bd13
2014-06-04 17:59:12 -07:00
John Reck
84a4c887a0 Remove GLRenderer
Change-Id: I180286417c1a354fc7eb1eadb1884ac6add0795c
2014-06-02 16:33:52 -07:00
Ruben Brunk
94ecb5506a am a7c97c55: Merge "camera2: Move DngCreator to hardware/camera2." into lmp-preview-dev
* commit 'a7c97c552a280ed3a2ff3535a5085f8601f45820':
  camera2: Move DngCreator to hardware/camera2.
2014-05-24 00:30:06 +00:00
Ruben Brunk
b6079005ed camera2: Move DngCreator to hardware/camera2.
Bug: 15091253
Change-Id: Ibe2ee376436e5c796e33c0b782ea68278589f2e6
2014-05-22 22:57:11 +00:00
Paul Jensen
985086276f Merge "Implement bind-to-network functionality of android.net.Network." 2014-05-22 16:14:21 +00:00
Ruben Brunk
94520c7460 Merge "camera2: Add HAL1 compatibility shim skeleton." 2014-05-22 06:08:56 +00:00
Paul Jensen
3876495129 Implement bind-to-network functionality of android.net.Network.
This is implemented by calling through to netd_client.
Included are functions to bind-to-network-for-process strictly for DNS to
facilitate startUsingNetworkFeature() reimplementation.

Change-Id: Ib22c7d02ea81d251bdfeeb0f64a47ce32eefcb1b
2014-05-22 04:16:54 +00:00
Jesse Hall
7ab63acdd0 opengl: Add GLES31 and GLES31Ext classes
Bug: 15028495
Change-Id: Ie967c1938060edb42864dd48efa668ae7bf5cd76
2014-05-21 21:04:20 -07:00
Ruben Brunk
feb50af361 camera2: Add HAL1 compatibility shim skeleton.
This adds basic support for running the Camera2 API on a device running
a camera HAL version lower than CAMERA_MODULE_API_VERSION_2_0.

This CL includes support for:
- N-way preview output streams
- N-way jpeg output streams
- CameraDevice emulation at the binder interface
- Basic camera metadata querying in the CameraManager

Bug: 15117269
Bug: 15116722

Change-Id: I8322955034c91f34bb348d4b28c2b774dbef38f6
2014-05-21 16:37:59 -07:00
Svetoslav Ganov
519c77b710 Switching to the final PDF rendering library
Change-Id: Id92674ce762af894a5c4b0df0f8e9a711131bccc
2014-05-21 12:43:51 -07:00
Ed Heyl
a5291466ea Fix the build: Revert "Switching to the final PDF rendering library"
This reverts commit e7a8f476ea3873941ace96751fa2d633c95b7c10.

Change-Id: I457e45b0a536bbde721a3355ed860b2363e36467
2014-05-21 19:21:06 +00:00
Svetoslav
89ff50cea8 Switching to the final PDF rendering library
Change-Id: I5bad4fc620378f3ca6b070bbaeee631f526b66c7
2014-05-21 10:40:42 -07:00
Ruben Brunk
f967a5486a camera2: Plumb DngCreator to native library.
Change-Id: Ic58bf6cf5086808b503460ef8e451fc0d6f1f850
2014-05-16 23:25:51 -07:00
Svetoslav
dbef65f1a1 Merge "Adding APIs to render PDF documents." 2014-05-15 20:15:06 +00:00
Mike Reed
4c9355c35a Frameworks changes to support latest Skia (r14729)
Required for a merge in external/skia
(I88b4d5cc81c357a8e223bd7860b1029590265200).

Includes two cherry-picks:

I456df543e1925b280f785c7b3bb81370157f9b09:
replace SkRasterizer* with NativeRasterizer* in JNI

I98adb200e023369d3ee75f21927fa98f23095a77:
Fix Paint.getFlags,setFlags wrt FILTER_BITMAP_FLAG

In Paint.setFlags(), turn FILTER_BITMAP_FLAG into a call to
SkPaint::setFilterLevel().

In Paint.getFlags(), read SkPaint::getFilterLevel() to determine
whether to include FILTER_BITMAP_FLAG in the result.

Fixes CTS tests with ToT Skia.

Change-Id: I2736f3f68683651574d79a169ff0ab563e0a469e
2014-05-15 10:17:44 -04:00
Raph Levien
2836c4722a Merge "Start of Minikin integration" 2014-05-15 02:03:05 +00:00
Svetoslav
2961769ea9 Adding APIs to render PDF documents.
We need to render PDF documents for two main use cases. First,
for print preview. Second, for resterizing the PDF document by
a print service before passing it to a printer which does not
natively support PDF (most consumer ones).

Adding PDF rendering APIs improves guarantees for print quality
as the same library is used for preview and rasterization. Also
print vendors do not have to license third-party rendering engines.
Last but not least as the platform uses PDF as its main print
format it should also be able to natively render it.

Change-Id: I57004a435db147663cafea40cf3296465aba7f99
2014-05-13 18:32:42 -07:00
John Reck
315c329544 Add TimeInterpolator support to RNA
Bug: 14678626

Change-Id: I6554e7fcd42c49fac3618ca792083bb68e358f55
2014-05-12 14:41:06 -07:00
Raph Levien
1a73f732f9 Start of Minikin integration
This is the current state of the Minikin integration. All changes are
hidden behind USE_MINIKIN #ifdef, so it should be safe to apply. To
play with the Minikin branch, set this in your BoardConfig.mk .

This change also merges in 64-bit changes that were happenening in
parallel.

Change-Id: Idd94553bcbe324c5875d0ff06495c966c3e95b7f
2014-05-12 10:41:42 -07:00
John Reck
9fa4071c47 Refactor VirtualLightRefBase & JNI
Change-Id: I8e244e7109e59d5be96871b23bb9b1201c7f9eaa
2014-05-09 15:28:54 -07:00
Ying Wang
29894c6176 am db55bb06: am 4463cbc6: am 3b9600b6: Merge "Remove unused LOCAL_LDLIBS."
* commit 'db55bb0622e9fbe4b858d59409f516de01c1f1fd':
  Remove unused LOCAL_LDLIBS.
2014-05-08 18:31:18 +00:00
Ying Wang
b38e3fdf5a Remove unused LOCAL_LDLIBS.
Change-Id: I01346e76f4ac6402af0ef33e3b2eef4a69e704a2
2014-05-07 15:23:37 -07:00
Jim Miller
08fa40c5cb First pass at adding FingerprintManagerService
This adds a new service for monitoring and enrolling fingerprints
to the platform.

Fixed documentation links.

Change-Id: I66013be5e09be9c5f9746c46aacf32d3e26c3b73
2014-05-07 02:27:21 +00:00
John Reck
52244fff29 Add CanvasProperty for drawCircle
Change-Id: Icbcc030f5033d2094e567d7c519b9d672f2aac1c
2014-05-02 13:43:46 -07:00
John Reck
e45b1fd03b RenderThread animator support
Change-Id: Icf29098edfdaf7ed550bbe9d49e9eaefb4167084
2014-04-29 10:42:11 -07:00
Narayan Kamath
b69bb44558 resolved conflicts for merge of 71ab4f4f to master
Change-Id: I888c231f7579523e12fbd68f820f0775019e51e0
2014-04-02 11:52:07 +01:00
Narayan Kamath
973b4663b0 Move zygote startup logic to the frameworks.
The Zygote class is now in com.android.internal.os. It is
responsible for the vast majority of work before and after
the call to fork(). It calls back into the Runtime via
the new dalvik.system.ZygoteHooks class to allow the Runtime
to perform pre fork cleanup and post fork initialization.

The native code in Zygote.cpp is a direct and straightforward
port of the existing code in art. Most differences are
superficial, for example :
- We use C style logging (ALOGE) instead of stream based
  logging.
- We call env->FatalError() instead of using LOG(FATAL)

Change-Id: Ia101fb2af12d23894fe57e4134d2bc6d142e5059
2014-04-02 10:18:43 +01:00
Glenn Kasten
37967d46f4 Use memcpy_to_i16_from_u8 from audioutils instead of C loop
This function may be optimized in the future,
and it will make it easier to search for audio sample
format-specific code when we need add support for more formats.

Change-Id: Iad0585c35ddd2d12857164ed1effcce75f77920c
2014-03-28 16:52:40 -07:00
John Reck
f666ad7046 Rename DisplayList->RenderNode
Change-Id: Idcca6f26ba6282594789962f5edb3ed53a290fef
2014-03-17 10:30:32 -07:00
Chris Craik
6786252405 Fix use of Skia deprecated methods
Change-Id: Ib89c20fc94bcce29b7490d6f55c73492735befda
2014-02-28 12:26:34 -08:00
Derek Sollenberger
950fe8f8d4 Cleanup unnecessary includes for libskia.
The libskia target exports all of its public includes directories so
redefining them here is redundant. Also this cleans up and makes it
obvious where the framework is making using of private Skia headers.

Change-Id: Ie7ecc9ddd3df780bed6b9af54ba58ca58274e043
2014-02-27 16:21:24 +00:00
Narayan Kamath
2b20f6db9c am a1aeac80: am 25c55ca9: am 911b2ce3: am 4a642ee5: Merge "Remove unused JNITest class"
* commit 'a1aeac80df09cf8d481474264b1ce78ed64e7464':
  Remove unused JNITest class
2014-02-21 16:58:33 +00:00
Ashok Bhat
42f06b0e22 Remove unused JNITest class
JNITest class is no longer actively used. This patch
removes the class (java and jni) files.

JNI interfaces and calls are extensively tested in
the art unit tests (art/tests) and in cts (see
CtsJniTestCases).

Change-Id: I62f7c72deb5d206fa3f545ae39a9cb9011110d0a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-21 14:34:35 +00:00