Commit Graph

3726 Commits

Author SHA1 Message Date
Chris Ye
dfc4030909 Merge "Generate ACTION_CANCEL event when screen turned off by proximity sensor." 2020-05-13 17:11:33 +00:00
TreeHugger Robot
51822d01df Merge "Add OWNERS for display, haptics, input and power" into rvc-dev am: f30c225fcb am: 1e3fe956cf am: 689486059f am: 4623e80530
Change-Id: I80f338fc23ef80f544bc33d169f262346ab17786
2020-05-12 22:31:13 +00:00
TreeHugger Robot
689486059f Merge "Add OWNERS for display, haptics, input and power" into rvc-dev am: f30c225fcb am: 1e3fe956cf
Change-Id: I36ce5198582b6aa3fe6fc1c89e9438454df09f3f
2020-05-12 20:44:35 +00:00
TreeHugger Robot
f30c225fcb Merge "Add OWNERS for display, haptics, input and power" into rvc-dev 2020-05-12 20:17:39 +00:00
Eino-Ville Talvala
4f3e1f1f4f Merge "Camera: Fix minor doc formatting error" into rvc-dev am: ab3438ec1f am: 8b6cc42047 am: 0d0ae101e6 am: ad4ec50789
Change-Id: Icc8c37233fb687d0c5265505cda5281caf008345
2020-05-12 18:48:26 +00:00
Michael Wright
2e7e81c950 Add OWNERS for display, haptics, input and power
Bug: 156349083
Test: N/A
Change-Id: Ia8afccfc2e470095ae3d52c827c0ac78b7c120ae
2020-05-12 19:11:13 +01:00
Eino-Ville Talvala
8b6cc42047 Merge "Camera: Fix minor doc formatting error" into rvc-dev am: ab3438ec1f
Change-Id: Idf62e055ae86bb9b46334afb8815fd596e3bdf0e
2020-05-12 17:27:47 +00:00
Eino-Ville Talvala
ab3438ec1f Merge "Camera: Fix minor doc formatting error" into rvc-dev 2020-05-12 17:25:11 +00:00
Chris Ye
b985677a9e Generate ACTION_CANCEL event when screen turned off by proximity sensor.
When using PROXIMITY_SCREEN_OFF_WAKE_LOCK and screen was turned off by proximity sensor,
input service should generate ACTION_CANCEL, same as display turned off by pressing power button.
Add power state in display view port and notify input service for
display power state change.

Bug: 154074380
Test: atest libgui_test
Change-Id: Icb65aead4b5544182c46101f4ba535f5955ebd6c
2020-05-12 09:54:30 -07:00
Kevin Chyn
6f843d4249 Merge changes from topic "biometric-id"
* changes:
  Update IBiometricSensorReceiver with sensorId
  Stop using halDeviceId
2020-05-12 05:35:46 +00:00
Kevin Chyn
95d3024127 Update IBiometricSensorReceiver with sensorId
We should first remove halDeviceId since it's not used and adds
confusion.

Bug: 149067920
Test: atest com.android.server.biometrics
Test: enroll, auth (lockscreen), remove on fingerprint/face devices
Test: BiometricPromptDemo on fingerprint/face devices

Change-Id: Ic57ed3307225ae2653f8f83308a4119346428c26
2020-05-11 17:33:33 -07:00
Eino-Ville Talvala
403ea08d18 Camera: Fix minor doc formatting error
Test: Builds
Bug: 150331548
Change-Id: Id7b2306486d1a57e0226f641602609debabf7ff9
2020-05-11 10:18:10 -07:00
Alec Mouri
6a5be8eaca Merge "Dispatch refresh rate callbacks from DMS" into rvc-dev am: 00f681a582 am: 151365a461 am: c94de5c5ce am: f7f8d57074
Change-Id: I912b29d038f9938b963818577b2c9644d7d5e023
2020-05-10 06:05:37 +00:00
Alec Mouri
151365a461 Merge "Dispatch refresh rate callbacks from DMS" into rvc-dev am: 00f681a582
Change-Id: I193dfe7532893c3675d074aa00078ab0885095c3
2020-05-10 05:17:32 +00:00
Alec Mouri
00f681a582 Merge "Dispatch refresh rate callbacks from DMS" into rvc-dev 2020-05-08 23:54:17 +00:00
Kevin Chyn
e6bdee20a0 Stop using halDeviceId
The deviceId currently returned by the HAL is only used to determine
if the callback has successfully been set. Any state that it's being
used to track is currently redundant with the pointer to the actual
HAL (e.g. determing if the HAL is found, if it has crashed, etc).

