Commit Graph

3955 Commits

Author SHA1 Message Date
TreeHugger Robot
4fea692b57 Merge "Camera: Track native metadata allocations" 2020-09-30 18:40:09 +00:00
Darryl Johnson
5d5f71ee3e Merge "Add support to InputManagerService for listening to lid switch events." 2020-09-29 22:07:51 +00:00
Darryl L Johnson
5d0d141178 Add support to InputManagerService for listening to lid switch events.
This extracts the notifyLidSwitchChanged() method from
WindowManagerCallbacks to allow services other than window manager to
receive lid switch notifications

Test: Manual, register callback and trigger lid switch
Bug: 159401801

Change-Id: I8967d4f2f5a9c56c2b7e0822224d1c0ea0f1bc06
2020-09-29 13:00:05 -07:00
TreeHugger Robot
832d1543fb Merge "Camera: Clarify SCALER_CROP_REGION usage" into rvc-dev am: 601e34fdd7 am: 7b0ce3eded
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12586676

Change-Id: If42cde5ad9cac034cad7fa675cc8f275fe50bdac
2020-09-29 17:32:42 +00:00
Kevin Chyn
2da7757314 Merge "Add and use ServiceProvider interface on fingerprint2.1" 2020-09-29 00:50:35 +00:00
Kevin Chyn
ed18d80855 Add and use ServiceProvider interface on fingerprint2.1
This interface should allow easy support for multiple HAL interfaces.
For example,

for (ServiceProvider p : providers) {
    if (p.containsSensor(sensorId)) {
        p.authenticate(sensorId, ...)
    }
}

or,

ServiceProvider provider = getProviderFor(sensorId)
if (provider != null) provider.authenticate(sensorId, ...)

This should reduce lots of repeated null checks, sensorId checks,
etc. and give FingerprintService a easy way to perform operations
on providers, given a sensorId.

Some of the FingerprintManager code is not sensorId-specific,
but we can update those in the future. Otherwise we have to
touch multiple projects (settings, etc). For now, all client-side
code assumes only a single sensor, so that's what we'll support
from FingerprintService.

Bug: 168843828
Test: No effect on existing devices
Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics

Change-Id: Icca5bc1e128afa1bb7b2c05227e87567e564e4cf
2020-09-25 18:41:41 -07:00
Jayant Chowdhary
bec0a90161 Merge "camera2: Remove partial result nodes for error frames." 2020-09-25 19:06:12 +00:00
Jayant Chowdhary
ff85804681 Merge "camera2: Improve code readability for FrameNumberTracker." 2020-09-25 18:56:41 +00:00
Treehugger Robot
3aed0006e3 Merge "Fix setType() return value for high angle sensor" am: 5a2d80de45 am: 89d18e94e4 am: 1e97e64bf2 am: a57b4b75c5 am: cec2a6d20f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436893

Change-Id: I8a247f6af7e2a018896e8c92aff441f269792292
2020-09-25 05:46:56 +00:00
Treehugger Robot
cec2a6d20f Merge "Fix setType() return value for high angle sensor" am: 5a2d80de45 am: 89d18e94e4 am: 1e97e64bf2 am: a57b4b75c5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436893

Change-Id: I4a6974cab2f97b5c9f2a550c99857788592f3db1
2020-09-25 05:24:31 +00:00
Treehugger Robot
a57b4b75c5 Merge "Fix setType() return value for high angle sensor" am: 5a2d80de45 am: 89d18e94e4 am: 1e97e64bf2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436893

Change-Id: If7aabccc5c08ec1d6e640a0b3361abaf96346f59
2020-09-24 21:52:53 +00:00
Treehugger Robot
1e97e64bf2 Merge "Fix setType() return value for high angle sensor" am: 5a2d80de45 am: 89d18e94e4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436893

Change-Id: I5d4a833884e9c732b9f96cd0ca6f72a889b89254
2020-09-24 21:24:53 +00:00
Jayant Chowdhary
91e64e2d3a camera2: Remove partial result nodes for error frames.
When there's an capture error reported for a frame, remove its nodes in
mPartialResults map node, since they'll not be used by clients of
FrameTracker. This should also reduce slow memory pressure build up
because of mPartialResult growth as and when there are error frames
which have some partial results as well.

Bug: 167944895

Test: GCA on Pixel2, constant mode changes don't show steady state increase in
      mPartialResults map size (Basic validity)

Change-Id: I6de585deb24039321310ddbd5dccd9119b25b23d
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-09-24 10:19:49 -07:00
Jayant Chowdhary
91f7bc0b3b camera2: Improve code readability for FrameNumberTracker.
Bug: 168713666

Test: builds
Test: GCA (basic validity)

