Commit Graph

3902 Commits

Author SHA1 Message Date
Nathalie Le Clair
6117d617e9 Merge "CEC Standby messages when going to sleep" 2020-07-29 08:07:46 +00:00
TreeHugger Robot
8b690436b2 Merge "Update mandatory concurrent stream docs to specify support for lower resolutions." into rvc-dev am: 83578eaa95 am: 8d514c97e4 am: efe49adcec am: 01b5557a64
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12230970

Change-Id: Ifc10117c5866bd550f0d21cb208fff14eb29595a
2020-07-28 02:49:04 +00:00
TreeHugger Robot
01b5557a64 Merge "Update mandatory concurrent stream docs to specify support for lower resolutions." into rvc-dev am: 83578eaa95 am: 8d514c97e4 am: efe49adcec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12230970

Change-Id: Ib5a05b8f8071437badb2f58fe97cf72c57a1056c
2020-07-28 02:34:05 +00:00
TreeHugger Robot
efe49adcec Merge "Update mandatory concurrent stream docs to specify support for lower resolutions." into rvc-dev am: 83578eaa95 am: 8d514c97e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12230970

Change-Id: Ic36c15cc74651f8c5b55d1ce57f79ec3baa6126f
2020-07-28 02:20:56 +00:00
TreeHugger Robot
83578eaa95 Merge "Update mandatory concurrent stream docs to specify support for lower resolutions." into rvc-dev 2020-07-28 01:47:32 +00:00
Jayant Chowdhary
d537ce04fb Update mandatory concurrent stream docs to specify support for lower resolutions.
Bug: 162110784

Test: make doc-comment-check-docs

Change-Id: I8a2677df320f8f496b185fd80234f04dd9eed97f
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-07-27 17:18:12 -07:00
TreeHugger Robot
7452bc3021 Merge "Make IHdmiVendorCommandListener oneway" 2020-07-27 08:31:52 +00:00
Nathalie Le Clair
348f498252 CEC Standby messages when going to sleep
Setting the target audience of the CEC <Standby> message when going to sleep

Before this change: sent to the TV only
After this change: a setting initialized by a system property determines whether to send it to the TV only (default), all devices or not at all

Test: atest HdmiCecLocalDevicePlaybackTest and manually tested that system property takes effect.

Bug: 161205654
Change-Id: I3a3ba3d40acbb4f6bf65e402c446b0683500b4dc
2020-07-24 14:56:56 +02:00
TreeHugger Robot
b29338a9f9 Merge "InputManager: Support amplitude control for InputDeviceVibrator" 2020-07-21 20:39:15 +00:00
Marvin Ramin
5bc2540a80 Make IHdmiVendorCommandListener oneway
Bug: 161757808
Test: make
Change-Id: If2f2d084a6781348bba936be5759d44ecff08dc7
2020-07-21 10:03:26 +02:00
Nathaniel R. Lewis
b88c93ef01 InputManager: Support amplitude control for InputDeviceVibrator
Add support for sending vibration amplitude(s) from OneShot and
Waveform VibrationEffects to the native layer to support variable
amplitude vibration motors in input devices such as gamepads.

Fix bug with vibration API. In N, the VibrationEffect method which
takes both timings and amplitudes states that each timing/amplitude
pair makes the vibration last for the specified duration with the
specified amplitude, 0 meaning the motor is off. If this method
is used with an input device vibrator, it turns off for every even
numbered element, regardless of the amplitude value. The method
which takes only timing values works as expected.

Test: Connect a gamepad whose driver supports FF_RUMBLE, find it
      with the android input framework, and do something like this:

      // waveform where rumble magnitude doubles every 2 seconds
      VibrationEffect effect = VibrationEffect.createWaveform(
              new long[] { 2000L, 2000L, 2000L, 2000L, 2000L },
              new int[] { 16, 32, 64, 128, 255 },
              -1);
      inputDevice.getVibrator().vibrate(effect);

