Commit Graph

3365 Commits

Author SHA1 Message Date
Ytai Ben-tsvi
0d52f4202c Merge changes from topic "soundtrigger_refactor"
* changes:
  Migrate SoundTrigger implementation to new service
  Implement the soundtrigger_middlewware service
  Add a permission for preempting sound trigger sessions
  Sound trigger middleware service definition
  Add audio.common types AIDL definition
2019-12-17 22:33:55 +00:00
TreeHugger Robot
37ea48adc8 Merge "Camera: Fix typo when comparing display size height" 2019-12-17 17:57:02 +00:00
TreeHugger Robot
2067b230a0 Merge "Camera: add OFFLINE_PROCESSING capability" 2019-12-17 09:31:41 +00:00
Ytai Ben-Tsvi
7d383d1a98 Migrate SoundTrigger implementation to new service
The API offered by SoundTrigger.java is now implemented on top of
the new soundtrigger_middleware service.
There is no longer any need for JNI - the API now talks directly
with the AIDL interface of the new service.

In the process, some annotations and input validation have been added
to improve the overall quality of this API.

Change-Id: I731ffd5a275b88f38d84dd3daa022a13f97a5ee1
Bug: 142070343
2019-12-16 14:15:37 -08:00
Emilian Peev
8649a91686 Camera: Fix typo when comparing display size height
Call "getHeight()" instead of "getWidth()" when
comparing against preview size height.

Bug: 146364316
Test: Camera CTS
Change-Id: I588fd3b331380ff20762c24762e997d4a878cc44
2019-12-16 13:57:12 -08:00
Kevin Chyn
14ff3aab30 Merge changes from topic "biometric-strength"
* changes:
  Enforce that registered authenticators are not null
  Ensure that cancelling authentication ends up in the correct state
  Enforce authenticator registration
  Enforce that only public authenticator combinations are accepted
  Add phenotype namespace and flag for biometrics
  Use @Authenticators.Types for authenticator selection
  Add setAllowedAuthenticators(int) to BiometricPrompt
2019-12-16 20:06:31 +00:00
Robin Lee
75ba497beb Merge "Revert submission" 2019-12-14 03:06:25 +00:00
Hansong Zhang
b62b7b724d Revert submission
Based on Forrest run with earlier base build 6069142, the build with this submission failed apct/bluetooth/instrumentation_test

Reason for revert: Break tests
Bug: 146198238
Change-Id: I65060ca389bf3ae1f107552ca828bfc1e7baa7c1
2019-12-13 22:10:01 +00:00
Yin-Chia Yeh
440ee2608f Camera: add OFFLINE_PROCESSING capability
Test: N/A. New API skeletion without implementation yet.
Bug: 135142453
Change-Id: I8b019c6a3eee7e0fbfd328a1db71280a210ad5e2
2019-12-13 11:17:31 -08:00
Galia Peycheva
a4aff1e1df Merge "Add minimal post processing API to framework" 2019-12-13 10:09:00 +00:00
Haining Chen
5c7ed9affd Add phenotype namespace and flag for biometrics
This allows the ability to enforce biometric modality strength (downgrade only) on certain devices.

Bug: 141025588

Test: atest com.android.server.biometrics
Test: make system-api-stubs-docs-update-current-api
Test: make test-api-stubs-docs-update-current-api
Test: manual testing using "adb shell device_config put NAMESPACE KEY VALUE"

Change-Id: Ib167a038d717216ec0a54d6f4f6f5f88a70e1a6e
2019-12-12 19:37:52 -08:00
Ilya Matyukhin
30f1dd8be1 Use @Authenticators.Types for authenticator selection
This CL adds "canAuthenticate(int)" to BiometricManager.

Currently, authenticators can be one or more of the following:
    DEVICE_CREDENTIAL
    BIOMETRIC_STRONG
    BIOMETRIC_WEAK

Test: Auth on existing devices
Test: atest com.android.server.biometrics