Change-Id: Id0f9b5a9a6363f40daa9384ee5f01b47d36ad139
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-09-24 10:18:59 -07:00
Wang Han
fcf671890f Fix setType() return value for high angle sensor
Change-Id: I712fd77f8079fc17c45dcbc1c2fdf1be72d338f2
2020-09-24 13:16:18 +00:00
Kevin Chyn
c1ef4186c8 Match Framework and AIDL SensorProps
This should be enough to get started. We can plumb the remaining
AIDL properties through when we need them.

This is also fundamental to future TestApis

Test: No effect on existing fingerprint/face devices
Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics

Fixes: 169195610

Change-Id: I376567b4a59672b68d83c04738866b58334f8011
2020-09-23 12:22:20 -07:00
Charles Chen
853a7f4a36 Merge "Update language to comply with Android's inclusive language guidance" 2020-09-23 05:17:35 +00:00
Ytai Ben-Tsvi
da7c21ec51 Separate AIDL packages
This moves the android.media.audio.common, android.media.permission and
android.media.soundtrigger_middleware AIDL files to a their own
separate aidl_interface module for Java.

Previously, because of how the framework JAR is configured, those
files were automatically compiled into it and we had to disable Java
for this target, creating a discrepancy between C++ and Java, which
would require us to similarly diverge any dependent targets if we want
cross-language support.

As part of this change, we also had to switch from using the
FileDescriptor type to ParcelFileDescriptor, as this is the only type
supported outside of the framework JAR and is also the recommended
practice.

Test: Manual verification of basic soundtrigger functionality.
Change-Id: Ib65c19dd7c7f5433cfa527fa74bb61ac677f5cf5
2020-09-22 10:07:00 -07:00
Charles Chen
af5cb5e0ff Update language to comply with Android's inclusive language guidance
1. Rename HighRefreshRateBlacklist to HighRefreshRateDenylist
2. Remove crazy from DisplayContent

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 162536543
Test: atest HighRefreshRateDenylistTest RefreshRatePolicyTest

Change-Id: Id41a370916448173f5928c91b15219cbaf36f691
2020-09-22 19:11:54 +08:00
Ytai Ben-tsvi
189d6050da Merge changes from topic "new-perm"
* changes:
  Demote AlwaysOnHotwordDetector to SystemApi
  Sessionize VoiceInteractionManagerService
  Sessionize the SoundTriggerService layer.
  Use standard API in SoundTriggerTestApp
  Fix bug in dumpsys
  Require identity information in SoundTrigger.java
  Associate an originator identity to sessions
  Extract permission checking as a separate aspect
  Correctly handle HAL death
2020-09-21 19:07:04 +00:00
Marin Shalamanov
768cbbd32c Merge "Add TestApi to always select the app requested display mode" 2020-09-21 12:02:28 +00:00
Marin Shalamanov
97ba024fb0 Add TestApi to always select the app requested display mode
The added test API is used to ignore all votes in
DisplayModeDirector app votes. This way only the app
requested display mode will be picked. The API will be
used for testing app mode switch requests.

Bug: 159113268
Bug: 158316271
Test: m
Change-Id: I257636ae2a6ed74044e71e49a99024682c3a92c5
2020-09-18 13:32:54 +02:00
Shuzhen Wang
477c23ed89 Camera: Clarify SCALER_CROP_REGION usage
1. Document same SCALER_CROP_REGION may map to different aspect
ratio/output size for different sessions.
2. Remove the text in ZOOM_RATIO about using SCALER_CROP to change
aspect ratio.

Test: Build and read docs
Bug: 168493526
Change-Id: I405fe52d0e0a14e6a1cfbec169d33f20715fa4fb
2020-09-16 11:53:38 -07:00
Jeff Sharkey
4b5b0174d0 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570 am: 487d394296
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: Id01f468b43fd5b2aada78608010625b392c1b647
2020-09-15 21:01:48 +00:00
TreeHugger Robot
cf71d0c13a Merge "UDFPS on AOD" 2020-09-15 12:40:59 +00:00
Jeff Sharkey
487d394296 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I79488866c538bf9e76d0a6429e30262978f6fdab
2020-09-15 00:13:08 +00:00
Jeff Sharkey
da7478b570 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I9b79dbf3e9983523db11599d8ae289b05aabf80c
2020-09-14 23:42:34 +00:00
Emilian Peev
0173af0189 Add RAW_DEPTH10 image format
Add support for 10bit opaque and private RAW_DEPTH10 image format
which is similar to RAW_DEPTH.