Remove this information to reduce confusion.

Also removed enumerate callback, since only system server handles
enumeration results (upper layers never touch this)

Bug: 149067920
Test: Enroll, auth on fingerprint and face devices
Test: atest com.android.server.biometrics

Change-Id: I1275a91da6f773934be663731ddf1802e0161090
2020-05-08 13:46:41 -07:00
Alec Mouri
cf3ad873dd Dispatch refresh rate callbacks from DMS
AChoreographer will consume these callbacks in lieu of going through SF
for the callbacks. This is so that DMS can update its view of display
configs before apps receive the refresh rate callback so that apps can
get consistent information.

Bug: 154874011
Test: ChoreographerNativeTest
Test: Manually verify that HWUI is receiving callbacks
Change-Id: I992c247fd16ef414f94a259bbd300bea3e4c9467
2020-05-07 19:19:23 -07:00
Automerger Merge Worker
b58d1b9087 Merge "Merge "Camera: add proper null check for mRemoteDevice" into rvc-dev am: ab59e9af27 am: 99a251f707" into rvc-d1-dev-plus-aosp am: 954f80cc77 am: f94000604e
Change-Id: I40bc234b91d79af87a40382b59690d5d7048b225
2020-05-01 18:58:03 +00:00
Yin-Chia Yeh
50d66c86e1 Merge "Camera: add proper null check for mRemoteDevice" into rvc-dev am: ab59e9af27 am: 99a251f707
Change-Id: I5f642372f6ee9d928cc87a205f8b50e3a3e373c1
2020-05-01 18:22:04 +00:00
Yin-Chia Yeh
93ad587fe7 Merge "Camera: add proper null check for mRemoteDevice" into rvc-dev am: ab59e9af27
Change-Id: I67efcbf9db8e652e502b30afe6f53a046616bf19
2020-05-01 18:10:48 +00:00
Yin-Chia Yeh
ab59e9af27 Merge "Camera: add proper null check for mRemoteDevice" into rvc-dev 2020-05-01 18:05:49 +00:00
Eino-Ville Talvala
86ef24ea3c Merge "Camera: Improve metadata access JNI performance" into rvc-dev am: 2a4de9cf21 am: 3f0603afe1 am: b12cdffb49 am: 156a50db6c
Change-Id: Ic75c0de8cd7850eb2529603a4629bdd03a94dbe3
2020-04-30 23:22:55 +00:00
Eino-Ville Talvala
b12cdffb49 Merge "Camera: Improve metadata access JNI performance" into rvc-dev am: 2a4de9cf21 am: 3f0603afe1
Change-Id: I1c85ce5ae765581590707738f4bcde3ccbae32fd
2020-04-30 22:48:30 +00:00
Eino-Ville Talvala
0b121c70c1 Merge "Camera: Improve metadata access JNI performance" into rvc-dev am: 2a4de9cf21
Change-Id: Ie4b090b6d233f6306a90735b5dd95d5d8e14ace0
2020-04-30 22:38:28 +00:00
Eino-Ville Talvala
2a4de9cf21 Merge "Camera: Improve metadata access JNI performance" into rvc-dev 2020-04-30 22:19:13 +00:00
Eino-Ville Talvala
d95058f1cd Camera: Improve metadata access JNI performance
- Don't use reverse-JNI to access metadata ptr, pass it as an arg instead
- Use @FastNative since the calls are short and bounded in time

Performance improvement:
- On a 10-second trace of camera app running on sargo, percentage of
  time used in CameraMetadataNative.get went from 4.36% to 3.77%, a 15%
  reduction in time.

Test: atest CtsCameraTestCases
Bug: 150214459
Change-Id: I28d9428beaa7eada6292e24fe6ca1dbd9c2ff153
2020-04-30 12:59:06 -07:00
TreeHugger Robot
9a65d1ceff Merge "Handle exceptions on attach" into rvc-dev am: d5a777965b am: a206357d45 am: c8621cce48 am: a6a1980501
Change-Id: I14bc61583b15bac376bc3efbd993a6443b286ea6
2020-04-30 01:48:10 +00:00
TreeHugger Robot
a206357d45 Merge "Handle exceptions on attach" into rvc-dev am: d5a777965b
Change-Id: Icbe7913740cd40e96ad82ccca0a873a6c2963328
2020-04-30 01:17:59 +00:00
Ytai Ben-Tsvi
b6f88a7af7 Handle exceptions on attach
attach() may throw various kinds of runtime exceptions, and since there
is no way to represent them in attach() other than returning null (it
is not supposed to throw), we should catch them here and log them.

