Commit Graph

3521 Commits

Author SHA1 Message Date
Ytai Ben-Tsvi
d5065ba8a5 Pass models to soundtrigger middleware with shared memory
This both avoids the need to make extra copied for the models and
allows exceeding the parcel size limits.

Bug: 150100907
Test: Manual testing of basic sound trigger functionality
Change-Id: Ic4c5c1a9de3e29b1b6fa82442254e1afe7daec19
2020-02-28 13:01:24 -08:00
Nicholas Ambur
a163d079d8 Merge "add enrollment application UID tracking" into rvc-dev 2020-02-27 18:01:24 +00:00
Jayant Chowdhary
d7cc17c164 camera2: Add documentation for getConcurrentStreamingCameraIds specifying multi-process use.
Add documentation specifying that camera devices advertised by
getConcurrentStreamingCameraIds() refer to those devices which can be
configured concurrently by the same client application.

Bug: 150225538

Test: m offline-sdk-docs

Change-Id: I4997f10ca73de45fd58d22261c7456402d761a57
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-02-26 22:44:42 +00:00
Nicholas Ambur
679e7d5beb add enrollment application UID tracking
KeyphraseEnrollmentInfo class now keeps track of the different enrollment
application UIDs. It can be queries whether a given UID matches an
existing enrollment application.

Bug: 148159858
Test: build and test that enrollment application can still enroll models
with new UID check

Merged-In: Ib60ebb259e4e3ddaa07da15e2cf55fd6099ad4d0
Change-Id: Ib60ebb259e4e3ddaa07da15e2cf55fd6099ad4d0
(cherry picked from commit 84b798555d)
2020-02-25 01:17:06 +00:00
Kevin Chyn
df244da79a Merge changes from topic "biometric-and-credential"
* changes:
  Always start AuthController
  Clean up biometric system server
2020-02-21 21:37:14 +00:00
Marin Shalamanov
7f66d5f1b3 Merge "Use Integer instead of int in DeviceProductInfo" 2020-02-21 15:59:12 +00:00
Marin Shalamanov
f5d6ae6c72 Use Integer instead of int in DeviceProductInfo
Test: m
Change-Id: I9acb25aebd0fd3e2fec248ce630d0455d6132755
2020-02-21 13:01:32 +01:00
Haining Chen
6c839dd1c6 Merge "Implementations of biometric contraints for weak and convenience tiers (1) 24 hours fallback (2) 4 hours idle timeout" 2020-02-20 21:05:24 +00:00
Kevin Chyn
7d07c89235 Clean up biometric system server
1) BiometricService / AuthService always need to be started, since on
   Android 11 and later, the public credential auth API comes through this
   path.

2) Consolidate getAuthenticatorId() and expose via AuthService. This is
   used only by the platform during key generation. Instead of asking
   each individual service, AuthService will return a list of IDs for
   sensors which are enrolled and meet the required strength.

Test: atest com.android.server.biometrics
Test: fingerprint device, CtsVerifier biometric section
Test: face unlock device, CtsVerifier biometric section
Test: remove biometrics from device, CtsVerifier biometric section

Bug: 148419762
Bug: 149795050

Change-Id: I2c5385b1cd4f343fabb0010e1fe6fb1ea8283391
2020-02-20 11:12:51 -08:00
Marin Shalamanov
636b1713c7 Small cleanup in DeviceProductInfo.
This CL fixes a var name and puts "final" in the corrent order.

Test: m
Change-Id: Id7ec3ac1c6f63d03cabe0d878e84a9ed24386d33
2020-02-20 14:52:07 +01:00
Jayant Chowdhary
fd3d196de2 Merge "camera2: Update documentation for getConcurrentStreamingCameraIds to account for availability callbacks." 2020-02-20 06:43:15 +00:00
Jayant Chowdhary
69531d8331 Merge "camera2: Update spec for mandatory concurrent stream combinations." 2020-02-20 03:04:01 +00:00
Haining Chen
c06c481fcb Implementations of biometric contraints for weak and convenience tiers
(1) 24 hours fallback
(2) 4 hours idle timeout

Bug: 141025588

