7094 Commits

Author SHA1 Message Date
Yifan Hong
6cc2d70762 Merge "Update for removing mount arg to VintfObject::CheckCompatibility" into oc-dev am: 35edfc1fdc
am: 6955963d18

Change-Id: I04617ab2fc8775616aa76f326a2360e6c7bebf69
2017-04-15 10:11:24 +00:00
TreeHugger Robot
35edfc1fdc Merge "Update for removing mount arg to VintfObject::CheckCompatibility" into oc-dev 2017-04-15 10:01:25 +00:00
Yifan Hong
585ffd1cb3 Update for removing mount arg to VintfObject::CheckCompatibility
It is default to false.

Test: pass
Bug: 36814503

Change-Id: Ib06850d3355f54996b17cc6c2980a7d17af132e5
2017-04-14 15:41:32 -07:00
Romain Guy
908370bb27 Merge "Add BitmapFactory.Options.inColorSpace" into oc-dev am: c99bcc69f7
am: f713a1960e

Change-Id: Ie1d361e946cf68ba97352ef6946f9d82ed5b784b
2017-04-14 21:19:25 +00:00
Romain Guy
c99bcc69f7 Merge "Add BitmapFactory.Options.inColorSpace" into oc-dev 2017-04-14 21:08:42 +00:00
Matt Sarett
00ce770070 Merge "Bug fix: use legacy SkCanvas regardless of color space tag" into oc-dev am: 101dc265a8
am: 7e92ac449b

Change-Id: Ic50bd5fe0358390024bdb9a34e14906dba669f25
2017-04-14 19:02:54 +00:00
Seigo Nonaka
24c6464663 Merge "Use provided style for fallback font selection" into oc-dev am: 43112fd26e
am: 83c52e0a40

Change-Id: Ia42f6a377c2617c8da9a84cb8bd7781326e464a1
2017-04-14 18:09:55 +00:00
Romain Guy
95648b8a59 Add BitmapFactory.Options.inColorSpace
This allows applications to load bitmap in a preferred
target color space, similar to inPreferredConfig for
configurations.

This change also applies recent changes made to BitmapFactory
to BitmapRegionDecoder: support for outColorSpace, inColorSpace
and outConfig.

Bug: 32984164, 36905374
Test: CtsGraphicsTestCase (BitmapColorSpaceTest/BitmapRegionDecoderTest)
Change-Id: I4eded9190d1aa9c7f3033f9bb78a6854cc48a3ef
2017-04-14 10:14:27 -07:00
Yifan Hong
1ac3406335 Merge "Add Java API for libvintf." into oc-dev am: c223d70e64
am: 38bf613c0f

Change-Id: I3d2d7c3db36395aa3fcfcbb2396619c46c353d05
2017-04-14 17:05:01 +00:00
Matt Sarett
ca9b703b88 Bug fix: use legacy SkCanvas regardless of color space tag
Test: Added unit test. CtsGraphicsModule.

Bug: 32984164

Change-Id: If72e1e31c98e01f97f3a05d763f5d4c71cf88313
2017-04-14 16:26:50 +00:00
Seigo Nonaka
659c9cfac3 Merge "Introduce setFallbackTypeface" into oc-dev am: 729a515e5e
am: 17452ee553

Change-Id: I66fe816727aae3fdf617c41796b25478090704fe
2017-04-14 15:31:25 +00:00
Seigo Nonaka
43112fd26e Merge "Use provided style for fallback font selection" into oc-dev 2017-04-14 15:13:15 +00:00
TreeHugger Robot
c223d70e64 Merge "Add Java API for libvintf." into oc-dev 2017-04-14 02:02:08 +00:00
Yifan Hong
becc56d7ea Add Java API for libvintf.
android.os.VintfObject has two methods:

- report: return device info that can be reported to OTA server
- verify: verify that metadata for a given OTA package is
          compatible.

Test: pass
Test: adb shell am instrument -w -e class android.os.VintfObjectTest \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 36814503

Change-Id: Iff8fae289eec8ae9cfc327d0d0d36a1cdd5e6800
2017-04-13 18:04:05 -07:00
Seigo Nonaka
d154829cb1 Use provided style for fallback font selection
If the developer gives some weight/italic to the Typeface.Builder
the fallback used the metadata in the font file. We should use
provided data instead.

This CL also adjusts upper and lower limits on weight, from 100..900 to
1..1000

Bug: 37257745
Bug: 37251569
Test: android.graphics.cts.TypefaceTest passes
Change-Id: I7cf390d96b49afcce359928373698b0c9a9babd8
2017-04-14 00:54:46 +00:00
Seigo Nonaka
5b6347a6af Introduce setFallbackTypeface
setFallbackTypeface is returned by Builder.build() method when the
provided font is not loaded due to some reasons.
The fallback family is resolved with width/italic passed to Builder.

Bug: 36794225
Test: android.graphics.cts.TypefaceTest passes
Change-Id: I65e220aca823fd815a52437b11c8e6dc952de8e2
2017-04-13 10:12:27 -07:00
Narayan Kamath
aee1f41f0c Merge "Binder: Be forceful about a forceful exit." into oc-dev am: 6780828985
am: 6dd8b1f411

Change-Id: I17b285919cb5feaf9ba3c82c374146733335894a
2017-04-13 08:41:19 +00:00
Narayan Kamath
6780828985 Merge "Binder: Be forceful about a forceful exit." into oc-dev 2017-04-13 08:16:49 +00:00
Robert Carr
4684ba6c9e Merge "Stack APPLICATION_MEDIA_OVERLAY windows with relative layering." into oc-dev am: 9d5ac93cc3
am: b3871981f2