Bug: 141025588
Change-Id: Idf52c5a76a0e24a8610ee5f46d55cd4197605fe7
2019-12-12 19:10:14 -08:00
Curtis Belmonte
13eb5813a1 Add setAllowedAuthenticators(int) to BiometricPrompt
Introduces a BiometricPrompt.PromptInfo#setAllowedAuthenticators(int)
method to allow a caller to specify whether to allow BiometricPrompt to
authenticate with device credential, biometric auth, or either. Also
renames the non-public Authenticator class to Authenticators, to avoid a
name collision and potential confusion with other Authenticator classes.

Test: make -j update-api
Test: atest AuthBiometricViewTest
Test: atest AuthContainerViewTest
Test: atest AuthControllerTest
Test: atest BiometricServiceTest

Bug: 80525177
Change-Id: I51da3ff0dcc7e49adb2d7f1c9cdaa12a55b11565
2019-12-12 18:15:39 -08:00
Nicholas Ambur
a0be6be387 add SoundTrigger HAL 2.3 per model parameter apis
add support for model parameter control APIs with THRESHOLD_FACTOR
as the first supported parameter

Bug: 141929369
Test: Tested manually with test app and confirmed with GTS test
gts-tradefed run gts-dev -m GtsAssistIntentTestCases
Change-Id: I06874fcf2ae2ef8796e7c52c4475252e8a026e2c
2019-12-11 19:16:48 -08:00
Kevin Chyn
f182a1e8d6 Merge "Update BIOMETRIC_ERROR_VENDOR javadoc" 2019-12-06 21:58:29 +00:00
TreeHugger Robot
bd52bdf8b7 Merge "Fix signedness of DisplayAddress.Physical ports" 2019-12-06 21:51:21 +00:00
Kevin Chyn
a73bfa27a9 Update BIOMETRIC_ERROR_VENDOR javadoc
Bug: 142157673

Test: Builds
Change-Id: I46f918806db3f50abfbe3aeb407f2e58e15edafd
2019-12-06 20:19:20 +00:00
Galia Peycheva
ea9457585a Add minimal post processing API to framework
This API allows applications to instruct the connected display to do minimal
post processing on the produced image or video frames. This will switch the
display to a low latency mode (ALLM, Game mode or some other custom
implementation thereof), reducing lag in the final images. Thus, minimal post
processing would greatly enhance performance for gaming and video
conferencing applications. It would not, however, suit applications that
prioritise image quality over performance.

This CL adds 2 public method:
 - Window.setPreferMinimalPostProcessing()
(this can also be set in WindowManager.LayoutParams.preferMinimalPostProcessing)
If minimal post processing is preferred, the connected display will be requested
to go into low latency mode, which reduces image processing, resulting in better
performance for gaming applications. If the Display sink is connected via HDMI,
the device will begin to send infoframes with Auto Low Latency Mode enabled and
Game Content Type. This will switch the connected display to a lower latency
mode (if available).
For more information, see HDMI 2.1 specification.

If the Display sink has an internal connection or uses some other protocol than
HDMI, effects may be similar but implementation-defined.

 - Display.isMinimalPostProcessingPreferred()
Returns true if the connected display supports either Low Latency Mode (ALLM or
some other custom low latency implementation) or Game content type.

Bug: 135116095

Test: make -> flash on ATV OTT device -> open an activity which requests minimal
post processing -> check SurfaceControl logs -> verify correct signals are
passed to native

Change-Id: Id09160ba1513fef4dac979162bcda3bfeaace0e6
2019-12-06 15:20:02 +01:00
Automerger Merge Worker
3a9ace7b43 Merge "Camera: Avoid removing valid repeating requests" am: 0e7782c87b am: 468c1263cf
Change-Id: I5fec062950b09211988c3b784c1608dcfbaae191
2019-12-04 15:54:17 +00:00
Emilian Peev
a491caf3fb Merge "Camera: Avoid removing valid repeating requests"
am: 0e7782c87b