Bug: 167250258
Test: Manual using camera application.
Change-Id: Ib2ee11570429d7a9a53e9dd6bc2042a1f5eaa760
2020-09-14 23:34:49 +00:00
Jeff Sharkey
741c0a78cc Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I7da537200efe31e803234bd1a0236843064186c8
2020-09-14 23:10:42 +00:00
chaviw
a701408ef0 Use buffer size for NativeAllocationRegistry instead of a fixed value
When calling NativeAllocationRegistry for HardwareBuffer, it needs the
correct size so GC knows how much memory has been allocated and when to
run. The current behavior uses a fixed size so it's likely the buffer is
actually consuming more memory than what GC thinks.

Test: atest ContentCapturePerfTests:LoginTest
Bug: 168149157
Bug: 168154840
Change-Id: Ife174478b2b76214b438de2757289a973330c979
2020-09-14 11:22:05 -07:00
Jeff Sharkey
705f6bec2d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e
2020-09-14 09:59:01 -06:00
Robert Snoeberger
96037a4695 UDFPS on AOD
This change establishes a connection between the AOD interrupt and the fingerprint sensor.

Bug: 165267247
Test: manual - enter device from AOD with fingerprint
Test: manual - On AOD, fail fingerprint auth, check that HBM turns off
Change-Id: Ia8ca9a145590d8b5629a584807e110ca3600b813
2020-09-14 11:00:27 -04:00
Kevin Chyn
a7808c36d8 Add maxTemplatesAllowed to Fingerprint/Face SensorProperties
Bug: 152242790
Bug: 162341940

Test: On fingerprint/face devices, enroll max number, notice
      enrollment shows the "max enrolled" string and prevents the
      user from enrolling additional templates.
Change-Id: I50c3b5810b0868d2ba9f1e923318585302b5776d
2020-09-11 01:35:11 -07:00
Ytai Ben-Tsvi
c79176dc64 Require identity information in SoundTrigger.java
Deprecate the way to attach to SoundTrigger that doesn't include
identity information. Plumb that up to the SoundTriggerService layer,
where it is temporarily provided in a backward-compatible way instead
of with the actual identity.

Change-Id: Icc2bf3b80300bd2b75c81d253986b4e1582737ca
Bug: 163865561
2020-09-10 13:27:08 -07:00
Ytai Ben-Tsvi
1a619f0389 Associate an originator identity to sessions
This change formalizes the permission enforcement patterns in the
sound trigger middleware layer. Every sound trigger session is
associated with an originator identity, established during attachment.
This identity is the used to authorize any operations performed on
this session, including data deliver via callbacks.

Temporarily, for b/w compatibility the existing SoundTrigger.java API
is preserved. Follow up changes will use the newer API, which requires
an identity to be provided.

Logging / dumpsys aspects have been modified to include the originator
identity associated with every call / session.

Change-Id: If83b151bd182af5a0dd98ff23dce252018de936b
Bug: 163865561
2020-09-10 13:27:07 -07:00
Emilian Peev
93463363bf Camera: Track native metadata allocations
Native camera metadata buffers can increase both in size
and count over prolonged periods of camera usage.
Register and track the native buffer allocation in the Java
VM to improve GC.

Bug: 168100424
Test: Camera CTS
Change-Id: I7a10c2f360307a6c1afeecde24dc42184106b872
2020-09-09 17:35:29 -07:00
Charles Chen
79d2d59d18 Merge "Mark some virtual display flags as TestApi" 2020-08-18 09:53:42 +00:00
Kevin Chyn
d5fa4d0e34 Add fields to SensorProperties
These will eventually come from the update HIDL interface

Bug: 164225738

Test: Builds
Change-Id: I041db93f8be46e24cf2de94e73b2994d3b95ab8d
2020-08-17 13:51:36 -07:00
Kevin Chyn
d1bb072d96 3/n: Move generateChallenge/resetLockout/revokeChallenge off critical path
1) Introduces BiometricDeferredQueue in LockSettings package to move
   slow operations off of the critical unlock path.

2) Changes generateChallenge to require sensorId. Callers to
   generateChallengeBlocking are currently not affected. Their path
   will need to be updated in the future.

3) Adds resetLockoutRequiresHardwareAuthToken for fingerprint sensor
   properties, since IBiometricsFingerprint@2.1 and its derivatives
   do not require the HAT yet

Fixes: 145978626

Test: atest com.android.server.biometrics
Test: Able to enroll after entering password
Test: Reset lockout on face device with single-profile-per-user
Test: Reset lockout on face device with managed profile + unified
      credential
Test: Reset lockout on face device with managed profile and separate
      credential (both owner and managed profile)
Test: Reset lockout for secondary user

Change-Id: Id4d7c39274a52ef61709161b6f24ec4f5d76720e
2020-08-16 11:49:27 -07:00
Kevin Chyn
dc1e4a97a6 Update Fingerprint21, add Fingerprint21UdfpsMock
1) It may not be practical in all cases to bump the HIDL to
   fingerprint2.3. So, give the framework a way to override this
   parameter.