Bug: 136215622
Bug: 38511270
Change-Id: I06afd374e30d63b49aa79fa2b68e2a236b5347b2
2020-07-19 11:02:24 -07:00
Kevin Chyn
c486219bcb Update Fingerprint/Face getSensorProperties
For each modality, updates/adds getSensorProperties() to return a list
of all sensors, containing their sensorId and other properties.

Bug: 160024833
Bug: 145978626

Test: atest KeyguardUpdateMonitorTest
Test: enroll/auth on fingerprint/face devices

Change-Id: I9adc4798183f53881f3592a8e72e6bd3595fbf1e
2020-07-17 18:59:30 -07:00
Kevin Chyn
91d593209e Merge changes I9ded8efd,Ic26e47c1 into rvc-qpr-dev am: 09ba528a9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12166802

Change-Id: I0c18e32b9258e2c0a9e42b4cd2bfae1b718a736e
2020-07-16 19:09:12 +00:00
Kevin Chyn
d24084e95a Update authentication when encrypted or lockout
Fingerprint authentication should not expose accept/reject/lockout
when the user is encrypted or locked out. This is possible with
IBiometricsFingerprint@2.1 since lockout is controlled by the framework.

IBiometricsFace@1.0 does not support this since lockout is controlled
in the HAL (or lower).

Bug: 79776455

Test: On fingerprint device, during encrypted or lockdown, any finger
      works, lockout never occurs
Test: BiometricPromptDemo, normal path is run (e.g. incorrect fingers
      are rejected)
Test: Test no effect on face device
Test: atest KeyguardUpdateMonitorTest

Change-Id: I9ded8efd80d4f8b92ce054262e721853703c6437
Merged-In: I6c9717d1f8ed3e844b3d92727396e2ce2e7fd94f
2020-07-15 21:59:10 -07:00
Kevin Chyn
1f9cce1b37 Update authentication when encrypted or lockout
Fingerprint authentication should not expose accept/reject/lockout
when the user is encrypted or locked out. This is possible with
IBiometricsFingerprint@2.1 since lockout is controlled by the framework.

IBiometricsFace@1.0 does not support this since lockout is controlled
in the HAL (or lower). Adds enough plumbing on SysUI so that it will
work once the HAL supports it.

Introduces FingerprintDetectClient, which treats HAL accept/reject as
the same, and does not increase the framework's lockout counter.

Introduces FingerprintManager/FaceManager#getSensorProperties so callers
can determine features before invoking certain code paths, such as
finger/face detect.

Bug: 79776455

Test: On fingerprint device, during encrypted or lockdown, any finger
      works, lockout never occurs
Test: Test no effect on face device
Test: atest KeyguardUpdateMonitorTest

Change-Id: I6c9717d1f8ed3e844b3d92727396e2ce2e7fd94f
2020-07-15 17:24:35 -07:00
Kevin Chyn
4f0e506024 Fix AuthController crash
1) Provide udfps aidl methods in FingerprintManager to reduce
   boilerplate code in SystemUI
2) Add null check in FingerprintService#isHardwareDetected, add
   isHardwareDetected check to AuthController

Fixes: 161199262
Fixes: 161196229
Bug: 161201849

Test: Boot aosp_blueline-eng

Change-Id: I6c037f90691e4da2f88419c6f80994e8ae1565b0
2020-07-14 19:02:39 -07:00
felipeal
d6fe1304bf Add null check in FaceService#isHardwareDetected
Similar to I6c037f90691e4da2f88419c6f80994e8ae1565b0.
All clients (keyguard, settings) should already be checking isHardwareDetected()
before doing any face-related operation.

Test: load aosp_flame-eng, sysui does not crash
Fixes: 161232319

