Commit Graph

3604 Commits

Author SHA1 Message Date
TreeHugger Robot
4586885a63 Merge "Camera: Query default display size from display manager" into rvc-dev 2020-05-21 16:12:40 +00:00
Emilian Peev
46e7450670 Camera: Query default display size from display manager
The current Android API will trigger strict mode
violations in case a context not bound to any
particular display tries to connect to the window
manager service.
To avoid such violations query the default display size
directly from the display manager.

Bug: 157167435
Test: Camera CTS
Change-Id: Icad19ec0227b4945da9e6fcacaec916c5799877f
2020-05-20 17:18:02 -07:00
TreeHugger Robot
d220792d6b Merge "camera2: Add some more docs to getConcurrentCameraIds" into rvc-dev 2020-05-21 00:15:00 +00:00
Jayant Chowdhary
9c8fe18534 camera2: Add some more docs to getConcurrentCameraIds
- specifying the order of camera open and session configuration.
- explaining the use of CONTROL_ZOOM_RATIO with concurrent operation of cameras.

Bug: 151891611

Test: make doc-comment-check-docs

Change-Id: I3ee3f114f7295570aa6af5dbe35bb32db555811b
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-05-20 15:43:47 -07:00
Nicholas Ambur
f39409edaf Merge "fix SoundTrigger.ModuleProperties equals" into rvc-dev 2020-05-18 17:12:46 +00:00
Nicholas Ambur
ba749f87d4 fix SoundTrigger.ModuleProperties equals
Bug: 152354427
Test: atest SoundTriggerTest
Change-Id: I715ecb51e78bcb45f4b3384c0551297289fe30f9
2020-05-18 10:11:02 -07:00
TreeHugger Robot
48105b5c6e Merge "Camera: Docs: Improve info on key removal in CameraCharacteristics" into rvc-dev 2020-05-15 18:17:04 +00:00
Eino-Ville Talvala
1a66adcc56 Merge "Camera: Update documentation for rolling shutter skew" into rvc-dev 2020-05-14 16:49:42 +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
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
ab3438ec1f Merge "Camera: Fix minor doc formatting error" into rvc-dev 2020-05-12 17:25:11 +00:00
Eino-Ville Talvala
b79cde632a Camera: Docs: Improve info on key removal in CameraCharacteristics
Test: m offline-sdk-docs
Bug: 143565873
Change-Id: I559cf028ec3540df7a851ab344072b7637913550
2020-05-11 14:29:41 -07:00
Eino-Ville Talvala
3a639682b7 Camera: Update documentation for rolling shutter skew
Existing definition was inconsistent, so update it to be consistent
and match what implementations have actually done.

Test: Builds
Bug: 150331548
Change-Id: Ied8e78a36685f3f6416e431307970db3b6191497
2020-05-11 10:24:54 -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
00f681a582 Merge "Dispatch refresh rate callbacks from DMS" into rvc-dev 2020-05-08 23:54:17 +00: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
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
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
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
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
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
f0de93d7b2 Merge "Use Arrays.hashCode in DeviceProductInfo" into rvc-dev 2020-04-24 14:24:25 +00: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
TreeHugger Robot
1a17016c70 Merge "Camera: Update physical camera request keys documentation" into rvc-dev 2020-04-23 16:39:11 +00:00
Emilian Peev
b30f4ef874 Camera: Update physical camera request keys documentation
Align physical camera request key documentation with the
camera service implementation. Specifically remove any
repeating request limitations.

Bug: 154673381
Test: Successful doc build
Change-Id: I563542e819ef57a99f762d7cfd653cced2423ebb
2020-04-22 09:11:01 -07:00
Jacky Kao
538ee89f2b Merge "Obtain correct screenshot based on device orientation" into rvc-dev 2020-04-22 00:19:35 +00:00
Jacky Kao
333de4e7c3 Obtain correct screenshot based on device orientation
When taking the screenshot, passing the width and height
of the display, and the rotation according to the current
device orientation.