Test: atest AuthServiceTest
Test: atest KeyguardUpdateMonitorTest
Test: atest BiometricsUnlockControllerTest
Test: atest KeyguardIndicationControllerTest
Test: make -j
Change-Id: I1078ce39a2ae1e4c250b6468e477b703e3016e2c
2020-02-19 23:58:31 +00:00
Automerger Merge Worker
e94ac536ec Merge "USB: [API feedback] Add bitmask @IntDef annonation to setCurrentFunctions" am: 2f9800a47d am: 65de31ca5d am: bac02c1de2
Change-Id: I3dd8104d264a423b19ccfe8affc4a2f4de58b101
2020-02-19 23:07:54 +00:00
Jayant Chowdhary
cf36cd1ecc camera2: Update documentation for getConcurrentStreamingCameraIds to account for availability callbacks.
Bug: 148995918

Test: builds
Test: make doc-comment-check-docs

Change-Id: Ib6f09034c470a7439912fb4aa569b6e1f69db5ab
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-02-19 10:38:14 -08:00
Automerger Merge Worker
65de31ca5d Merge "USB: [API feedback] Add bitmask @IntDef annonation to setCurrentFunctions" am: 2f9800a47d
Change-Id: Iaf10cf1c347b93eb87fa476d59b41fa35022cd80
2020-02-19 03:15:57 +00:00
Marin Shalamanov
98af159104 DeviceProductInfo API.
DeviceProductInfo API that can be used to prime an Android TV remote
with entries from an infrared database for controlling connected
audio and TV devices. See go/display-identifiers.

Bug: 145299597
Test: adb shell dumpsys display
Change-Id: I8d709d55d830eed932b51bb8c374d32e20eecf6d
2020-02-18 19:36:29 +01:00
Dominik Laskowski
b26dbebce0 Merge "Plumb display connection type to DMS" 2020-02-14 22:54:08 +00:00
James Wei
77dc3e9ff2 USB: [API feedback] Add bitmask @IntDef annonation to setCurrentFunctions
Bug: 148285097
Test: Manual test: USB function switch: MTP, PTP, RNDIS, MIDI
Test: atest UsbTests
Test: atest UsbManagerTests
Change-Id: I27f8097b0a8174f7c1d14b856442e8962b56a906
2020-02-14 17:44:43 +08:00
TreeHugger Robot
a4d20a71b3 Merge "Fixes Context Hub feature naming and documentation" 2020-02-14 04:34:23 +00:00
Jayant Chowdhary
ac404c12d5 camera2: Update spec for mandatory concurrent stream combinations.
Bug: 77960042

Test: atest ConcurrentCameraTest.java

Change-Id: I01fd6c5eab1ed8bc716be98c24a93d45f2ddaed3
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-02-13 15:28:41 -08:00
Curtis Belmonte
faebfd0ad8 Merge "Add internal API for credential text in BiometricPrompt" 2020-02-13 20:29:14 +00:00
Curtis Belmonte
4584d88d41 Add internal API for credential text in BiometricPrompt
Adds a hidden API behind an internal permission check that allows the
Settings app to use specific text to BiometricPrompt for credential
auth. This allows the work authentication prompt to use work-specific
language when verifying work credentials, while retaining more generic
language when authenticating with biometrics.

Test: Work lock prompt shows "Enter your work ___" for credential
Test: Work lock prompt now shows "Verify it's you" for face

Bug: 149003660
Change-Id: Idf06f7e008f4bdb448b0d539522efd2e9290a3bb
2020-02-13 09:47:48 -08:00
Arthur Ishiguro
49e96a8ab7 Fixes Context Hub feature naming and documentation
- Adds "_" in variable name for consistency with feature string
- Adds documentation on what the feature is used for

Bug: 149475852
Test: None
Change-Id: I6eca279df8409de1155cd7014647a705d0d31d6f
2020-02-13 08:08:55 -08:00
Kevin Chyn
e38367008f Merge "Biometric phenotype updates" 2020-02-13 04:40:05 +00:00
Siarhei Vishniakou
b0f1fe887a Merge "New VerifiedInputEvent api" 2020-02-12 22:55:00 +00:00
Kevin Chyn
eab9fe1560 Biometric phenotype updates
1) Always update strength after registerAuthenticator. Otherwise the
   flag will not be applied (e.g. after reboot)