Change-Id: I2d394114073ef3df766e04430190e3430e7d1579
2020-07-14 15:18:05 -07:00
Eino-Ville Talvala
79d4a4c181 Merge "Camera: Remove all camera HALv1 code" 2020-07-13 17:12:42 +00:00
Ilya Matyukhin
1682b8f6fb Use UDFPS overlay for UDFPS enrollment and authentication
Bug: 158135499
Test: build
Change-Id: If18a1943d713703107b79b0d83ee362a61f20a0b
2020-07-10 15:35:43 -07:00
Kevin Chyn
a5f7ffcaa1 Merge changes from topic "clientmonitor-cleanup6"
* changes:
  31/n: Move Fingerprint2.1 into a wrapper with its own scheduler
  30/n: Combine ErrorConsumer and Cancellable
2020-07-10 20:41:53 +00:00
Eino-Ville Talvala
7208d0af87 Camera: Remove all camera HALv1 code
- Remove legacy wrapper implementing camera2 API on HALv1
  - Move JNI utility code into SurfaceUtils
- Remove openLegacy path, which allowed HALv1 behavior on HALv3 devices
- Remove relevant tests

Test: atest CtsCameraTestCases
Bug: 136024295
Change-Id: I49ad89bee5c4fdc09e288597821163c81494476f
2020-07-10 11:42:59 -07:00
Kevin Chyn
ab1dcf5e79 31/n: Move Fingerprint2.1 into a wrapper with its own scheduler
This is a pretty big change since it basically allows/requires us to
have FingerprintService not extend from BiometricServiceBase anymore

Bug: 157790417
Bug: 158481661

1) Move Fingerprint2.1-specific code into wrapper class. This will
   A) Make it obvious where global dependencies still exist, and
   B) Make room for new HIDLs
2) Sensor-ID is creeping in. Eventually there will be Manager-level
   APIs for platform code to query functionality. Most likely all
   IFingerprintService/IFaceService interfaces will have sensorId
   as a parameter soon
3) Added Udfps interface and UdfpsHelper
4) FingerprintService no longer extends from BiometricServiceBase.
   BiometricServiceBase will be removed soon. A lot of permission
   checking is fingerprint-specific, since face operations all
   require internal permission. Thus, moved canUseBiometric into
   FingerprintService
5) Updated fingerprint retry logic in KeyguardUpdateMonitor. The
   retry should keep going if isHardwareDetected()==false. Also
   increased the retry counter, seems like HAL reload time has
   increased.

Test: enroll, auth (settings), auth (keyguard), auth (BiometricPrompt),
      rename, remove
Test: atest com.android.server.biometrics
Test: atest KeyguardUpdateMonitorTest
Test: Reset lockout
Test: atest AccessibilityFingerprintGestureTest
Test: Fingerprint stack recovers after HAL death, e.g.
      1) Go to keyguard
      2) adb shell ps | grep -i fingerprint
      3) adb shell killall -9 android.hardware.biometrics...
      4) fingerprint auth resumes after HAL reloads
Test: CtsVerifier
Test: adb shell dumpsys fingerprint
Test: Modify settings to not cancel auth when onPause, notice
      task stack listener stopping settings auth
Test: Invoke assistant on keyguard, auth continues
Test: No effect on face auth devices (enroll, auth on keyguard,
      BiometricPrompt)

Change-Id: Iffbdd841c093fe612e664195dcf79319d1d444ab
2020-07-09 23:56:33 -07:00
Kevin Chyn
36f539e547 Merge changes from topic "clientmonitor-cleanup5"
* changes:
  29/n: Fix EnrollClient onClientFinished
  28/n: Move authenticatorId update to RemovalClient
  27/n: Slightly update/fix ClientMonitor.FinishCallback
  26/n: Move ClientActiveCallbacks to its own file
  25/n: Make InternalCleanupClient generics/templates more correct
  24/n: Use lazy retrieval for HAL
  23/n: Move LockoutResetCallback tracking to its own class
2020-07-08 02:09:51 +00:00
Kevin Chyn
71520ed217 23/n: Move LockoutResetCallback tracking to its own class
Decouples shared code in BiometricServiceBase. The code that notifies
clients (keyguard) of lockout reset will eventually also send the
sensorId that lockout was reset for. However, that will depend on
subsequent changes.