Bug: 153173726
Test: a11y CTS & unit tests
Test: manual test
Change-Id: I19eea2046da282155719b1dfdf9a3f53ad95e13b
2020-04-22 00:19:12 +00:00
Nicholas Ambur
d3c1f27b0c add KeyphraseEnrollmentInfo to TestApi
KeyphraseEnrollmentInfo is used for testing the system enrollment
application support within GTS.

Bug: 153264697
Test: gts-tradefed run gts-dev -m GtsAssistIntentTestCases \
-t com.google.android.assist.gts.KeyphraseModelManagerTest# \
testAllSystemKeyphrasesAndLocales

Change-Id: I66558cf849f2815f2c917d128f9f9cc0673750ef
Merged-In: I66558cf849f2815f2c917d128f9f9cc0673750ef
2020-04-17 22:12:13 +00:00
Shuzhen Wang
f807a41008 Camera: Hook up zoom ratio in legacy camera2 shim
Map the camera2 CONTROL_ZOOM_RATIO to legacy zoomRatio in Camera.Parameters.

Test: Force Pixel 2 HAL to HAL1, and run testZoomRatioTest
Bug: 149052011
Change-Id: I888c919ae10d3e2882f3df797524a06e2b3be259
2020-04-15 18:01:29 -07:00
TreeHugger Robot
c74baf480d Merge "[RESTRICT AUTOMERGE] Add relative address to DeviceProductInfo." into rvc-dev 2020-04-14 16:30:28 +00:00
Marin Shalamanov
443c4d047a [RESTRICT AUTOMERGE] Add relative address to DeviceProductInfo.
This CL adds a field relativeAddress to DeviceProductInfo which
contains the device address in the display network. For example,
for HDMI connections the field is populated with the physical address.

Bug: 147994746
Test: adb shell dumpsys display
Change-Id: I87d9fd00bd16abc7594dc3f6b6d4e00c8968af07
2020-04-14 16:52:11 +02:00
TreeHugger Robot
72a3d44773 Merge "Camera: Fix condition check for min/max zoom ratios" into rvc-dev 2020-04-11 02:19:12 +00:00
Andrei-Valentin Onea
1775d16adb Merge "Add method to greylist" into rvc-dev 2020-04-09 11:17:11 +00:00
Andrei Onea
a8766420c6 Add method to greylist
Add Landroid/hardware/camera2/CameraMetadata;->getNativeMetadataPtr()J
to greylist so that
CameraManagerTest#testCameraCharacteristicsNdkFromSdk no longer needs
to forego hidden api checks.

Bug: 149594233
Test: atest CameraManagerTest#testCameraCharacteristicsNdkFromSdk
Test: adb install -r -g CtsCameraTestCases.apk && \
      adb  shell am instrument -e class \
	'android.hardware.camera2.cts.CameraManagerTest#testCameraCharacteristicsNdkFromSdk' \
	-w 'android.camera.cts/androidx.test.runner.AndroidJUnitRunner'
Change-Id: Ibd53dd198efc5722e20f153ef5cc9433e5b7539d
2020-04-08 19:56:52 +01:00
Shuzhen Wang
b80734fa09 Camera: Fix condition check for min/max zoom ratios
- minZoomRatio can be larger than 1.0f
- assert both min and max zoom ratios to be greater than 0.
- assert min zoom ratio to be equal or smaller than max zoom ratio.

Test: CTS on Cuttlefish camera
Bug: 153377715
Change-Id: Ia5d3f2ec7a51d4a35f199abe15a90c72cb7f3456
2020-04-06 15:30:50 -07:00
Chavi Weingarten
ae1c541a6f Merge "Added displayPosition in LogicalDisplay" into rvc-dev 2020-04-06 18:29:05 +00:00
Jacky Kao
aa8f5cb671 Merge "Supporting multi-display for takeScreenshot()" into rvc-dev 2020-04-06 09:03:42 +00:00
chaviw
945f7301f0 Added displayPosition in LogicalDisplay
Allow WindowManager to get display position from DisplayManager. This
will allow display animations to work since we need to know the initial
position of the display to correctly handle animations