2) Updates Fingerprint21 so the HAL callback is a static inner class.
   This A) allows subclasses to extend/override its functionality, and
   B) is necessary now because the callback needs to be created prior
   to Fingerprint21 construction (see 3 below)
3) Changes Fingerprint21 so that several objects are created before
   its constructor. This is necessary because Fingerprint21's
   constructor requires usage of the HAL, which implies the callback
   must be ready, since using the HAL requires a valid callback. In
   other words, the callback must be created before
   Fingerprint21UdfpsMock invokes Fingerprint21's constructor.
4) UDFPS accept must be touched within 10s of sensor auth succeeding
5) Shows debug messages on UdfpsOverlay since fingerprint sensor no
   longer gives feedback, etc

Bug: 163864182
Test: adb shell settings put secure ... (see defs in
      Fingerprint21UdfpsMock)
      adb shell stop && adb shell start
Change-Id: I07c3801024087f2e8ef10f125d20cb536aefbd91
2020-08-15 01:24:35 -07:00
Kevin Chyn
e44a86b2ed 2/n: Keep track of IBiometricsFace@1.0 challenge interruptions
IBiometricsFace@1.0 only supports a single in-flight challenge.
Currently, challenge owners paths are designed to never conflict
lifecycle-wise. However, to decouple resetLockout (which relies
on challenge) from the critical user unlock path, we need to
keep track of challenge interruptions, and notify clients when
an interruption starts/finishes.

This change only adds the infrastructure for tracking challenge
interruptions. A following change will make use of this.

Bug: 145978626
Test: Builds
Change-Id: I708312cafad29614e3708b5c606ae8a90704ac66
2020-08-13 13:20:00 -07:00
Charles Chen
f3afe5a579 Mark some virtual display flags as TestApi
to test their behaviors

Bug: 162627132
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest VirtualDisplayTest#testUntrustedSysDecorVirtualDisplay
Change-Id: I8e32cb42d93c59c015def0b0593038a0d961e3d4
2020-08-12 01:06:54 +00:00
Kevin Chyn
0bca835ebe Remove GenerateChallengeBlocking from FingerprintManager
Test: Builds
Bug: 162533680
Change-Id: I28c01bf977d32a5decd941c0449081577069d174
2020-08-07 12:17:30 -07:00
Kevin Chyn
cd52980d92 Change GenerateChallengeCallback from abstract class to interface
This allows us to use lamdas

Test: Builds
Bug: 161325267
Change-Id: I54e75d363969bbe74e346f2685b331d8743bb2c5
2020-08-07 12:17:30 -07:00
Kevin Chyn
cdf4b2868a 3/n: Remove challenge from verifyCredential
Decouples the remainder of challenges from LockSettingsService.
Clients that require Gatekeeper HATs that wrap challenges should
request the Gatekeeper Password, then request LockSettingsService
to verify(GatekeeperPassword, Challenge). If the challenge is
biometric-related, it must be generated after LockSettingsService
completes verifyCredential, since LockSettingsService internally
does generateChallenge/resetLockout/revokeChallenge.

Bug: 161765592
Test: CtsVerifier biometric portion
Test: Reset fingerprint/face lockout
Test: atest com.android.server.locksettings

Change-Id: Icb384194ce5007b264068e697113d55cbf94945b
2020-08-07 12:17:29 -07:00
Santos Cordon
f7ab406e32 Merge "Allow Power-button to temporarily ignore proximity sensor." into rvc-d1-dev am: fdc35a2491 am: 69603f319e am: 64bff5c814
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12282513

Change-Id: I144bd25307e616fdbaf7c233dcebd941ab36e8be
2020-08-07 10:13:28 +00:00
Santos Cordon
64bff5c814 Merge "Allow Power-button to temporarily ignore proximity sensor." into rvc-d1-dev am: fdc35a2491 am: 69603f319e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12282513

Change-Id: Ic968b220382b9b9e6bd919e55b63f92072bd3e02
2020-08-07 09:56:32 +00:00
Santos Cordon
69603f319e Merge "Allow Power-button to temporarily ignore proximity sensor." into rvc-d1-dev am: fdc35a2491
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12282513

Change-Id: I4913d33ac3e20e97ebdc524189e40f772f4dbbe3
2020-08-07 09:46:31 +00:00
TreeHugger Robot
e1125a95d7 Merge "Camera: Minor session state callback doc updates" 2020-08-06 23:33:29 +00:00
Emilian Peev
ae8e3fc03e Camera: Minor session state callback doc updates
Remove the "CameraDevice#createCaptureSession" reference.
The capture session create methods do not return session
instances.

Bug: 162988515
Test: make docs
Change-Id: Icc72c046b3ee337af8242ecb823cf8897e3eff5c
2020-08-06 13:26:18 -07:00