Bug: 157790417

Test: adb shell killall -9 com.android.systemui, see callback removed
Test: Lockout fingerprint, wait 30s, keyguard is notified and starts
      authenticating again
Change-Id: I791ce6c146500f81638a56587e4e90d8f1933f5e
2020-07-07 14:57:16 -07:00
TreeHugger Robot
dadc0c5a72 Merge "Broadcast events for AOA handshake" 2020-07-07 07:48:29 +00:00
Kevin Chyn
021755a12c Merge changes from topic "clientmonitor-cleanup4"
* changes:
  22/n: Remove "flags" parameter from authenticate and enroll
  21/n: Clean up ClientMonitor parameters
  20/n: Update infrastructure to support upcoming scheduler
  19/n: Remove dead code
  18/n: Make more HAL operations ClientMonitors
2020-07-02 02:57:47 +00:00
Kevin Chyn
fc7dc9b45b 22/n: Remove "flags" parameter from authenticate and enroll
Not used and ambiguous. Also fixed naming for hardwareAuthToken param
in areas that were previously missed.

Bug: 157790417

Test: Builds
Change-Id: I55f73d519cd3c69c4c03b6408588e793c8553869
2020-07-01 14:11:37 -07:00
Kevin Chyn
dbe6787699 20/n: Update infrastructure to support upcoming scheduler
1) Templates ClientMonitor<T>, so that redundant code can be removed
2) Moves ClientMonitor and subclass's HAL reference and FinishCallback
   to be initialized in ClientMonitor#start. This allows the logic
   to be centralied in the upcoming scheduler (e.g. HAL availability
   check, having the scheduler use an internal FinishCallback, etc)
3) Moved HAL null-checking to a centralized location. As such, also
   added abstract ClientMonitor#unableToStart method, which is invoked
   when the ClientMonitor can't/shouldn't be started. Each subclass
   handles this case individually based on its own API lifecycle
4) Added BiometricAuthenticator interface to query current lockout mode.
   Looks like BiometricService was relying on receiving onError(lockout)
   being sent before onReadyForAuthentication. However, to clean up the
   FingerprintService/FaceService code and move client lifecycle into
   ClientMonitor, we shouldn't rely on this ordering.

Note that this change also makes BiometricServiceBase templated solely
for the purpose of getting a reference to the biometric HAL. This is
a little ugly. This is temporary and will only exist during the middle
of the refactor. By the end of the refactor, BiometricServiceBase will
be gone/deleted, and we should end up with a Scheduler<T> :)

Bug: 157790417

Test: Enroll, authenticate, resetLockout, set/getFeature in settings,
      internal cleanup (modifying fingerprint/face utils), for
      fingerprint and face, and for multi-user/profile
Test: Lockout user, then request authenticate again. Notice no vibration,
      no UI, and correct error result
Test: Lockout user, then request auth with biometric|credential.
      Credential UI is shown immediately.
Test: Lockout user, then check canAuthenticate. Returns success, since
      the hardware is OK, just the user was rejected too many times.
      Note that this is functionally the same as before, since the
      sensor would have been considered eligible.
Test: atest com.android.server.biometrics

Change-Id: I420002d2b54a4ab530d0698fcc612ee7c770d5ff
2020-07-01 14:10:53 -07:00
TreeHugger Robot
62a3bb4b10 Merge "CEC: Add @CallbackExecutor to HdmiControlManager Listener methods" 2020-07-01 15:56:23 +00:00
Michal Olech
eacebb90f6 CEC: Add @CallbackExecutor to HdmiControlManager Listener methods
API guidelines recommend adding ability to set the executor

Bug: 156046799
Test: atest HdmiControlServiceTest
Change-Id: I1f6dde6efc498a112ac7da2c61c36fcc2afa6638
2020-07-01 15:28:41 +02:00
rickyniu
e62f703e4c Broadcast events for AOA handshake
Broadcast intents on below control request