2) Add strings for onAuthenticationError

Bug: 148419762

Test: manual
Test: atest BiometricServiceTest

Change-Id: Ia20a91e401d6753b55d6aa4a36d487fc15465ba5
2020-02-12 14:54:31 -08:00
Curtis Belmonte
5cf71d715e Merge changes from topic "bio_service_restrict"
* changes:
  Make BiometricService check for internal permission
  Configure BiometricPrompt to use AuthService.
2020-02-12 19:29:04 +00:00
Dominik Laskowski
26290bb074 Plumb display connection type to DMS
Secondary physical displays are now properly categorized as TYPE_INTERNAL
or TYPE_EXTERNAL, rather than assumed to be external. LocalDisplayAdapter
distinguishes between primary/secondary and internal/external categories
when populating DisplayInfo.

Bug: 134771872
Test: dumpsys display
Change-Id: Id43a72411131588897f29b8d8db417f8c9e78259
2020-02-12 10:47:27 -08:00
Eino-Ville Talvala
53e0762358 Merge "Camera NDK: New lifecycle for ACameraMetadata_fromCameraMetadata" 2020-02-12 18:09:33 +00:00
TreeHugger Robot
b1a015996b Merge "Camera: Fix an error log spam for external camera" 2020-02-12 00:10:31 +00:00
TreeHugger Robot
b75d9fdbed Merge "Allow crypto + credential auth with BiometricPrompt" 2020-02-11 23:24:25 +00:00
Curtis Belmonte
a8b50a6f5b Make BiometricService check for internal permission
Previously, some paths through BiometricService needed to be accessible
by apps. Now that external calls are routed through AuthService instead,
we can check for the system-only USE_BIOMETRIC_INTERNAL permission
everywhere that we had been checking for USE_BIOMETRIC in
BiometricService.

In order for this to be enforced properly, we also need to move some
of the permission checks that were previously in BiometricService to
AuthService, which is now the primary entry point for applications
invoking the relevant biometric APIs.

Test: com.android.server.biometrics
Test: Manually verified functionality using support biometric demo app

Bug: 148971767
Change-Id: Ieab61276c6375b0d674f73e1833edabc8700fe74
2020-02-11 13:56:45 -08:00
TreeHugger Robot
14e6a15b45 Merge "Access to Device Vibrator State" 2020-02-11 20:13:08 +00:00
Fiona Campbell
004e36da64 Merge "Add support for brightness as a float" 2020-02-11 18:51:02 +00:00
Shuzhen Wang
88193b7318 Camera: Fix an error log spam for external camera
External camera's getCameraCharacteristics call may trigger exception
via parseInt() call. The exception is catched, and we should not log the
message as error.

Test: Build
Change-Id: Ia858b692ef7622f5fcfbf32cc4fd29574a408731
2020-02-11 10:37:58 -08:00
Eino-Ville Talvala
fdfec36692 Camera NDK: New lifecycle for ACameraMetadata_fromCameraMetadata
Instead of requiring the user to call NewGlobalRef/DeleteGlobalRef
for keeping the java object alive when creating an NDK view into it,
reference count the real native data instead, so that there's no need
to keep track of the Java object lifecycle.

- Switch CameraMetadataNative use std::shared_ptr

Test: New CTS tests pass, fail without this CL
Bug: 148972471
Change-Id: I9a00fc1daa1beac35a15484960048facb90499a6
2020-02-11 10:35:18 -08:00
Ilya Matyukhin
dc48d448c0 Merge changes If2a41e5e,If987a317,I86d3d50f
* changes:
  Remove redundant modifiers from the constants
  Add support for 2.2::FingerprintAcquiredInfo::START
  Use @2.2 callback with @2.2 HAL
2020-02-11 02:16:39 +00:00
Kevin Chyn
bf23b86560 Merge changes from topic "biometric-security"
* changes:
  Implementation for BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED
  Add API constant for BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED
