Status Update
Comments
er...@google.com <er...@google.com> #2
Thanks for reporting this. We will investigate this and get back to you once we have an update.
er...@google.com <er...@google.com> #3
Branch: androidx-main
commit 5dd50789a7bbcba846f41e4265bd5411fb542b02
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Wed Dec 21 17:16:55 2022
Fixed "clickable" modifier doesn't work with ImmersiveList
* In the "focusableItem" modifier, we add a "focusable" modifier. Now, if the user adds the "clickable" modifier, the
"focusable" modifier added by us has no effect. So, we are now removing the "focusable" modifier
from it. Now, user will have to manually add "focusable()" or "clickable()" along with
"focusableItem". Since this is an immersive list item, ideally, the item will always be clickable.
* Renamed "focusableItem" modifier to "immersiveListItem" modifier which is a better name for the new API and also this
makes it clear, while reading, that this modifier is only part of "ImmersiveList" and also makes
doesn't hint that "focusable()" modifier would be auto-applied
* Moved the immersive list component out of the sub-package
* Added missing ktdocs for params
* Added sample immersive list usage
Bug:
Test: Updated tests
Relnote: "Renamed `focusableItem` to `immersiveListItem` and removed `focusable()` modifier. Now
users will have to manually add `focusable()` or `clickable()` modifier along with
`immersiveListItem`"
Change-Id: I1fd6c8cca3d7f4e810ad838ec1aad0b3c3e41450
M tv/integration-tests/demos/src/main/java/androidx/tv/integration/demos/ImmersiveList.kt
A tv/samples/src/main/java/androidx/tv/samples/ImmersiveListSamples.kt
M tv/tv-material/api/current.txt
M tv/tv-material/api/public_plus_experimental_current.txt
M tv/tv-material/api/restricted_current.txt
M tv/tv-material/src/androidTest/java/androidx/tv/material/ImmersiveListTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/ImmersiveList.kt
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #4
The issue has been fixed and merged to Android Open Source Project. The fix should be available in the next tv-compose release (Version: 1.0.0-alpha04).
Closing this ticket. Feel free to re-open in case of any issues.
Thanks 😀
ch...@google.com <ch...@google.com>
vi...@gmail.com <vi...@gmail.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
ch...@google.com <ch...@google.com> #6
This issue happened on devices that the display size is smaller than 640x480. In original auto-resolution mechanism, supported sizes smaller than 640x480 will be default filter out.
The auto-resolution mechanism encodes the guaranteed configurations tables in CameraDevice#createCaptureSession(SessionConfiguration). It defines that the PREVIEW size is the small one of the device display size and 1080p. The PREVIEW size will be the maximal size limitation for Preview use case. The reason it limits the size to display size and 1080p is the stream output in display size or 1080p has been able to provide good enough preview quality. Therefore, auto-resolution mechanism will limit the selected size to be smaller than the small one of the device display size and 1080p.
With above two conditions, in this issue, all sizes smaller than 640x480 have been filter out, therefore, there is no size smaller than the display size 320x240 can be selected to use. And cause the exception.
Solution:
When the display size is smaller than 640x480, auto-resolution mechanism won't filter out those small sizes smaller than 640x480. This makes those small size be left and can be selected for the Preview use case on small display devices.
The solution has been merged and will be included in next CameraX release.
vi...@gmail.com <vi...@gmail.com> #7
Hello.
This crash still occurs.
- CAMERAX VERSION: 1.0.0-beta4
- ANDROID OS BUILD NUMBER: Android 7.1.1
- DEVICE NAME: FUJITSU F-02H
We receive following crash report from FUJITSU F-02H. So far We have received this crash report only from F-02H.
java.lang.IllegalArgumentException
Can not get supported output size under supported maximum for the format: 34
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes (SupportedSurfaceCombination.java:349)
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions (SupportedSurfaceCombination.java:197)
androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions (Camera2DeviceSurfaceManager.java:198)
androidx.camera.core.CameraX.calculateSuggestedResolutions (CameraX.java:949)
androidx.camera.core.CameraX.bindToLifecycle (CameraX.java:351)
androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle (ProcessCameraProvider.java:230)
(our application's package name).CameraFragment.bindCameraUseCases (CameraFragment.java:174)
ch...@google.com <ch...@google.com> #8
Could you help to provide the following information to clarify the issue?
1. Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
2. Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
vi...@gmail.com <vi...@gmail.com> #9
- Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
Yes
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
Since we don't have this device, we'll try to collect this information in the next version of our app. The next version will be released later this month.
vi...@gmail.com <vi...@gmail.com> #10
Hello.
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
We have collected the output of the device where the crash occurs.
Device1
- Model : arrows Be F-05J
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Device2
- Model : Fujitsu arrows M04
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Additional Information
CameraX version : 1.0.0-beta04
We collect the supported output sizes by following code.
val errorString = buildString {
append("The supported output sizes of ImageFormat.PRIVATE: ")
(requireContext().getSystemService(Context.CAMERA_SERVICE) as CameraManager).apply {
cameraIdList.forEachIndexed { index, cameraId ->
val msg = if (VERSION.SDK_INT >= VERSION_CODES.M) {
val configurationMap =
getCameraCharacteristics(cameraId).get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)
val sizes = configurationMap?.getOutputSizes(ImageFormat.PRIVATE)
"CameraId $index: ${sizes?.joinToString(" ,")}"
} else {
"CameraId $index: This device version is under M."
}
append(msg)
}
}
}
vi...@gmail.com <vi...@gmail.com> #11
ch...@google.com <ch...@google.com> #12
I tried to find the device specs and both 720x1280
size display. For the camera id 0 device, it is a different case that the display size is larger than 640x480
but the device only supports a 480x480
size. The case also caused the same IllegalArgumentException and was also fixed by 1.0.0-beta04
release. Before 480x480
size would be filtered out and then caused the IllegalArgumentException. After it was merged, the 640x480
size threshold was removed and then the 480x480
size would be kept and selected to use.
It looks like 1.0.0-beta04
release had been used to collect the supported sizes information. But the issue should have been fixed by 1.0.0-beta04
release. Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
CameraX's 1.0.0-beta04
version. Maybe you can also consider to upgrade to the latest 1.0.0-rc01
version for your application. Thanks.
vi...@gmail.com <vi...@gmail.com> #13
Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
We collect informations only from the device on which IllegalArgumentException happened.
Our latest app uses CameraX version 1.0.0-beta10
and this issue still occurres.
However we don't receive crash report from Fujitsu arrows Be F-05J
or Fujitsu arrows M04
so far. (This doesn't mean this issue is fixed on these devices because our app is heavily rely on camera so these device's user wouldn't use our app anymore.)
Instead, we receive crash report from
- Model : Fujitsu F-03K
- Android Version : 7.1.2
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0 : 480x480
CameraId 1 : 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
ch...@google.com <ch...@google.com> #14
I missed some settings when I simulated the issue by robolectric test so that I was not able to reproduce it. Now, I can reproduce the issue if the device only supports one 480x480 resolution. I'm working on the solution and target to make it included in next release.
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit 69d15dff7bb857ee33a0f643ff42a0f8bc475ab2
Author: charcoalchen <charcoalchen@google.com>
Date: Fri Jan 08 18:30:03 2021
Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Do not filter out sizes smaller than 640x480 when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Relnote:"Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480."
Bug: 150506192
Test: SupportedSurfaceCombinationTest
Change-Id: I2a63ce8e2ad42a9cc060c8635ac3603bf440b1ec
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/SupportedSurfaceCombination.java
M camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.java
Description
1.0.0-alpha07
DEVICE NAME: (Nexus 5X, Samsung S6, etc)
name : FUJITSU arrowsM04
Android OS version : 7.1.1
name: FUJITSU F-04J
Android OS version : 6.0.1
name: FUJITSU F-05J
Android OS version : 7.1.1
DESCRIPTION:
We receive following crash report from our app user.
Fatal Exception: java.lang.IllegalArgumentException: Can not get supported output size under supported maximum for the format: 34
at a.c.a.b.k0.a + 98(SupportedSurfaceCombination.java:98)
at a.c.a.b.k0.a + 30(SupportedSurfaceCombination.java:30)
at a.c.a.b.t.a + 22(Camera2DeviceSurfaceManager.java:22)
at androidx.camera.core.k1.a + 98(CameraX.java:98)
at androidx.camera.core.k1.a + 22(CameraX.java:22)
at a.c.b.c.a + 6(ProcessCameraProvider.java:6)
at <out app package name>.CameraFragment.a + 33(CameraFragment.kt:33)
at <out app package name>.CameraFragment.a + 1(CameraFragment.kt:1)
at <out app package name>.CameraFragment$m.run + 1(CameraFragment.kt:1)
at android.os.Handler.handleCallback + 751(Handler.java:751)
at android.os.Handler.dispatchMessage + 95(Handler.java:95)
at android.os.Looper.loop + 154(Looper.java:154)
at android.app.ActivityThread.main + 6262(ActivityThread.java:6262)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 890(ZygoteInit.java:890)
at com.android.internal.os.ZygoteInit.main + 780(ZygoteInit.java:780)
REPRODUCIBILITY: (5 of out 5, 1 out of 100, etc)
We receive this crash report from only three devices. And these devices's manufacturer is FUJITSU.
ADDITIONAL INFORMATION:
CODE FRAGMENTS (this will help us troubleshoot your issues):
Our app bind usecases by following code.
private fun bindCameraUseCases(processCameraProvider: ProcessCameraProvider) {
preview = Preview.Builder().apply {
setTargetAspectRatio(AspectRatio.RATIO_4_3)
}.build().apply {
previewSurfaceProvider = binding.previewViewCamera.previewSurfaceProvider
}
imageCapture = ImageCapture.Builder().apply {
setCaptureMode(ImageCapture.CaptureMode.MINIMIZE_LATENCY)
setTargetAspectRatio(AspectRatio.RATIO_4_3)
setFlashMode(FlashMode.OFF)
}.build()
val cameraSelector = CameraSelector.Builder().requireLensFacing(LensFacing.BACK).build()
processCameraProvider.bindToLifecycle(viewLifecycleOwner, cameraSelector, preview, imageCapture)
}