Test: LogicalDisplayTest
Bug: 149490428

Change-Id: I5de2495982294ffa0437d8e87a43bf1d2fd0d86a
2020-04-03 13:51:03 -07:00
Yin-Chia Yeh
10d59c5f6d Camera: add proper null check for mRemoteDevice
Test: camera CTS
Bug: 139493594
Change-Id: Ifef9e30852056e54c5ed2c1427751a8c92c14469
2020-04-01 10:08:26 -07:00
b0202.jung
925435c18d [wm] VirtualDisplayConfig to mirror the non-default display
The application can request to mirror default display by using MediaProjection.
However, there is no way to mirror the specific display on multi-display enviroment.

Now, the application can set displayIdToMirror through VirtualDisplayConfig class.

Test: atest FrameworksServicesTests:DisplayManagerServiceTest
Bug : 127687569

Change-Id: I1ef94bfa79e103d0a4a05a10fc8705ed3bbcc0c9
2020-04-01 08:50:18 -07:00
Kevin Chyn
f825133d01 Merge "Send "early canceled" to privileged clients" into rvc-dev 2020-03-28 00:05:59 +00:00
Kevin Chyn
0a45b662b0 Send "early canceled" to privileged clients
The navigation bar dismissal animation caused by "activity finish"
should be invoked in some cases immediately when the user
cancels authentication. Add a "early user cancel" message
for ConfirmDeviceCredentialActivity to subscribe to. This
message is sent immediately when the user invokes a back gesture or
cancels authentication.

Bug: 148273355

Test: Set up work profile with separate password and biometric
      Unlock work profile
      Lock screen
      Open work profile app
      Cancel authentication at various states in various ways
      Notice no navigation bar jank

Test: atest com.android.systemui.biometrics

Change-Id: I89c5b5e2782339cae15f936268e6e7b8ad4e5359
2020-03-27 14:44:08 -07:00
Nicholas Ambur
95ee3d7ad5 Merge "remove SoundTrigger public member variables" into rvc-dev 2020-03-27 20:54:22 +00:00
Nicholas Ambur
1e43767f10 remove SoundTrigger public member variables
Bug: 150127026
Test: boot and verify soundtrigger hotword is functional

Change-Id: I04061cdb3eba02aac0f08de96f957e2b74c70a12
2020-03-26 19:44:31 +00:00
Kevin Chyn
127e3957d6 Merge changes I704914b2,I51560dfc,I866e84b2 into rvc-dev
* changes:
  Allow BIOMETRIC_CONVENIENCE to register with BiometricService
  Improve AuthService logging
  Only BIOMETRIC_STRONG HATs should be sent to KeyStore
2020-03-25 22:10:14 +00:00
Jacky Kao
316477c399 Supporting multi-display for takeScreenshot()
Creating a new API, screenshotWithoutSecureLayer(), to get the
graphic buffer of screenshot for all displays including non-default
display and virtual one. We can use it to support multi-display
of takeScreenshot() API.

Bug: 145893483
Test: a11y CTS & unit tests
Test: manual testing to take screenshot of second display which is a
monitor with chrome cast

Change-Id: I474c71f7e01d57b5a318b2a5bfb690a2e01c128c
2020-03-25 13:46:11 +08:00
TreeHugger Robot
ff57d5cba0 Merge "Camera: Add visual samples for android.control.zoomRatio" into rvc-dev 2020-03-24 18:37:39 +00:00
Kevin Chyn
0f598aa9c0 Only BIOMETRIC_STRONG HATs should be sent to KeyStore
Bug: 150014844
Bug: 141025588
Bug: 151967372

Test: Configure a device to have weak biometrics only, then
      run CtsVerifier Weak Biometrics section
Test: com.android.server.biometrics

Change-Id: I866e84b2f88c24faeaf42452d44f651ec220858a
2020-03-23 15:40:09 -07:00