Commit Graph

616969 Commits

Author SHA1 Message Date
Leon Scroggins III
cc60f0d733 Add a corpus of test files
Bug: 142252770
Bug: 169137236
Bug: 169139756
Test: This (fuzzer)

Attempt to cover the types supported by AImageDecoder:
- jpeg (progressive and baseline)
- png
- webp (animated and non-animated)
  - should maybe include lossless, too?
- gif
- ico (embedded png and bmp)
- bmp
- wbmp
- heif
- various dng formats

These files are either already checked into CTS or Skia.

Change-Id: Ib227639bf8da75f0e8e31e216bc6d1371e24cb75
2021-01-13 12:09:19 -05:00
Leon Scroggins III
140f5086ee AImageDecoder: Add a fuzz target
Bug: 142252770
Bug: 169137236
Bug: 169139756
Test: This (fuzzer)

Use the bytes to create an image file and decode it.

To run:

$ SANITIZE_TARGET=hwaddress make imagedecoder_fuzzer
$ adb root
$ adb sync data
$ adb shell /data/fuzz/arm64/imagedecoder_fuzzer/imagedecoder_fuzzer

Call startThreadPool() to support HEIF. Otherwise HEIF decodes may time
out on binder IPC calls. This is similar to a fix for skia_dm in
https://skia-review.googlesource.com/c/skia/+/108141.

Change-Id: I434730a74c5ff97437526065c41af3f54fae3335
2021-01-13 12:09:18 -05:00
Leon Scroggins III
c2ebc2bcf3 Implement AImageDecoder_setInternallyHandleDisposePrevious
Bug: 160984428
Test: I00682f201a52f894b0e1335c00c4368ce675a805

Also fix a bug caught by the new test. If the current frame is the first
in a series of one or more RestorePrevious frames, fPriorFrame should be
set to |currentFrame - 1|. Otherwise SkCodec will decode the required
frame. This is wasted work, since the prior frame should already be
prepared (either by AImageDecoder or by the client).

Change-Id: I1fb9f91dc66fd3121f187b9a91c15f625eb17f8d
2021-01-13 12:09:18 -05:00
Leon Scroggins III
946f8d41bc Implement AImageDecoder_resultToString
Bug: 160984428
Test: I118eaa99cd65b70dbfb2c8a7731c714564911a34
Change-Id: Iac444b04521056ae6f08cf7bbf12a79a80698c4c
2021-01-08 09:37:22 -05:00
Leon Scroggins III
0621313fe6 Implement FrameInfo methods on AImageDecoder
Bug: 160984428
Test: If47d475233f6b9973abf68029b63a610ff47cdae

- AImageDecoder_getFrameInfo
- AImageDecoderFrameInfo_create
- AImageDecoderFrameInfo_delete
- AImageDecoderFrameInfo_getDuration
- AImageDecoderFrameInfo_getFrameRect
- AImageDecoderFrameInfo_getDisposeOp
- AImageDecoderFrameInfo_getBlendOp
- AImageDecoderFrameInfo_hasAlphaWithinBounds

These allow querying for information specific to a single frame in an
encoded image.

Change-Id: I6ce5665e9c25aed23f99ce88290e520d68fcb60e
2021-01-06 13:53:20 -05:00
Leon Scroggins III
b26aebc325 Implement AImageDecoder _advanceFrame and _rewind
Bug: 160984428
Test: Iae7d274b69999c471fd5610c6ef4d148cca81bec

Disallow AImageDecoder_set* methods after the first frame, since
changing the settings would interfere with blending and caching for
kRestorePrevious frames.

Add a cache (and a state machine) for handling kRestorePrevious frames.

Follow-on to Ib93b0ced09fa3cca4a6681745406355c48158fae - support using
a matrix for unpremul + orientation (the orientation was previously
handled by a matrix internally in SkAndroidCodec).

Change-Id: I7c32ede013fa83f1fe95c35778c33278ca6fe6a3
2021-01-05 12:37:47 -05:00
Leon Scroggins III
139145be80 Handle EXIF orientation in hwui/ImageDecoder
Bug: 160984428
Test: AImageDecoderTest#testRespectOrientation
       ImageDecoderTest#testRespectOrientation
      Ieda439910ae52e609f0710d424503616d99ae5c7
      I23caef26b4c82173c758dd0ce7fb6f04e4154588
      I345a13d20776a007052d32e74fa42865b42f726d

It is possible to create an animated image with an exif orientation.
Using kRespect, there is no clean way to handle the orientation plus
compositing frames. Switch ImageDecoder to use kIgnore (the default).

