i) Fix documentation formatting errors converting a
major part of the documentation into a link.
ii) Remove the DEVICE_ORIENTATION type documentation. Its
a hidden sensor type, and links to the sensor fail.
Test: Compile build, generate docs, visually verify change.
Change-Id: I2659d18e35b60f5939ba18c6b3d752a990621447
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.
Test: runtests frameworks-core
Test: Turn vr mode on and change brightness (should remain separate from
normal brightness)
Bug: 30984614
Change-Id: If3c3e81b592e0c6fd037e5783559683e5cb58379
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.
Bug: 30984614
Change-Id: Ie5578bbd6ea346f0eb34fe4abbfd604a5d7c0c93
Move ContextHub service from system core to a more appropriate place
for a service.
Test: GTS tests pass.
Change-Id: Ie0f25414fc472a0214c0dd94e7ad4564cd38f842
- For all camera2 paths, and anything shared between the legacy API and
camera2, switch to using String for camera IDs.
- Remove assumption that camera device IDs must be a dense set of small
integers, and rewrite the camera ID query methods
- Change operation of ICameraService.addListener: it now returns the list of
available devices directly, instead of invoking callbacks. This is
needed to ensure an up-to-date list of cameras is immediately available
on connection to the camera service.
- Add new CameraStatus object to use as the addListener return value
- Update tests to work with new interface
Test: cts-tradefed run cts -m Camera --skip-connectivity-check -d -o --abi armeabi-v7a --disable-reboot
Bug: 32991422
Change-Id: I6ff4a5dd014c6aefe0750850eeece6f3267a3e5b
Functionfs requires MtpServer to write descriptors before the device can be
configured. This adds a new configure call that will occur only when
functions are changed (new argument added to updateUsbStateBroadcast for this)
and be called after sys.usb.config is changed but before the waitForState
call to ensure compatibility with configfs devices.
Bug: 30976142
Change-Id: I7e94a5847d3b19c0fd75139e1b15a3f2a1cea01d
Test: Manual
We had overriding of PRIVATE format scattered at multiple places.
Consolidate them into one place.
Test: Camera preview/capture, and camcorder recording
Change-Id: I098ce93bba2000760a20c0297fcf0cb9d8c6caab
Like the other capture session creation methods,
createCaptureSessionByOutputConfigurations() will happily take a null
handler.
Test: Compiles
Change-Id: I702a0761e40207ca5143ad69f5d8694c45f27561
Test: Get locked out, make sure wake-and-unlock is working
again after 30 seconds.
Change-Id: I2fb03775898c0567f058d6d9d0b963ed071cc786
Fixes: 32946531
This gets rid of an extraneous configuration change when going from
adb to adb + file transfer as previously the config would have been
reset once for functions and once for data unlocked.
It also simplifies some of the code.
Test: manually changing usb configurations
Change-Id: Ica10a195338b2189db13113f44657393db110bee
(cherry picked from commit 7a396be6d5)
More progress towards removing blocking calls to improve system
stability.
Test: builds, boots
Bug: 32715088
Change-Id: I5ab2d2687f4f47e0ee68105c6998e74798af061c
To protect system stability, any Binder calls leaving the
system_server must carefully be performed using FLAG_ONEWAY (or
the 'oneway' verb in AIDL) which prevents the call from blocking
indefinitely on the remote process.
In this CL, the system_server uses the new Binder.setWarnOnBlocking()
method to enable detection by default for all remote Binder
interfaces. It can also use Binder.allowBlocking() to allow
blocking calls on certain remote interfaces that have been
determined to be safe.
This CL adds the 'oneway' verb to several interfaces and methods
where it should have been added, and marks a handful of system
ContentProviders as being safe to call into. Also, we assume that
any services obtained from ServiceManager are part of the core
OS, and are okay to make blocking calls to.
Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: Ide476e120cb40436a94b7faf7615c943d691f4c0
Refactor code to avoid a return statement inside a finally block. Such
constructs interfere with exception propagation in non-obvious ways
and are therefore considered bad practice.
Bug: 32586420
Test: manual code walk
Meaning: Read/Write to correct area in buffer, set position correectly.
- Create a new method UsbRequest#enqueue that has correct behavior, deprecate
UsbRequest#queue.
- Move all description of the weird (legacy) UsbRequest#queue behavior to
this method.
Change-Id: Ibeed400b4ad2aa9d005ace345c7895a3dc4ba1ad
Fixes: 31050148
Test: Submitted alongside
onCaptureQueueEmpty indicates that the non-repeating
capture request queue of camera device is empty, and
is ready to process a new request.
Test: testMultipleCapture in PerformanceTest.java
Bug: 29006447
Change-Id: If245ff6abf352548ca13a10fcfbd1550b92c1224
This gets rid of an extraneous configuration change when going from
adb to adb + file transfer as previously the config would have been
reset once for functions and once for data unlocked.
It also simplifies some of the code.
Test: manually changing usb configurations
Change-Id: Ica10a195338b2189db13113f44657393db110bee
The USB data transfer is disabled we should not allow access MTP devices
(e.g.
usb sticks). We have two ways of accessing them: Either by mounting them
or by creating a MTPDevice in an app.
Of course an app could implement implement their own MTPDevice
implementation. In this case we cannot enforce the policy without
completely suppressing all MTP USB devices which would be too
restrictive.
Note: When the policy is set we do _not_ disconnect already connected
MTP devices
Fixes: 31472955
Change-Id: I6080c48c49657102774b2b3b4d89ff030245a266
This is obviously just about describing a bad behavior. In the next step
these methods should be deprecated and replaced with versions that deal
with ByteBuffers appropriately.
Bug: 31050148
Test: Test that enshrines the documented behavior is submitted alongside
this change
Change-Id: If250a8bbd636784355e839a1638d52f3bbe9b83d
The static initializer for a pre-loaded framework class is run
no later than at zygote startup, which happens at device boot.
Which means that if the timezone later changes, DngCreator will use
an incorrect cached timezone until the next reboot. This is especially
evident in freshly wiped devices, where initial setup will typically
change the timezone.
Instead, read the timezone each time DngCreator is created, which is
also when we query the current time for constructing the timestamps.
Test: android.hardware.camera2.cts.DngCreatorTest#testSingleImageThumbnail
Bug: 31743060
Change-Id: I83a4eac762650e5f904f3b8fa779c094cef30562
The NanoApp.java class has a bug (b/30808791) where the API treats
app IDs as 32-bits, instead of 64-bits. We are too late in the
Android N release cycle to change this API.
We previously put in a hack to fix this only for Google nanoapps.
However, our GTS nanoapps need this to work, and there are other
partners who need this to work in the N timeframe. So we make
a more robust hack which parses the full 64-bit app ID out of
the header binary.
Test: Compiles and runs GTS
Bug: 31767599
Change-Id: Ic43f1f62c685fb99aac08d08767d1a67c329503f
- Do not allow negative length as inside of JNI this is interpreted as
unsigned value which lead to memory corruptions.
- Document behavior for uncommon but usable values of parameters
Test: Ran CTS verifier UBS device test
Change-Id: I0899a2831c6dd2617528a5e79ea21932f6a66c13