Change-Id: Iee1a2277935c0b8a5f04ef9cd85ce7cfbd3415c9
2019-12-03 11:46:08 -08:00
Dominik Laskowski
67cc7f819e Fix signedness of DisplayAddress.Physical ports
Interpret port as unsigned byte for consistency with uint8_t in SF/IF,
and clarify signedness in doc comments.

Bug: 143713778
Test: adb shell dumpsys display | grep physicalPort
Test: LocalDisplayAdapterTest
Test: DisplayWindowSettingsTests
Change-Id: I56ce0067367372a3a747fde783a1956975e833a0
2019-11-25 14:46:29 -08:00
Ilya Matyukhin
e4675b3067 Implemented and integrated AuthService
AuthService in its current form is a thin wrapper around
BiometricService. It initializes BiometricService in onStart();
registers fingerprint, face, and iris authenticators; and forwards all
of the incoming calls to the corresponding methonds in BiometricService.

The next step will be to move non-biometric related functionality from
BiometricService to AuthService, and turn BiometricService into a module
with a stable API.

Bug: 141025588
Test: atest AuthServiceTest
Test: atest BiometricServiceTest
Test: BiometricPrompt works in BiometricPromptDemo
Change-Id: Ia861b7c2d80bfca386c3e0b44ec35b4aca3b0ffc
2019-11-18 22:10:50 +00:00
Kenny Guy
e9eb313f14 Merge "Add an API to BrightnessConfiguration to enable colour sampling." 2019-11-18 16:50:34 +00:00
Kenny Guy
d6fd7d661e Add an API to BrightnessConfiguration to enable colour sampling.
Default colour sampling off and add an API to enable it.

Bug: 143556482
Test: atest BrightnessTrackerTest
Test: atest BrightnessConfigurationTest
Change-Id: I955fa683d6410c7851e8f6ad503d5bfbdf0677f5
2019-11-14 16:42:08 +00:00
Philip P. Moltmann
a6359b825e Pipe though featureId from context to note-ops by camera code
Bug: 136595429
Test: atest CtsAppOpsTestCases (now including two new test cases that
              open a camera with a null and a non-null feature)
Change-Id: Ia9be1016e4e6a1a2af09b7b08c9d0373440813c6
2019-11-14 08:40:16 -08:00
Emilian Peev
6f3e5a0d49 Camera: Avoid removing valid repeating requests
Due to lock contention between the legacy camera
device implementation and the Camera2 framework,
result and error callbacks can be delayed which
can allow clients to update the repeating request
resulting in incorrect behavior.
To avoid this, check whether repeating request
errors still refer to valid and active request ids
tracked by the request queue before posting
callbacks.

Bug: 143727669
Test: Camera CTS

Change-Id: I8f2da0aace40b33757b3c3ac4febc3af7f0ec6cd
2019-11-04 14:24:30 -08:00
Shuzhen Wang
1ab8514517 Camera: Add bokeh mode tags in camera metadata
Introduce new bokeh mode metadata tags for camera device to enable bokeh
effect.

Test: Build and read docs
Bug: 118258123
Change-Id: Id0bb30b0fc9a50eb12b6062132fdac65755b0cdf
2019-10-28 17:55:58 -07:00
TreeHugger Robot
ddd425e522 Merge "change KeyphraseEnrollmentInfo to store services" 2019-10-25 03:08:40 +00:00
Ilya Matyukhin
f4ded6d022 Merge changes from topic "biometric-service-migration"
* changes:
  Remove strings from low level onError(...) calls
  Prepare BiometricService for migration to a module
2019-10-21 21:22:43 +00:00
Ilya Matyukhin
0f9da353b5 Remove strings from low level onError(...) calls
In order to get a correctly translated error messages, getString(...)
should be called on the application context, as opposed to the system
context. This is because the system context is unaware of the user's
locale.

