Compress buffer array into 1 byte per pixel instead of 4

The incoming buffer into ImageHashManager contains 4 bytes per pixel.
The pHash algorithm expects 1 byte per pixel. Since the image is in
grayscale, r,g,b should all be the same and we can ignore alpha.
Therefore, compress the 4 bytes into 1 byte.

Test: DisplayHashManagerTest
Test: ImageHashManager_test
Fixes: 191354046
Change-Id: I7e0f203df7eb4e04134f0dcb2bcc288701171ea1
3 files changed
tree: c54f8766f2e9e303882e9482257efdf3af9dcb1a
  1. apex/
  2. java/
  3. jni/
  4. native/
  5. .clang-format
  6. Android.bp
  7. AndroidManifest.xml
  8. lint-baseline.xml
  9. NOTICE
  10. OWNERS
  11. PREUPLOAD.cfg
  12. proguard.proguard
  13. README.md
  14. TEST_MAPPING
README.md

ExtServices module

Introduction

ExtServices is an updatable Mainline module that contains the logic used by Android framework components such as storage cache, autofill, textclassifier, package watchdog, notifications and notification ranking that run continually. For the new features or bug fixes of these platform defined services above or a new added platform service, it will provide more flexibility and benefits by updating ExtServices in a more frequent cycle than a platform release cycle.

Development (internal)

Before you start to develop on ExtServices, please read go/smart-os-extservices to get the guideline.

Other resources