2020-02-11 01:20:00 +00:00
Chris Ye
473c84ff4c Access to Device Vibrator State
Add API to access vibrator state and vibrator state listener.

Bug: 135949568
Change-Id: I96636b432d581cea03a9fc9fecba4c08045f5006
2020-02-11 00:02:37 +00:00
Ilya Matyukhin
144bea08ed Remove redundant modifiers from the constants
Bug: 141335235
Test: build
Change-Id: If2a41e5e3f0cf6466c931b943defa02d7ad0dc8e
2020-02-10 16:00:33 -08:00
Ilya Matyukhin
7c09d39154 Add support for 2.2::FingerprintAcquiredInfo::START
Bug: 139317981
Test: build
Change-Id: If987a317857d9fefae675abd29ed4b822267b95a
2020-02-10 16:00:31 -08:00
Fiona Campbell
d4eb295196 Add support for brightness as a float
Change the framework to handle brightness as a float rather than an int.

Test: AutomaticBrightnessControllerTest
BrightnessConfigurationTest
BrightnessMappingStrategyTest
BrightnessUtilsTest
DevicePolicyManagerTest
DisplayManagerServiceTest
DisplayTest
DozeScreenBrightnessTest
PowerManagerTest
PowerManagerVrTest
SettingsProviderTest

Exempt-From-Owner-Approval: Changing param from int to float

Change-Id: I413641cd987c5ec8f82753c0388a33f85a9682de
2020-02-10 23:44:40 +00:00
Kevin Chyn
eeadeaac02 Add API constant for BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED
Bug: 148419762
Test: make -j
Test: See next CL

Change-Id: I3c272792fe2366239478aa3ad7bfbb8d9bbacf56
2020-02-10 15:06:27 -08:00
Siarhei Vishniakou
cf07528a0e New VerifiedInputEvent api
The Verified{Input/Key/Motion}Event api are the same as
{Input/Key/Motion}Event api.
The VerifiedMotion class is the same as the MotionEvent class, but
contains less information. It only contains the information that the
system is able to verify.
Same applies to VerifiedKeyEvent.

The class VerifiedInputEvent contains common information applicable to
both Key and Motion.

Test: atest VerifiedKeyEventTest VerifiedMotionEventTest
Bug: 134977432
Change-Id: I4770104eb4c025263da7efeea9c7a658dff74ac9
2020-02-10 13:43:55 -08:00
joshmccloskey
a8f15a5d2e Configure BiometricPrompt to use AuthService.
BioetricPrompt was incorrectly using BiometricService directly. After
adding a few minor modifications, BiometricPrompt correctly goes through
AuthService.

Test: Verified that BiometricPromptDemo apk is able to authenticate.
Test: Verified that BiometricPromptDemo apk is able to cancel
authenticatoins.
Bug: 141025588

Change-Id: I29646c33a1904c6ad71f3ed2a4b02b6fe159517b
2020-02-10 10:32:49 -08:00
Automerger Merge Worker
bd0f475895 Merge changes from topic "lights-manager" am: 59401aab80
Change-Id: I9a45024b3cb557afd4fb09e69692f35c4372c928
2020-02-08 01:37:15 +00:00
TreeHugger Robot
a830364eb2 Merge "fix SoundTriggerModule java doc" 2020-02-07 23:45:45 +00:00
Ivailo Karamanolev
3e376b79ce Add LightsManager implementation to LightsService
Includes backend code to support LightsManager binder calls and route
them to the HALs.

Bug: 144979010
Bug: 144978691
Bug: 142715294
Change-Id: I0080972620ba7a3fb1197cdd0288287d3cfa8780
Fix: 142230898
Test: atest LightsManagerTest
Test: atest LightsServiceTest
Merged-In: I2db7f2caa432cd1e2389ea5ca6544200ada18675
2020-02-07 02:11:18 +01:00
TreeHugger Robot
21d778f061 Merge changes I640f6470,Idca3ccc6
* changes:
  add java doc for SoundTriggerManager.Model
  fix naming discrepancy in SoundTrigger
2020-02-07 01:07:14 +00:00