Log both the request and response for 51 control request (Get Protocol)
Log both the request and response for 52 control request (Identifying information)
Log both the request and response for 53 control request (Start accessory mode)

bug: 139264039

Test: Check the broadcast intent could be received
Change-Id: I7c8db41ee05398200e235cf10dde96ba89b306e8
2020-07-01 21:19:09 +08:00
TreeHugger Robot
d2ed5efd3b Merge changes I3fb8291e,I099550a4,If04528c0,I31ee7bc9
* changes:
  Implement a bare-bones UDFPS overlay
  Add interfaces for controlling the UDFPS overlay
  Add isUdfps to FingerprintService
  Add onFingerDown/onFingerUp to FingerprintService
2020-07-01 06:05:18 +00:00
Kevin Chyn
da27daf8c4 18/n: Make more HAL operations ClientMonitors
1) SetFeature
2) GetFeature
3) ResetLockout

The following will be done in a separate CL
4) SetActiveUser
5) GetAuthenticatorId

Test: Enroll face, go to face settings, toggle attention setting.
      Setting is persisted in the HAL and retrieved correctly to
      Settings.
Test: Fingerprint/Face lockout, resetLockout
Test: Multi-user / Multi-profile enroll, auth, resetLockout

Bug: 157790417
Change-Id: I063fcc73f0129a1d31214f30928f32708e14e2ff
2020-06-30 12:51:11 -07:00
Kevin Chyn
225758fc13 Merge changes from topic "clientmonitor-cleanup3"
* changes:
  Clear identity when checking BiometricService#isStrongBiometric()
  17/n: Make generateChallenge/revokeChallenge ClientMonitors
  16/n: Introduce ClientMonitor#FinishCallback
  15/n: Combine EnumerateClient into InternalEnumerateClient
  14/n: Remove the use of groupId
  13/n: Remove the use of DaemonWrapper
2020-06-30 00:41:05 +00:00
Ilya Matyukhin
1ba66726a4 Add interfaces for controlling the UDFPS overlay
Bug: 158135499
Test: build
Change-Id: I099550a455c9e49741bb9f61eea11b98574151bc
2020-06-29 17:37:09 -07:00
Ilya Matyukhin
f776ee0880 Add isUdfps to FingerprintService
Bug: 158135499
Test: build
Change-Id: If04528c08a7d855aff9bb61d6cf241c26a049aba
2020-06-29 17:37:09 -07:00
Ilya Matyukhin
a36dcececf Add onFingerDown/onFingerUp to FingerprintService
Bug: 158135499
Test: build
Change-Id: I31ee7bc9921085b85149b2691ff6253b64fc7b78
2020-06-29 17:37:02 -07:00
Kevin Chyn
706e17d7dc 17/n: Make generateChallenge/revokeChallenge ClientMonitors
As part of the move to make all HAL operations a ClientMonitor,
this change makes generateChallenge return the challenge via a
callback.

Added generateChallengeBlocking() so that existing synchronous clients
can continue to work with minimal changes (only renaming is necessary),
and so that it's explicit that the call may take some time (up to
hundreds of milliseconds on some devices).

1) LockSettingsService#resetLockout path
2) Fingerprint/Face enroll path

Bug: 157790417
Test: Enroll on fingerprint/face devices
Test: ResetLockout on fingerprint/face devices

Change-Id: I99efc1c72c8ac994c56d6d2deaf3e0131e5b2dac
2020-06-29 15:10:10 -07:00
Curtis Belmonte
6c1df2c9a1 Merge "Update biometric constant docs from tier to class" into rvc-dev am: 29d2bf129a am: 9ffc191719 am: 94adcbf311 am: 371cd4bd3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11840347

Change-Id: I1db34cf0f13b02d78ca8f9684aef61ac674c4359
2020-06-27 03:02:46 +00:00
Curtis Belmonte
9ffc191719 Merge "Update biometric constant docs from tier to class" into rvc-dev am: 29d2bf129a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11840347

