7024 Commits

Author SHA1 Message Date
Dianne Hackborn
0a0a63c8b1 Merge "Add new "work queue" feature to JobScheduler." into oc-dev 2017-04-12 17:55:56 +00:00
Mark Salyzyn
c9668a1805 jni: isLoggable: adapt to removal of property name size limit
(cherry picked from commit 8143fa57adfbb4a5cc253e4ef68663525a8f81eb)

There is no longer a name size limit to the properties, remove
illegalArgumentException if tag length is too large.

Test: build
Bug: 36696208
Change-Id: I4b4329c8c951082ed0d777cdd70ee3e773bed16c
2017-04-11 16:15:23 -07:00
Dianne Hackborn
7da13d7c3e Add new "work queue" feature to JobScheduler.
This gives semantics similar to the start command
queue of services.

The implementation is currently lacking in URI permission
grant handling of the work intents; that will be coming
in a follow-up change.

This includes a first step of adjusting/fixing locking
within JobSchedulerService.  The JobServiceContext class
has a bunch of stuff it does that assumes it doesn't need
locking because it schedules the work on a handler.  However,
to be able to correctly implement the work finish flow (that
takes care of stopping the job when there is no more work),
we can't dispatch these asynchronously so need to get rid of
that and just do explicit locking.

The switch to explicit locking is half-way there (again the
remaining part will be a follow-on CL).  Right now we have
the locking, but still also the handler.  But it turns out
there were a number of things we were doing without a lock
held where we actually should have been holding a lock, so
this is better anyway.

Test: new tests added

Change-Id: Iebd098046209b28e60fd2f4d855d7f91cd3a8b03
2017-04-11 13:57:15 -07:00
Mathieu Chartier
94f11c531f Fix some maps to be HEAP_DALVIK_CODE_CACHE instead of HEAP_DALVIK_ACCOUNTING
dalvik-data-code-cache and dalvik-CompilerMetadata should be counted
in JITCache instead of .GC in dumpsys.

Bug: 37224159
Test: adb shell dumpsys meminfo -d

(cherry picked from commit 874c4cf56c0a9ea3b48468a13ec7fb78a3e2594b)

Change-Id: I41def949d91b2fdef0b3f502fe16ae436d058051
2017-04-11 11:07:37 -07:00
TreeHugger Robot
b96891e0e3 Merge "DngCreator: Populate baseline exposure tag" into oc-dev 2017-04-10 10:04:05 +00:00
TreeHugger Robot
7dfa16c2ef Merge "Color management, the missing pieces" into oc-dev 2017-04-07 18:34:40 +00:00
Emilian Peev
7ca1371987 DngCreator: Populate baseline exposure tag
"postRawSensitivityBoost" contains the gain value applied after
RAW. Take this value in to account and populate the baseline
exposure accordingly.

Bug: 33623101
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java

Change-Id: Ib90a5c1791c422fd36ec44fb6ef695ba8a1dc475
2017-04-07 18:26:47 +01:00
Romain Guy
8242656f49 Color management, the missing pieces
Implement missing color management pieces for bitmaps:

- Bitmap.createBitmap(Bitmap src, ...) now creates a bitmap
  in the same color space as the source bitmap
- Bitmap.createScaledBitmap() now creates a bitmap in the
  same color space as the source bitmap
- Bitmap.createBitmap(..., ColorSpace colorSpace) to create
  bitmaps in a specific color space
- Fix copy from A8 to F16
- Copying bitmaps in F16 or with a color space does not work,
  it's currently a limitation in Skia