Bug: 141025588
Test: Face Unlock works E2E
Test: Works with BiometricPromptDemo
Test: atest BiometricServiceTest
Test: atest AuthControllerTest
Test: atest CommandQueueTest

Change-Id: Ic228bb7ebb0d6a4ebaf96b9f1d2d70ed4e9dd79a
2019-10-18 16:45:52 -07:00
Ilya Matyukhin
f2da1a1178 Prepare BiometricService for migration to a module
Created an interface, IBiometricAuthenticator, that encapsulates
fingerprint, iris, and face services. Removed direct references to these
services from BiometricService.

The interface will allow new biometric authenticators to be integrated
with BiometricService without modifying its code.

Bug: 141025588
Test: Face Unlock works E2E
Test: Works with BiometricPromptDemo
Test: atest BiometricServiceTest
Change-Id: I564ccdccbfe25b2c41f92f7e91eedde6acdeeed4
2019-10-18 16:45:20 -07:00
Paul McLean
a7e7f94f98 Add video class-specific descriptors to UsbDescriptorParser framework.
Also add mHasVideoCapture and mHasVideoPlayback members to UsbDevice.

Bug: 142321590

Test: Build, flash, connect USB Video Camera, examine logs
Change-Id: Ia6ae687182ec0b007c1688478545829395191984
2019-10-18 11:08:52 -06:00
Xin Li
5c4d37fc17 DO NOT MERGE - Merge QD1A.190821.011 into stage-aosp-master
Bug: 141248619
Change-Id: I078f35ceef06ae7d08c5de385fd023c71c1ecbac
2019-10-14 22:54:53 +00:00
Nicholas Ambur
af25ee2978 change KeyphraseEnrollmentInfo to store services
Revert "Revert "change KeyphraseEnrollmentInfo to store services""
This reverts commit f2c31a51ee.

Bug: 139954183
Test: confirmed hotword enrollment is successful as a service after
device factory reset.
Change-Id: I41b78ba2b15c30c62d4ead55610fe44913741f2d
2019-10-08 13:24:23 -07:00
Paul Mclean
22ec138ecb Merge "Add "HasMidi" capability (attribute) to UsbDevice." 2019-10-07 17:24:47 +00:00
Kevin Chyn
f8ff281ae0 Merge changes from topic "biometric-ui-credentials"
* changes:
  Animate panel to transparent if profile is managed
  17/n: Show credential UI if setDeviceCredentialAllowed(true) and no biometrics
  16/n: Add PIN/Password
  15/n: Allow Auth UI to start in credential UI
  14/n: Animate to device credential UI when lockout occurs
  13/n: persist device credential across configuration changes
  12/n: Add LockPatternView for setDeviceCredentialAllowed(true)
  11/n: Animate panel to full-screen when "Use Password" is pressed
  Removing old confirm device credential logic
2019-10-05 02:37:26 +00:00
Paul McLean
9bd2f89fff Add "HasMidi" capability (attribute) to UsbDevice.
Bug: 142158212
Test: build, install, connect USB device and examine log.
Change-Id: Ic94891f4c4f845592009e9465b7ad17fd0c76b2e
2019-10-04 20:15:33 -06:00
Kevin Chyn
86f1b8e335 15/n: Allow Auth UI to start in credential UI
If the user is locked out of biometrics, and
BiometricPrompt#setDeviceCredentialAllowed(true), the user should be
shown the credential UI.

This change gives BiometricService the ability to request SystemUI
to show AuthCredentialView without first showing AuthBiometricView.

Bug: 140127687

Test: atest BiometricServiceTest
Test: atest com.android.systemui.biometrics