Depends on a change in Skia (https://review.skia.org/344762) to make
SkAnimatedImage handle the orientation even with kIgnore.

Change-Id: Ib93b0ced09fa3cca4a6681745406355c48158fae
2021-01-05 12:37:47 -05:00
TreeHugger Robot
31d0862eca Merge "Fix FastDataOutput performance bug." 2021-01-05 17:23:17 +00:00
TreeHugger Robot
b26f201709 Merge "Disable StrictMode VM Policy check." 2021-01-05 16:42:13 +00:00
TreeHugger Robot
583b2e5098 Merge "Keyguard: Fix missing IME, and apply better animations" 2021-01-05 16:07:02 +00:00
Jin Seok Park
bb615929ba Merge "Rename and improve remote volume controller related methods" 2021-01-05 15:51:48 +00:00
Michal Olech
aaf67fa149 Merge "[CEC Configuration] Add listener support to the HdmiCecConfig" 2021-01-05 15:51:17 +00:00
Marvin Ramin
42e22b3f5c [CEC Configuration] Add listener support to the HdmiCecConfig
Bug: 174992882
Bug: 172905515
Test: make -j; atest com.android.server.hdmi

This reverts commit fb66634ff2.

Change-Id: Ie0c24e28335cd682fe76aa2f2f31995e4b62485c
2021-01-05 16:47:37 +01:00
TreeHugger Robot
b93cb1be81 Merge "Update Column value types for BaseColumn." 2021-01-05 15:34:47 +00:00
TreeHugger Robot
246e924066 Merge "Simplify RealLocationTimeZoneProviderProxy" 2021-01-05 14:33:29 +00:00
Treehugger Robot
a0b0cf2b51 Merge "Add an OWNERS file for location tz detection code" am: 281c972290 am: a05fbde7c7 am: cbe8c85595
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535151

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie733358dce8cb72046367c07da7c0f1129c7e40a
2021-01-05 14:06:22 +00:00
Matt Pietal
8c8cd58f36 Merge "Password bouncer - Go back on first gesture" 2021-01-05 13:55:23 +00:00
Matt Pietal
3bbc280d70 Keyguard: Fix missing IME, and apply better animations
Password bouncer: animate the text field alpha and y positioning along
with the IME reveal. Also fix the ordering of focus events to ensure
the soft keyboard appears.

Fixes: 174020436
Fixes: 175243820
Test: SystemUITests
Change-Id: I62898870f57da1cd5b3da6bc4a2cfb23fe95097f
2021-01-05 08:51:31 -05:00
TreeHugger Robot
062abd62db Merge "onDrawImageNine is no longer used" 2021-01-05 13:51:18 +00:00
Treehugger Robot
cbe8c85595 Merge "Add an OWNERS file for location tz detection code" am: 281c972290 am: a05fbde7c7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535151

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5c1c0f2642cc66716290b5943aad9c88ad91ba5c
2021-01-05 13:44:10 +00:00
Treehugger Robot
a05fbde7c7 Merge "Add an OWNERS file for location tz detection code" am: 281c972290
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535151

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib2158d2390637f56011cd735ec7b9bb4261a7a18
2021-01-05 12:55:44 +00:00
Corina Grigoras
59ac27f952 [automerger skipped] Merge "Log at debug level when things are OK" am: d09e92e5d2 am: e2a3315a12 am: 21d1502c84 -s ours
am skip reason: Change-Id I027250bcae132d9be9c16690478adb41467bfec4 with SHA-1 ee5408b38d is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1538901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0a43d723ebee4437a22dd551f897a3ecef921601
2021-01-05 12:54:49 +00:00
Corina Grigoras
21d1502c84 Merge "Log at debug level when things are OK" am: d09e92e5d2 am: e2a3315a12
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1538901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7f158ad9304559fb7c004aa11ff49ecf04c4a3c8
2021-01-05 12:21:34 +00:00
Treehugger Robot
281c972290 Merge "Add an OWNERS file for location tz detection code" 2021-01-05 12:19:11 +00:00
Corina Grigoras
e2a3315a12 Merge "Log at debug level when things are OK" am: d09e92e5d2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1538901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If12ca8c96c44607e003f5cc1150d251a422533a8
2021-01-05 11:50:41 +00:00
Corina Grigoras
d09e92e5d2 Merge "Log at debug level when things are OK" 2021-01-05 11:11:54 +00:00
Corina Grigoras
bf2043a138 Log at debug level when things are OK
StorageManagerService: android.os.ServiceSpecificException is expected if the user has not unlocked the device.

Bug: 151077642
Bug: 174442693
Change-Id: I07b06cd6f7cff4529cba46aa4e3dcf7b0ee8dfa5
Test: No
Merged-In: I027250bcae132d9be9c16690478adb41467bfec4
2021-01-05 11:09:10 +00:00
Rafal Slawik
fc01550355 Merge "Pull CpuCyclesPerUidCluster" 2021-01-05 09:52:25 +00:00
Yo Chiang
34487c2d69 Merge "Update OWNERS file for DynamicSystemInstallationService related files" am: d15cbc37d5 am: da54c495b6 am: df076f3e17
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537268

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3af03c3c874595f8e0e2006bff0012ada23e3631
2021-01-05 05:07:27 +00:00
Yo Chiang
df076f3e17 Merge "Update OWNERS file for DynamicSystemInstallationService related files" am: d15cbc37d5 am: da54c495b6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537268

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I88527e0b97e6a3705935bde0e89760435e0bb46b
2021-01-05 04:42:37 +00:00
Jeff Sharkey
179ed2b7d8 Fix FastDataOutput performance bug.
The underlying CharsetUtils methods accept the total length of the
underlying byte[] array; the bug in the existing logic was attempting
to pass the remaining length, which caused much more aggressive
one-off buffer allocation when not needed.

Bug: 171832118
Test: atest FrameworksCoreTests:com.android.internal.util.FastDataTest
Test: atest FrameworksCoreTests:android.util.CharsetUtilsTest
Test: atest FrameworksCoreTests:android.util.XmlTest
Test: atest FrameworksCoreTests:android.util.BinaryXmlTest
Change-Id: If257f75446d2f99313eecc3c11822d770f920687
2021-01-04 21:42:21 -07:00
Yo Chiang
da54c495b6 Merge "Update OWNERS file for DynamicSystemInstallationService related files" am: d15cbc37d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537268

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6ab9e39297fffdffd66268c014d7390d91d936da
2021-01-05 04:21:07 +00:00
Yo Chiang
d15cbc37d5 Merge "Update OWNERS file for DynamicSystemInstallationService related files" 2021-01-05 03:34:39 +00:00
Jin Seok Park
2dc180ad73 Rename and improve remote volume controller related methods
1. Renamed "RemoteVolumeController" to "RemoteSession" since it
better encapsulates the callback methods.
2. Added Javadoc for new parameters in
registerRemoteSessionCallback.
3. Renamed onSessionChanged to onDefaultRemoteSessionChanged and
revised documentation,
4. Added documentation for what the flags in
RemoteSessionCallback#onVolumeChanged are for.

Bug: 173657280
Test: N/A
Change-Id: I8f0d58f732df8117888bc66a58f47fc33db2339e
2021-01-05 10:30:04 +09:00
Sungsoo Lim
465e654ae4 Merge "Revert "Get bluetooth A2DP status directly from BT"" 2021-01-05 00:42:54 +00:00
Mike Reed
4efe0bed46 onDrawImageNine is no longer used
nine-patch draws now route through onDrawImageLattice, and canvas no
longer ever calls onDrawImageNine.

Test: make

Change-Id: Ie1d5b0c72690a4986e97efa1feeb736ef704a079
2021-01-04 02:08:15 +00:00
TreeHugger Robot
b4766c2013 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into stage-aosp-master am: 26a05032b8 -s ours am: 3078660c4e -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13283069

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0d275c5db67d720f36e05c2457ad28ad0b4e79f5
2021-01-04 01:52:17 +00:00
TreeHugger Robot
2c1a33123a [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into stage-aosp-master am: 6d64f4aee5 -s ours am: 239056b86b -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13281573

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie9676084610905f496454bfb0efc916936c4a721
2021-01-04 01:52:04 +00:00
Automerger Merge Worker
907611f4b5 Merge "[automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev am: 6bcc71b136 -s ours" into rvc-qpr-dev-plus-aosp am: 0aa4815a28 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13281543

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id9f1b3a97d059579558ac1f4ed0c29821b20e0d0
2021-01-04 01:51:50 +00:00
TreeHugger Robot
157a9484fa [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into stage-aosp-master am: 732d874fb8 -s ours am: b6f4c30107 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13283087

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3c637bb7b145f31ac54c45e5cc538860e24dee32
2021-01-04 01:51:40 +00:00
TreeHugger Robot
d568c6cf47 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev am: 3807812a22 -s ours am: 0a49843f7f -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13283387

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I75ab59e4017180319e8b0921d8bd831e74965558
2021-01-04 01:51:19 +00:00
TreeHugger Robot
3078660c4e [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into stage-aosp-master am: 26a05032b8 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13283069

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bf82035631ccff6d5a6144d6d9b1d203b076851
2021-01-04 01:37:09 +00:00
TreeHugger Robot
239056b86b [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into stage-aosp-master am: 6d64f4aee5 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13281573

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9b9b7199fc470494b735d79f203ca7bb76a0a080
2021-01-04 01:36:51 +00:00
Automerger Merge Worker
0aa4815a28 Merge "[automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev am: 6bcc71b136 -s ours" into rvc-qpr-dev-plus-aosp 2021-01-04 01:36:30 +00:00
TreeHugger Robot
b6f4c30107 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into stage-aosp-master am: 732d874fb8 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13283087

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iacae439d17fab13ecf18a1d1bdd16e6d20f34959
2021-01-04 01:36:08 +00:00
TreeHugger Robot
3056b88886 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev am: 6bcc71b136 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13281543

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I74316d86c4f1798bd41e8190119fad65e1f45559
2021-01-04 01:36:06 +00:00
TreeHugger Robot
0a49843f7f [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev am: 3807812a22 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13283387

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I17d000e74faab590bc39a902845a0f98437f41a4
2021-01-04 01:35:10 +00:00
TreeHugger Robot
6bcc71b136 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2021-01-04 01:15:26 +00:00
TreeHugger Robot
3807812a22 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2021-01-04 01:13:42 +00:00
TreeHugger Robot
26a05032b8 Merge "Import translations. DO NOT MERGE ANYWHERE" into stage-aosp-master 2021-01-04 01:03:23 +00:00