Change-Id: I2b413c9ba1d36fc8f8b3dffedf72331de82a4b40
2017-04-13 07:34:22 +00:00
TreeHugger Robot
9d5ac93cc3 Merge "Stack APPLICATION_MEDIA_OVERLAY windows with relative layering." into oc-dev 2017-04-13 07:12:55 +00:00
Robert Carr
af422a8c5b Stack APPLICATION_MEDIA_OVERLAY windows with relative layering.
See accompanying frameworks/native commit
 "SurfaceFlinger: Add parent-less relative layering" for a full explanation.

Test: Manual of bug repro steps. Plus tests for new SurfaceControl functionality included in frameworks/native.
Bug: 36693738
Change-Id: Ic54598117c1f44a206d33f03d0cc463fbef43fcc
2017-04-12 21:40:30 -07:00
Dianne Hackborn
24f3cd4ead Merge "Add new "work queue" feature to JobScheduler." into oc-dev am: 0a0a63c8b1
am: cba1893400

Change-Id: I67e7438a5563192391366683695c7fc4514a5bd6
2017-04-12 18:14:58 +00:00
Dianne Hackborn
0a0a63c8b1 Merge "Add new "work queue" feature to JobScheduler." into oc-dev 2017-04-12 17:55:56 +00:00
Narayan Kamath
d64abfcf93 Binder: Be forceful about a forceful exit.
We were previously using exit(1) when code servicing an IPC threw
any subclass of Error. That made it much harder to diagnose cases
where that happened because :

- exit runs global destructors, which might prove problematic (see
  linked bug).
- such exits are often due to bugs in application code (things like
  AssertionErrors being thrown) but aren't flagged as such by our
  infrastructure, or by humans for that matter.

To address both issues, use FatalError() so that the runtime can dump
more useful information to the logs before it aborts.

Test: manual
Bug: 36813403
Change-Id: I5826090229109dc7cb19f0c3571c609f990cd36a
2017-04-12 16:04:41 +01:00
Mark Salyzyn
d845459a36 Merge "jni: isLoggable: adapt to removal of property name size limit" am: cf39eea407 am: 5f98be7f11 am: 3da7584dc4
am: 097487aaaf

Change-Id: Ic482074150cf13499742bffc6049a89ee47d4172
2017-04-11 23:53:58 +00:00
Mark Salyzyn
097487aaaf Merge "jni: isLoggable: adapt to removal of property name size limit" am: cf39eea407 am: 5f98be7f11
am: 3da7584dc4

Change-Id: I2fd96c0c9cae8043bb5fabaa32b542b6965abcf7
2017-04-11 23:44:04 +00:00
Mark Salyzyn
3da7584dc4 Merge "jni: isLoggable: adapt to removal of property name size limit" am: cf39eea407
am: 5f98be7f11

Change-Id: I4997e6f310c08cd0cf094a04685859b2853f8a05
2017-04-11 23:33:22 +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
Mark Salyzyn
8143fa57ad jni: isLoggable: adapt to removal of property name size limit
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 07:31:40 -07:00
Mathieu Chartier
874c4cf56c 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

Change-Id: I2b6051eefb789ad88cfe6e033317583cd0e408b7
2017-04-10 19:09:07 -07:00
Emilian Peev
0b80b0f5bf Merge "DngCreator: Populate baseline exposure tag" into oc-dev am: b96891e0e3
am: db1de8dd64

Change-Id: I9a58f9597d48abde9241b7eb9517eb8f2d5d5b0c
2017-04-10 10:23:39 +00:00
TreeHugger Robot
b96891e0e3 Merge "DngCreator: Populate baseline exposure tag" into oc-dev 2017-04-10 10:04:05 +00:00
Romain Guy
0246a298f9 Merge "Color management, the missing pieces" into oc-dev am: 7dfa16c2ef
am: 3eafcb2d8b

Change-Id: I079d8d17982eecc022f2a53e1e6ca193dc7a3ace
2017-04-07 18:48:57 +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
Philip P. Moltmann
8f9ae8ec8e Merge "Change requestWait API according to request" into oc-dev am: ca687ac39a
am: a89137545b

Change-Id: I918d16f7dd81ec641b023f3a19a0c3aeab984e1d
2017-04-07 13:35:50 +00:00
TreeHugger Robot
ca687ac39a Merge "Change requestWait API according to request" into oc-dev 2017-04-07 13:19:12 +00:00
Steven Moreland
ea377a967f Merge "Use hwservicemanager getTransport." am: 562ed84ff4
am: 9912ec4ca6

Change-Id: I08c33de1eb82b6717b4a9d4d76211dd0fa638d52
2017-04-07 01:24:38 +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
Steven Moreland
ffea9cfa7e Merge "Use hwservicemanager getTransport." into oc-dev am: 610b55e8bc
am: 2df14a6aa1

Change-Id: I604bec017b538ef6f9ef1014dd3542512537fdc3
2017-04-06 23:23:56 +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
Steven Moreland
f7019c2e53 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

Merged-In: I8b0ca845251cd7cd156f3471cbd4b0ce17617be0
Change-Id: I8b0ca845251cd7cd156f3471cbd4b0ce17617be0
(cherry picked from commit f8202e464e09618c2b780d331541f32cc186598e)
2017-04-06 22:28:01 +00:00
Matt Sarett
7c9fb6076e Merge "Xform bitmaps to sRGB on SW and PDF canvases" into oc-dev am: c29dffed16
am: fd5d5425ee

Change-Id: If960ccd900ebc2b841c2f13ca4f25820a48a950f
2017-04-06 22:16:49 +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