Bug: 36905374
Test: BitmapColorSpaceTest
Change-Id: I0092fe4432511db50daa3a9393389a9db05e0c2a
2017-04-07 07:56:14 -07:00
TreeHugger Robot
ca687ac39a Merge "Change requestWait API according to request" into oc-dev 2017-04-07 13:19:12 +00:00
Philip P. Moltmann
9b6dd2b2c1 Change requestWait API according to request
Test: USB Device CTSVerifier test
Change-Id: Ib55bed248d7b37c6f5f4a7be7ec2d90a7ac396c7
Fixes: 36555805
2017-04-06 18:13:53 -07:00
TreeHugger Robot
34cb00ac83 Merge "SurfaceControl: Crash due to invalid JNI cast" into oc-dev 2017-04-06 23:35:38 +00:00
TreeHugger Robot
5362f10dad Merge "Set android.display thread to top-app cpusets and schedtune group" into oc-dev 2017-04-06 22:51:42 +00:00
TreeHugger Robot
610b55e8bc Merge "Use hwservicemanager getTransport." into oc-dev 2017-04-06 22:15:08 +00:00
Patrik Torstensson
511a808cea SurfaceControl: Crash due to invalid JNI cast
The (void*)buffer.get on ARM32 is 4 byte, so the calling convention
will put the argument in [sp, #12]. However, the caller actually
expects a long (the signature of gGraphicBufferClassInfo.builder),
which means it will expect it to be in [sp, #16]

Test: Tested on mtk device
Fixes: 36631082
Fixes: 36974487
Change-Id: I0f723125e612d096c0d76ca3360d895f3f23f286
(cherry picked from commit 98dd5d9a85e8911cf41dea6198d4111f737a5892)
2017-04-06 21:19:58 +00:00
Joel Fernandes
2d314e15c9 Set android.display thread to top-app cpusets and schedtune group
android.display being in the foreground cpuset group is an issue. As
seen on M/S, during heavily CPU load it is not given core 3 even though
it might be free and causes jank. This patch adds the thread to the
top-app group to ensure it is placed on all cores during scheduling
decisions.

Doing this required a couple of changes:
- new API to set per-thread cpusets
- changes to DisplayManagerService to set the thread to top-app group
- changes to SystemServer to set the policy toward the end, as doing it
  during start of the DisplayManagerService was in issue (issue being
  SystemServer calls setSystemProcess.. -> setProcessGroup which overrides
  the group settings for threads in the system server process, including
  android.display)

Bug: 36631902
Test: Boot and make sure android.display thread is in the top-app group

Change-Id: Icc394ea0ffcf159d11728ad38de114234a29d20f
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit 474d311cb098e86c078c3f615e1161e2854f1847)
2017-04-06 21:19:25 +00:00
Steven Moreland
f8202e464e Use hwservicemanager getTransport.
libhidl no longer provides a getTransport function. Now, call into the
hwservicemanager which directly interfaces with libvintf.

Test: extensive, see Ia5d1eb41b057ab5d6800f6c3fd22658adecc4be7
Bug: 36377072
Change-Id: I8b0ca845251cd7cd156f3471cbd4b0ce17617be0
2017-04-06 09:29:58 -07:00
Matt Sarett
ea70d22dc8 Xform bitmaps to sRGB on SW and PDF canvases
For picture-backed canvases, we will defer the xform
until playback.

Test: Unit tests and cts test.
Bug: 32984164
Change-Id: Ib74663bcb688b74b6ba8792b403b0475126732af
2017-04-06 15:14:00 +00:00
TreeHugger Robot
a441da153e Merge "Camera: Initial support for vendor tag caches" into oc-dev 2017-04-06 14:02:11 +00:00
Peng Xu
33bbdda3d3 Merge "Local geomagnetic field update to sensor" into oc-dev 2017-04-06 00:00:11 +00:00
Emilian Peev
de62d84eb9 Camera: Initial support for vendor tag caches
Vendor tag cache will be used alternatively to the regular
Vendor tag descriptor. The caches can support multiple vendor
tag providers at the same time. The native metadata along with
the requests/results/characteristics will store vendor specific
information that will be used to indentify the respective
descriptor.

Bug: 34275821
Test: Complete Camera/Camera2 CTS tests
Change-Id: I50b7cf9aa5575944fde7673a1728869690b2ce0d
2017-04-05 20:50:10 +01:00
ztenghui
b244fb528b Make sure we handle the matrix separately for non-invertable matrix
b/36895991
Test: added CTS tests and Run spotify

Change-Id: I2786e612494530405dad5c3edb2bc53915a1c2dc
2017-04-05 11:08:10 -07:00
Mathias Agopian
810e018e24 Merge "Remove useless GraphicBuffer() constructor" into oc-dev 2017-04-05 00:42:58 +00:00
TreeHugger Robot
46f847fb76 Merge "Need to return false if addSkTypeface fails." into oc-dev 2017-04-04 22:11:32 +00:00
Peng Xu
1cfde25e40 Local geomagnetic field update to sensor
Local geomagnetic field strength, declination, inclination information
is useful for magnetometer calibration. It also benefits rotation
vector sensor implementation as it gives a baseline that aids detecting
magnetic field disturbance.

Bug: 30958130
Test: Tested with marlin. Modified hal implementation can get local
      geomagnetic field.

Change-Id: I373fe74d5a091a3adb80ff3c61e441edcf5a253b
2017-04-04 12:35:49 -07:00
TreeHugger Robot
f9340ca491 Merge "Fix HWUI/Skia Gradients to premultiply the colors prior to interpolation" into oc-dev 2017-04-04 19:06:32 +00:00
TreeHugger Robot
2ac9698271 Merge "Reorganize font enumeration API." into oc-dev 2017-04-04 16:49:56 +00:00
Derek Sollenberger
669b15a935 Fix HWUI/Skia Gradients to premultiply the colors prior to interpolation
This is fixed in Skia by passing the appropriate flag when the shader is
generated.  The fix in HWUI is to reverse the premultiplication and
interpolation steps.

Test: bit CtsUiRenderingTestCases:.testclasses.ShaderTests
Bug: 34323783
Change-Id: I3417141949f62fcc696b6d8213a4b446d7d0cbf8
2017-04-04 12:07:28 -04:00
TreeHugger Robot
7e5d2c23a4 Merge "ANativeWindow_toSurface implementation" into oc-dev 2017-04-04 04:30:15 +00:00
TreeHugger Robot
641691901e Merge "In MountEmulatedStorage() do not try to mount for mode MOUNT_EXTERNAL_NONE." into oc-dev 2017-04-04 02:59:36 +00:00
Jiwen 'Steve' Cai
d28e8283d3 ANativeWindow_toSurface implementation
This enables the conversion from an ANativeWindow (created by NDK API
such as: AImageReader_create) to a Java Surface, so that developers can
hookup a Java Producer to a native buffer consumer.

This CL also introduces android_view_Surface_createFromSurface helper
function in libandroid_runtime to convert a C++ sp<Surface> to a Java
Surface object.

Bug: 36862948
Test: android.media.cts.NativeImageReaderTest
Change-Id: Ia99adb654da505ac117a8e58153ac800df23a650
2017-04-03 19:13:31 -07:00
Mathias Agopian
845eef05ff Remove useless GraphicBuffer() constructor
Test: compiled & run
Bug: 36869708
Change-Id: Ie825979cd03874904b6f953ece4a05d4a0d52253
2017-04-03 17:51:15 -07:00
Robert Sesek
eb6c098608 In MountEmulatedStorage() do not try to mount for mode MOUNT_EXTERNAL_NONE.
When creating an isolatedProcess=true service and when the native bridge
is in use, MountEmulatedStorage() is called with force_mount_namespace=true
and MOUNT_EXTERNAL_NONE. This led to an abort crash, since the process
would attempt to mount an empty path string.

Test: android.externalservice.cts.ExternalServiceTest built for ARM, run on Fugu
Bug: 36072260
Change-Id: I9441bcbd30167971ad486726bbeae57f3c4aebe9
Merged-In: I88474b6f50ae7cfab40ba44ff1da0df6021a2fb0
(cherry picked from commit 06f393067772f613e938f794444dc90e90c40fc0)
2017-04-04 00:47:09 +00:00
Seigo Nonaka
d5d6561f25 Need to return false if addSkTypeface fails.
Bug: 36809770
Test: android.content.res.cts.ResourcesTest#testGetFont_invalidFontFiles
Change-Id: I89438805b9232b1f789af5f70ef1f773589ecd3a
2017-04-03 15:51:02 -07:00
Seigo Nonaka
ff55115121 Reorganize font enumeration API.
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
  This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.

Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
2017-04-03 13:55:07 -07:00
Philip P. Moltmann
91ed33b032 Rename UsbRequest.enqueue to UsbRequest.queue
Fixes: 36850572
Test: CtsVerifier USB device tests on angler
Change-Id: If2a376a8615bf2aa24a6d3a30c7d0a29365f52ea
2017-04-03 11:25:07 -07:00
TreeHugger Robot
e1df48d3a0 Merge "Camera: add batching support to HAL1 recording path" into oc-dev 2017-04-03 07:34:06 +00:00
TreeHugger Robot
21a5edcc24 Merge "Override bidi property of new emojis" into oc-dev 2017-04-03 00:21:55 +00:00
Yin-Chia Yeh
19ddea90c1 Camera: add batching support to HAL1 recording path
Test: Angler HAL1 + batching normal recording mode
Bug: 35997432
Change-Id: Ibe82e7fed8d6e57291e0c009fb26ce156e66eee7
2017-04-01 13:14:20 -07:00
TreeHugger Robot
81b292abdf Merge changes from topic 'bitmapfactory-options-outdecodecolorspace' into oc-dev
* changes:
  Documentation for PorterDuffXfermode
  Query color space before decoding a bitmap
2017-04-01 04:17:48 +00:00
Roozbeh Pournader
ce93f31035 Override bidi property of new emojis
In BidiFormatter and AndroidBidi, treat emojis new to
Unicode 10.0/Emoji 5 as bidi class ON.

Test: Manual
Bug: 32952475
Change-Id: I1a40c6ee2b6e9d91c9d1e5b64faca6d16301fe93
2017-03-31 18:34:58 -07:00
Romain Guy
90fc43b33d Query color space before decoding a bitmap
This follows the pattern established by other "out" fields
in BitmapFactory.Options

Bug: 32984164
Test: CtsGraphicsTestCases

Change-Id: Ie72e47338b578b41c550453e2698d2d49eddf6da
2017-03-31 09:09:57 -07:00
Daichi Hirono
f8708a026c Pass correct size of integer to CallVoidMethod.
Previously FuseAppLoop passes int values 0 to CallVoidMethod while the
argument must be jlong.

Bug: 35229514
Test: StorageManagerTest#testOpenProxyFileDescriptor{,_error,_async}
Change-Id: Id286d38da54b4523c63f2b380596e0de06887b3a
(cherry picked from commit 77a97cdba2903a6534fcabc1b8bc79b51aef54f5)
2017-03-31 01:24:22 +00:00
Rob Carr
2b33162e82 Merge "Remove code for seamlessly rotating SurfaceView's." into oc-dev 2017-03-30 20:10:26 +00:00
Robert Carr
897215d76a Remove code for seamlessly rotating SurfaceView's.
No longer required :D

Bug: 36230754
Bug: 36727915
Test: Rotate camera in different modes.
Change-Id: I7708d61646a36bc0c35cfa91d441296eb49eff9a
2017-03-29 12:29:29 -07:00
Daichi Hirono
812c95d37d Allow apps to process ProxyFDCallback asynchrnously.
Previously callback methods of ProxyFileDescriptorCallback were invoked
on a background thread prepared in the framework. So all methods were
invoked and processed synchronously. This was problem because if it took
time to fetch bytes of one file, operations for other files were also
blocked.

The CL changes ProxyFileDescriptorCallback methods to be invoked on
Handler passed by apps. Now application can prepare a Handler per file
so that one file does not block others.

Bug: 35229514
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest#testOpenProxyFileDescriptor_async
Change-Id: Ibadc4aad4c0373a3da586459a8f775e40288c895
(cherry picked from commit 4f156065c860d916b649e2b464e9405cafc732e9)
2017-03-29 00:14:16 +00:00
TreeHugger Robot
bbf038bc5e Merge "Remove "Allow persistent changes to the vendor overlay theme"" 2017-03-24 22:25:20 +00:00
Matt Sarett
7f60d4a894 Merge "Support Alpha8->RGBA bitmap copying" 2017-03-23 22:05:14 +00:00
Jason Monk
cc5a731fd7 Remove "Allow persistent changes to the vendor overlay theme"
This reverts commit 2dc804be11444565e3d1d151c2a693db3ade94c0.
It also removes the related calls from UiModeManager.

Fixes: 32721178
Test: make & flash
Change-Id: Id371bccec611155cc6910e46b3277c3d27fc1c79
2017-03-23 11:25:59 -04:00
TreeHugger Robot
2a1a66b547 Merge "Add skia/src/codec to core/jni include dirs" 2017-03-22 21:51:55 +00:00
Matt Sarett
b6cb6298ea Add skia/src/codec to core/jni include dirs
This should allow a jpeg encoding change in Skia to land:
https://skia-review.googlesource.com/c/10011/

Test: NA

Change-Id: If2474a548c9e22c5a13bf14fd38bd344355ac29a
2017-03-22 15:13:30 -04:00