Bug: 153332815
Change-Id: Icbb7643c3abf6c6b0edc9d1eb9a74c38c731acdf
2020-04-29 14:54:29 -07:00
Kevin Chyn
e2f1133022 Merge changes from topic "authsession-ize"
* changes:
  Check for null HAT and add logging
  6/n: Move logging into AuthSession
  5/n: Remove requireConfirmation round trip
  4/n: Remove unused parameter
  3/n: Add AuthSession#STATE_AUTH_PAUSED_RESUMING
  2/n: AuthSession should manage its own state
  1/n: Move confirmationRequired logic into sub-modules
2020-04-29 02:44:06 +00:00
Kevin Chyn
f6c1ae3246 5/n: Remove requireConfirmation round trip
<Biometric>Service(s) only need to know about requireConfirmation
for FrameworkStatsLog logging. On the same note, AuthSession is the
source of truth for requireConfirmation, so <Biometric>Service(s) do
not need to pass the value back.

Bug: 149067920

Test: atest com.android.server.biometrics

Change-Id: I5212da7db4fde0bec84eaee83fd25ed0f0225b9a
2020-04-28 17:07:13 -07:00
Marin Shalamanov
f4733dd8ac Merge "Change the type of display port from byte to int" 2020-04-28 12:25:33 +00:00
Marin Shalamanov
41cb66fa00 Change the type of display port from byte to int
Using byte for display port is error prone since ports
are in the range [0, 255] and bytes have the range [-128, 127].
This way we need to downcast from int to byte in order to write a
value to display port and also we need to call Byte.toUnsignedInt
every time we want to consume it.

Test: m services
Bug: 153334857
Change-Id: I4dce87c0a411c5d447f62cc5564eb4b8a8fb75f0
2020-04-27 22:11:29 +02:00
TreeHugger Robot
2682e47f9f Merge "CEC: Make HDMI CEC volume control configurable" into rvc-dev am: 77576fe964
Change-Id: I581946f1aea58a7f61dd8e9639862b8cf88cd95a
2020-04-27 12:34:59 +00:00
TreeHugger Robot
77576fe964 Merge "CEC: Make HDMI CEC volume control configurable" into rvc-dev 2020-04-27 12:26:23 +00:00
Marvin Ramin
da665a67f1 CEC: Make HDMI CEC volume control configurable
Add API (backed by Setting) to enable/disable volume changes via HDMI
CEC for HDMI CEC source devices.
This state is persisted via Settings.

If volume control is disabled, no incoming HDMI CEC commands related to
volume will be processed. If disabled, no HDMI CEC volume control
messages will be sent by the device.

Test: atest com.android.server.hdmi
Bug: 149800547

Merged-In: I83ae9b423122b540b9adb156fb1c6f5964dd6105
Change-Id: I83ae9b423122b540b9adb156fb1c6f5964dd6105
2020-04-27 12:35:56 +02:00
Nick Chalko
c2b6938c2e Merge "Use HdmiProperties class for ro.hdmi.*" 2020-04-26 17:18:44 +00:00
Ytai Ben-tsvi
5ac3773839 Merge "Deliver internal server errors to the client" into rvc-dev am: f7d789b0ed am: 62fa87cbf4 am: 503ee719e1 am: bedc04c1b1
Change-Id: I394e47e9ac387a24169e543f28a899438dc7d7d9
2020-04-25 02:46:16 +00:00
Ytai Ben-tsvi
503ee719e1 Merge "Deliver internal server errors to the client" into rvc-dev am: f7d789b0ed am: 62fa87cbf4
Change-Id: Iafb290d16686ab312326807cf9d2a33f59b0be8f
2020-04-25 02:08:26 +00:00
Ytai Ben-tsvi
20ec41785c Merge "Deliver internal server errors to the client" into rvc-dev am: f7d789b0ed
Change-Id: I3be1a7bdb367c9e583fb19fe92b973d1f658a921
2020-04-25 01:47:42 +00:00
Ytai Ben-Tsvi
458930753d Deliver internal server errors to the client
Due to a binder limitation (b/150808347), any unexpected exception
thrown by a binder service while processing an RPC call, will be
silently discarded and the client will get back a default-initialized
result parcelable (i.e. in most cases, won't know that anything wrong
happened).