Change-Id: Ic26986ba044b7992641676c3d3b99fc1395a45b7
2019-10-04 13:13:12 -07:00
TreeHugger Robot
79b96fd723 Merge "Clarifies usage of ContextHubClientCallback APIs" 2019-10-04 13:23:52 +00:00
Arthur Ishiguro
ff8048c18a Clarifies usage of ContextHubClientCallback APIs
Test: None
Change-Id: I7e67bbf1ebbf5810b87cd09c943343e5056ce9a5
2019-10-03 15:45:06 -07:00
Kevin Chyn
ff168dc49d 12/n: Add LockPatternView for setDeviceCredentialAllowed(true)
Includes lock icon, title, subtitle, description, lock pattern view.
Corner radius and padding animates nicely from !=0 --> 0.

Support for password/pin will come in a subsequent CL.
Unit tests for AuthCredentialView will be added when
password/pin are implemented.

Support for persisting across configuration changes
and landscape view will also be added in a subsequent
change.

Test: BiometricPromptDemo with the following:
      1) Confirm pattern, callback received
      2) Rejected, error string shown
      3) Lockout (5 attempts), countdown string shown,
         pattern view disabled until countdown is over
      4) Cancel pattern auth, callback received
Test: atest BiometricServiceTest
Test: atest com.android.systemui.biometrics

Change-Id: Idc01e33be0074a6c8a43f60b172a4391bfbe5e8a
2019-10-03 14:00:16 -07:00
joshmccloskey
568d32935f Removing old confirm device credential logic
Test: Verified that confirm device credential still works
in the biometricpromptdemo app
Bug: 140128468
Change-Id: I28fc3c0dc16677ad953284ffa9670d7abd34cd40
2019-10-03 14:00:16 -07:00
Paul Mclean
843c2951fc Merge "Adding additional prompt to UsbPermissionsDialg for audio devices." 2019-10-03 19:33:39 +00:00
Paul McLean
d336453217 Adding additional prompt to UsbPermissionsDialg for audio devices.
To support, adding members to UsbDevice to mark devices as having audio
playback and audio capture capabilities.

Bug: 136080195
Test: Run "UsbAccess" test bed. Connect audio and non-audio USB devices
and see the additional prompt shown/not-shown.

Change-Id: Ie7c614d9ed30a163c350b18a54b8a9115698779d
2019-10-03 11:54:05 -06:00
Dmitry Shmidt
8896515721 Merge changes If9068025,I728e5bf9,I9d41169d am: 3b6a00ec3c am: 225b9d90c2 am: 3aadf0a4d9
am: 567cb2b5cc

Change-Id: I41e0cf8b361563f011be5456a1c57c80bbc62be3
2019-10-02 16:00:17 -07:00
Dmitry Shmidt
567cb2b5cc Merge changes If9068025,I728e5bf9,I9d41169d am: 3b6a00ec3c am: 225b9d90c2
am: 3aadf0a4d9

Change-Id: I739f574365d36af6b37d47f5593b9ca14f26ef47
2019-10-02 15:21:10 -07:00
Dmitry Shmidt
3aadf0a4d9 Merge changes If9068025,I728e5bf9,I9d41169d am: 3b6a00ec3c
am: 225b9d90c2

Change-Id: Ia3cc9fbaf08da8dd6823621366d307c40ba209d5
2019-10-02 14:27:56 -07:00
Dmitry Shmidt
225b9d90c2 Merge changes If9068025,I728e5bf9,I9d41169d
am: 3b6a00ec3c

Change-Id: I30952395f276309ad683f61743ed3b382370541d
2019-10-02 13:57:40 -07:00
Dmitry Shmidt
d6cf4d986b InputManager: Add isMicMuted() helper
Bug: 141192769
Test: Manual

Change-Id: I9d41169d1859e311f8824fc4990b7c875e02abf1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2019-09-27 11:09:02 -07:00
Jayant Chowdhary
7f9a4c9e8c Merge changes from topic "system-camera-cts"
* changes:
  Allow com.android.shell to get RECORD_AUDIO permissions.
  CameraManager: Add @TestApi method getCameraIdListNoLazy().
2019-09-24 20:05:18 +00:00