For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.
Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Id00370b25af973a4b3813a4a1d6ccbd1e555c87f
Merged-In: Id00370b25af973a4b3813a4a1d6ccbd1e555c87f
Ensure the count can't cause an overflow in bytes to be read.
Test: atest CtsCameraTestCases; also add bad face count data from camera
service and manually verify the error logs appear when running
android.hardware.cts.CameraTest#testFaceDetection.
Bug: 150156131
Change-Id: Ic78ec0ccf67ef8665f80f69aabbb1ae71dd609cd
Because callbacks are called from a looper thread, if the subscriber
unsubscribes and frees the callback, invalid memory access may occur from the
looper thread.
Address this by draining all pending callbacks at the time of listener
unregistration.
NOTE: There is rare chance that the wait on the condition times out,
still resulting in the original NPE issue. We intensionally allow that
to avoid deadlock, in case the application uses the same mutex lock for
callbacks and unregister functions.
Test: for i in {1..10}; do atest -it NativeImageReaderTest; done
Test: ACameraNdkVendorTest
Bug: 148976953
Change-Id: I92f5a02a4e3e63f2e72e8043ff4f4ac16c1eec5d
To better document how android.control.zoomRatio works, add examples to
illustrate its relationship with scalerCropRegion.
Test: Build and read docs
Bug: 144780745
Change-Id: Iab0e849b4d045fc1648fcf2ddc51d84c66249273
Migrate BOKEH_MODE_STILL_CAPTURE and BOKEH_MODE_CONTINUOUS to be 2 enums
of CONTROL_EXTENDED_SCENE_MODE.
Test: Camera CTS, VTS
Bug: 151759402
Change-Id: Ie56c6403cd7b530356d3a007088e30730906ec65
Implementation is not complete yet, so hide the feature for now.
Test: Adjusted camera CTS continues to pass
Bug: 150036107
Change-Id: Ie112d21121693336c77700b982fc547f5cba429b
Duration keys may be missing if the device doesn't support
corresponding capture feature.
Test: build (log only change)
Bug: 150900659
Merged-In: I83e122ff08bc581ddd4bb7e304f152f612817875
Change-Id: I83e122ff08bc581ddd4bb7e304f152f612817875
The onCameraOpened/onCameraClosed callbacks are used to notify camera
service client with CAMERA_OPEN_CLOSE_LISTENER permission that a certain
camera device has been opened/closed.
Test: Manually check callbacks are received in SystemUI app
Bug: 150540299
Change-Id: If6f3624c43927c30afef7df0a780eafe3ae4c527
This avoids unnecessary copying of camera metadata which can get
expensive in cases of large camera metadata blobs.
Bug: 71727540
Test: GCA (sanity)
Test: Add CallStack::logStack() in CameraMetadata's move asignment
operator -> see that it gets called for every insertResultLocked.
Change-Id: I6c75c7ce5267126916c865b028e5f7c7f50b763b
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
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 to use std::shared_ptr internally
- Switch ACameraMetadata to use std::shared_ptr internally
- Always copy data in the ACameraMetadata copy constructor
Test: New CTS tests pass, fail without this CL
Bug: 148972471
Change-Id: I40a0ccb8b40c7a89ee7d3a6f7bac7c9c88d709f1
Also fixed missing implementation of Camera availability callbacks for
ExtendedAvailabilityCallback.
Test: Camera CTS, and vndk test
Bug: 148146086
Change-Id: I557d6db3900b2346b7bc7e12cd946bc4c2dc4076
Clients needing to differentiate between system/vendor used to be able
to use isServingCall. However, this was expensive to implement. This
alternative approach instead requires users of this API to use
libbinderthreadstateutils which does a slighty different operation.
Bug: 148692216
Test: atest VtsHalCameraServiceV2_0TargetTest
Test: running AImageReaderVendorTest
Test: try face unlock
Change-Id: I5615f4e8863487d0de8dad2d0529214750897036
Root cause was that jclass instances acquired from JNIEnv::FindClass are
not pinned and become invalidated due to Java garbage collection. Adding
a new global ref pins the pointer.
FIXED=148174094
Test: atest android.hardware.camera2.cts.CameraManagerTest#testCameraCharacteristicsNdkFromSdk android.hardware.camera2.cts.CaptureResultTest#testCameraCaptureResultAllKeys
Test: atest NativeCameraDeviceTest NativeCameraManagerTest NativeImageReaderTest NativeStillCaptureTest
Change-Id: Id0601b9c01e1a58485e3b039a87a5cf56a19e0af
- getConcurrentStreamingCameraIds() :
returns a list of combinations of camera ids that may stream
concurrently.
- isConcurrentSessionConfigurationSupported() :
queries whether camera devices can support the
corresponding given session configurations concurrently.
Bug: 77960042
Test: GCA (sanity)
Test: CTS
Change-Id: Iba237118ccf145695a500a2c406713e416e66011
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
The new provider callback version enables availability callback for
physical camera.
Test: Camera CTS
Bug: 119325027
Change-Id: I22e0b669c3d9891a431e1befc7f1c9f40b826a08
Camera clients must be aware of any configured streams
that can support offline processing mode.
A few corner cases that need to be considered:
- Composite streams can support offline mode only
when all internal streams support it as well.
- Streams that use the internal camera buffer manager
will not have support for offline mode.
- Shared streams are also unsupported in offline mode.
Bug: 135142453
Test: Camera CTS
Change-Id: Idde826a6fb18a8907850e87cfe593de7cb1c5f4a
Specifically, publicly commit to UNKNOWN being CLOCK_MONOTONIC, though
with loose accuracy guarantees.
Also document how to handle REALTIME timestamps for A/V sync purposes.
Test: Builds, docs-only change
Change-Id: I600b553c38f1b3490879630ae90d207bed0277b5
To better document the cropping specification for camera2, add diagrams
from source.android.com into the reference docs as well.
Test: Docs build, look correct
Change-Id: I624dac7dbdc9146fbb89ab57cf6fda4ae03c1214
- Add NDK API spec for the new zoom API
The new zoom API combines optical and digital zoom, and supports both
zoom-out and zoom-in with more precision.
- Add new NDK API to specify separate zoom ratio ranges for different
bokeh modes.
- Add ZoomRatioMapper in camera service to convert between
control.zoomRation to and from scaler.cropRegion.
Test: Camera CTS/ITS/CtsVerifier/ZoomRatioTest
Bug: 130025314
Change-Id: I4c7d867f840b5720bc73bb0485e8a9a93d2276b5
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: Idfb8f8049dff536525d4f081151c79d980d76c69
Introduce new bokeh mode metadata tags for camera device to enable bokeh
effect.
Test: Build and read docs
Bug: 118258123
Change-Id: Iadd7c2a0edcafc516411a5a5f49ad0563e3736be
We call disconnectLocked before stopping CameraDevice's looper, in order to avoid this situation:
1) Its possible that an OnResultReceived callback is received, and posts an
AMessage with sp<ACameraCaptureSession> on CameraDevice's looper.
2) Before the looper message is processsed, ACameraDevice_close() is
called by the client, which results in the looper being stopped and
cleared with device lock held.
3) When the looper is getting cleared, the AMessage containg the
ACameraCaptureSession pointer is destructed leading to
~ACameraCaptureSession running without knowing that the device is
being closed, as a result it tries to hold device lock, resulting in
a deadlock.
Bug: 141603005
Test: CTS native tests
Test: use camera2 vndk client for extended periods of time
Change-Id: Ia0d47fc2975981055cd1f2103c1cbe8d76642fe4
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>