Change-Id: Ie2ffff68e4ab98267dfb00dbf5ab12331d4c402a
2020-06-26 20:28:32 +00:00
Curtis Belmonte
29d2bf129a Merge "Update biometric constant docs from tier to class" into rvc-dev 2020-06-26 20:10:50 +00:00
Treehugger Robot
3e42674367 Merge "Update GeomagneticField coefficients to WMM-2020" am: cbbd953695 am: d74a6fe6bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1247703

Change-Id: I4407e02dbfffb9c3ca56fde50581181785b3335d
2020-06-26 18:10:03 +00:00
karthik bharadwaj
e31036100d Remove a newline to prevent a merge conflict
Upstream AOSP change doesn't have a newline at the location
this change addresses, causing a merge conflict

Test: Build, presubmit
Bug: 159464174
Merged-In: I957dfe35aacc3e397611d8ab0b9ad19a1130a3dd
Change-Id: I7614d420ad55129b04e0dfa9310e39d715ed2da7
2020-06-25 11:22:41 -07:00
Cory Hockenbury
793dad3164 Update GeomagneticField coefficients to WMM-2020
Update the GeomagneticField coefficients according to the World
Magnetic Model 2020-2025 values and specify the base time in UTC since
calls to System.currentTimeMillis() will return a UTC based time.

Signed-off-by: Cory Hockenbury <chockenbury@gmail.com>
Change-Id: I7614d420ad55129b04e0dfa9310e39d715ed2da7
2020-06-25 14:19:20 +00:00
Kevin Chyn
870b4863d5 14/n: Remove the use of groupId
GroupId was never used. FingerprintService#enroll sets groupId to
always be the same as userId. This change removes it from (almost)
everywhere.

We should update BiometricUtils and subclasses so that new HIDLs
do not take space for groupId. Since the framework persists the
info and we do not want to deal with database migration, let's
leave it there until the devices which shipped with groupId are
EOL.

Bug: 157790417

Test: Enroll fingerprints with a build before this change. Update
      to a build with this change - still able to authenticate, rename,
      remove previously enrolled fingerprints
Change-Id: I21391f5ffb71b27d7f9d4cfd4e6253b6001276dc
2020-06-24 23:04:11 -07:00
TreeHugger Robot
403287ad1b Merge "Update GeomagneticField coefficients to WMM-2020" 2020-06-24 23:37:26 +00:00
TreeHugger Robot
fec442c59d Merge "camera2: Add mandatory stream combinations for depth only cameras." into rvc-dev am: a0637ae24b am: 3a9c937f4f am: 70ca9c6884 am: 7113365f65
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11967540

Change-Id: I7fc255b32bb92aeac977ed12c290d39ac22ecba2
2020-06-24 22:44:59 +00:00
TreeHugger Robot
3a9c937f4f Merge "camera2: Add mandatory stream combinations for depth only cameras." into rvc-dev am: a0637ae24b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11967540

Change-Id: I45ba2c05e353fba0cba79fce62b57b9b3e7b1b9c
2020-06-24 22:22:08 +00:00
Cory Hockenbury
bf2f69f416 Update GeomagneticField coefficients to WMM-2020
Update the GeomagneticField coefficients according to the World
Magnetic Model 2020-2025 values and specify the base time in UTC since
calls to System.currentTimeMillis() will return a UTC based time.

Test: CTS test passes
Signed-off-by: Cory Hockenbury <chockenbury@gmail.com>
Merged-In: I7614d420ad55129b04e0dfa9310e39d715ed2da7
Change-Id: Ica9182053359e5387da57bb0b3b93347040160ed
2020-06-24 12:41:53 -07:00
Jayant Chowdhary
d7feae01a5 camera2: Add mandatory stream combinations for depth only cameras.
Bug: 159247271

Test: atest ConcurrentCameraTest.java

Change-Id: I89d6209d36f76aa8ec19aaafd81abf1cfd025463
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-06-23 17:45:23 -07:00