We work around this issue by throwing a ServiceSpecificException,
which does get delivered, having a special code to designate an
internal error. Errors resulting from a HAL malfunctions will result
in a HAL reboot, which leads to recovery.

Bug: 154089179
Test: Manual verification of basic error recovery scenarios by
      injecting HAL error codes and crashes.
Change-Id: Ib5dbe08a362e545501c04204bebad5ab95f5d632
2020-04-24 16:39:36 -07:00
TreeHugger Robot
8f1f941d3c Merge "CEC: Make HDMI CEC volume control configurable" 2020-04-24 17:53:43 +00:00
TreeHugger Robot
e7a355291b Merge "Use Arrays.hashCode in DeviceProductInfo" into rvc-dev am: f0de93d7b2 am: 6cd7f6c60d am: 57e5456ddf am: 5a6aebd974
Change-Id: I61178029bcaf0e2738933059d8da586c59b93ba6
2020-04-24 15:07:02 +00:00
TreeHugger Robot
6cd7f6c60d Merge "Use Arrays.hashCode in DeviceProductInfo" into rvc-dev am: f0de93d7b2
Change-Id: Ie0e9c4b6717e87a1f1057318f93b7bfe9469c4bf
2020-04-24 14:37:20 +00:00
TreeHugger Robot
f0de93d7b2 Merge "Use Arrays.hashCode in DeviceProductInfo" into rvc-dev 2020-04-24 14:24:25 +00:00
Marvin Ramin
309efbc770 CEC: Make HDMI CEC volume control configurable
Add API (backed by Setting) to enable/disable volume changes via HDMI
CEC for HDMI CEC source devices.
This state is persisted via Settings.

If volume control is disabled, no incoming HDMI CEC commands related to
volume will be processed. If disabled, no HDMI CEC volume control
messages will be sent by the device.

Test: atest com.android.server.hdmi
Bug: 149800547

Change-Id: I83ae9b423122b540b9adb156fb1c6f5964dd6105
2020-04-24 16:14:23 +02:00
Marin Shalamanov
90fd0b19f8 Use Arrays.hashCode in DeviceProductInfo
Using arrays in Objects.hash() is error prone. Instead we
call Arrays.hashCode().

Test: m services
Bug: 154302664
Change-Id: Icf00fbaa465ef60951998659ae0333b2faf7042b
2020-04-24 13:02:35 +00:00
Kevin Chyn
3358b41ea0 4/n: Remove unused parameter
Bug: 11196423

Test: atest com.android.server.biometrics
Change-Id: I2fc015edd32215da076bd551fc6cafd59ff00a1f
2020-04-23 16:16:05 -07:00
Kevin Chyn
b53472abd2 2/n: AuthSession should manage its own state
1) State calculation, updating, side-effects, outputs are moved
   within AuthSession
2) StatusBarService invocations are all within AuthSession
3) PendingSession and CurrentSession are merged into CurrentSession.
   PendingSession was mostly the same as CurrentSession, with the
   two considerations:
     A) It's only ever valid in STATE_AUTH_CALLED (waiting for sensors
        to become ready)
     B) It's possible for new authentication to be requested while
        CurrentSession is in-progress.

Previously, the PendingSession would request <Biometric>Service(s)
to prepare for auth, which would cancel any existing authentications
and send ERROR_CANCELED to BiometricService, ending the CurrentSession
lifecycle. With this change, if authentication is requested while an
existing AuthSession is in progress, it will immediately send
ERROR_CANCELED to the previous caller and cancel sensors if necessary.
ERROR_CANCELED that are received from the sensors will not affect
the new AuthSession (as expected), since the cookies will no longer
match.

Bug: 149067920

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

Change-Id: Ia89920d2225eb9a71f25a5b9fbbd36f92a550127
2020-04-23 16:10:45 -07:00
TreeHugger Robot
4338456d82 Merge "Camera: Update physical camera request keys documentation" into rvc-dev am: 1a17016c70 am: 9a2db61b88 am: 8fa4061bce am: 6902350871
Change-Id: Ia926c96f1a7f9c0a6a827906e38c89c10e0d8a6b
2020-04-23 17:59:57 +00:00