Fixed
Status Update
Comments
wu...@google.com <wu...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
https://android-review.googlesource.com/1360099
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
qw...@gmail.com <qw...@gmail.com> #3
Hello, yeah we have had this crash for three devices so far
* Motorola moto g(9) play - Android 11
* CUBOT NOTE 7 - Android 10
* JOYAR 100011886A - Android 11
* Motorola moto g(9) play - Android 11
* CUBOT NOTE 7 - Android 10
* JOYAR 100011886A - Android 11
qw...@gmail.com <qw...@gmail.com> #4
Hello, is there any update on this issue?
er...@google.com <er...@google.com> #5
Hello,
Our team has just tagged your issue and will be looked at soon. We will update once we do so.
wu...@google.com <wu...@google.com>
we...@google.com <we...@google.com>
qw...@gmail.com <qw...@gmail.com> #6
Hi,
I would really appreciate it if you could help me with that issue. We have 11 users that have had this issue so far.
I would really appreciate it if you could help me with that issue. We have 11 users that have had this issue so far.
we...@google.com <we...@google.com> #7
Hi, qwaskhaled@, thanks for your report&info.
A quick update about this issue, we already noticed some possible reasons that could cause this issue. It seems that the device reports the capability is different from the video encoder.
It causes some specific resolution/device to fail to initialize the encoder, we already take it as priority.
A quick update about this issue, we already noticed some possible reasons that could cause this issue. It seems that the device reports the capability is different from the video encoder.
It causes some specific resolution/device to fail to initialize the encoder, we already take it as priority.
we...@google.com <we...@google.com> #8
qwaskhaled@, we are working on the workaround for the compatibility issue.
We probabily may need to set customized parameters for specific devices since the issue could come from different causes.
Would you be able to get a full log from the devices that had this issue?
We probabily may need to set customized parameters for specific devices since the issue could come from different causes.
Would you be able to get a full log from the devices that had this issue?
qw...@gmail.com <qw...@gmail.com> #9
Hi,
I don't understand what you meant by a full log. I have another report so I will share it.
Fatal Exception: java.lang.IllegalStateException
Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
androidx.camera.video.Recorder.onSurfaceRequested (Recorder.java:406)
androidx.camera.video.VideoCapture.createPipeline (VideoCapture.java:416)
androidx.camera.video.VideoCapture.resetPipeline (VideoCapture.java:482)
androidx.camera.video.VideoCapture.lambda$createPipeline$0$VideoCapture (VideoCapture.java:433)
androidx.camera.video.-$$Lambda$VideoCapture$6BBmhv2eFVUcrkw2nD0ve39oNMM.onError (Unknown Source:10)
androidx.camera.camera2.internal.Camera2CameraImpl.lambda$postSurfaceClosedError$13 (Camera2CameraImpl.java:1153)
androidx.camera.camera2.internal.-$$Lambda$Camera2CameraImpl$EQgjyk5vUNeY9hNKpGr93fYzUDE.run (Unknown Source:4)
android.os.Handler.handleCallback (Handler.java:873)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:6865)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:504)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)
I don't understand what you meant by a full log. I have another report so I will share it.
Fatal Exception: java.lang.IllegalStateException
Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
androidx.camera.video.Recorder.onSurfaceRequested (Recorder.java:406)
androidx.camera.video.VideoCapture.createPipeline (VideoCapture.java:416)
androidx.camera.video.VideoCapture.resetPipeline (VideoCapture.java:482)
androidx.camera.video.VideoCapture.lambda$createPipeline$0$VideoCapture (VideoCapture.java:433)
androidx.camera.video.-$$Lambda$VideoCapture$6BBmhv2eFVUcrkw2nD0ve39oNMM.onError (Unknown Source:10)
androidx.camera.camera2.internal.Camera2CameraImpl.lambda$postSurfaceClosedError$13 (Camera2CameraImpl.java:1153)
androidx.camera.camera2.internal.-$$Lambda$Camera2CameraImpl$EQgjyk5vUNeY9hNKpGr93fYzUDE.run (Unknown Source:4)
android.os.Handler.handleCallback (Handler.java:873)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:6865)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:504)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)
we...@google.com <we...@google.com> #10
Hi, thanks for your reply.
We are looking for some error messages that could be shown a little bit before the crash point.
Could you provide a bugreport that is dumped right after the crash? The report should contain information to clarify the caues of this symptom.
We are looking for some error messages that could be shown a little bit before the crash point.
Could you provide a bugreport that is dumped right after the crash? The report should contain information to clarify the caues of this symptom.
qw...@gmail.com <qw...@gmail.com> #11
Hi,
I don't have this issue on my of my devices. I only attached reports from the Play console for users that had it. If there is any way I can help to collect these reports then please share with me the steps so I can start.
I don't have this issue on my of my devices. I only attached reports from the Play console for users that had it. If there is any way I can help to collect these reports then please share with me the steps so I can start.
we...@google.com <we...@google.com> #12
Ah, as far as I know, the app console doesn't collect the bugreport for analysis.
We will try to get devices for testing, please feel free to report if you see any other device model get the similar symptom. Thanks!
We will try to get devices for testing, please feel free to report if you see any other device model get the similar symptom. Thanks!
qw...@gmail.com <qw...@gmail.com> #13
Hi, we have it too for these devices.
Brand:INFINIX MOBILITY LIMITED
Model:SMART
Version:Android 10
Brand:TEM
Model:X40
Version:Android 9
Brand:HYUNDAI
Model:E504
Version:Android 8.1.0
I haven't heard of these brands.
Brand:INFINIX MOBILITY LIMITED
Model:SMART
Version:Android 10
Brand:TEM
Model:X40
Version:Android 9
Brand:HYUNDAI
Model:E504
Version:Android 8.1.0
I haven't heard of these brands.
we...@google.com <we...@google.com> #14
Yeah, thanks for your info! That's really helpful. We will try to get more info for these devices.
[Deleted User] <[Deleted User]> #15
Same crash on
Brand: LEAGOO
Model: t5c
Version:Android: 7.0
happening when calling cameraProvider.bindToLifecycle(this, cameraSelector, preview, VideoCapture.withOutput(recorder)). Works fine without VideoCapture.
java.lang.IllegalStateException: Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
at androidx.camera.video.Recorder.onSurfaceRequested(Recorder.java:406)
at androidx.camera.video.VideoCapture.createPipeline(VideoCapture.java:416)
at androidx.camera.video.VideoCapture.resetPipeline(VideoCapture.java:482)
at androidx.camera.video.VideoCapture.lambda$createPipeline$0$VideoCapture(VideoCapture.java:433)
at androidx.camera.video.VideoCapture$$ExternalSyntheticLambda0.onError(Unknown Source)
at androidx.camera.camera2.internal.Camera2CameraImpl.lambda$postSurfaceClosedError$14(Camera2CameraImpl.java:1175)
at androidx.camera.camera2.internal.Camera2CameraImpl$$ExternalSyntheticLambda7.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6174)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:869)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
Brand: LEAGOO
Model: t5c
Version:Android: 7.0
happening when calling cameraProvider.bindToLifecycle(this, cameraSelector, preview, VideoCapture.withOutput(recorder)). Works fine without VideoCapture.
java.lang.IllegalStateException: Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
at androidx.camera.video.Recorder.onSurfaceRequested(Recorder.java:406)
at androidx.camera.video.VideoCapture.createPipeline(VideoCapture.java:416)
at androidx.camera.video.VideoCapture.resetPipeline(VideoCapture.java:482)
at androidx.camera.video.VideoCapture.lambda$createPipeline$0$VideoCapture(VideoCapture.java:433)
at androidx.camera.video.VideoCapture$$ExternalSyntheticLambda0.onError(Unknown Source)
at androidx.camera.camera2.internal.Camera2CameraImpl.lambda$postSurfaceClosedError$14(Camera2CameraImpl.java:1175)
at androidx.camera.camera2.internal.Camera2CameraImpl$$ExternalSyntheticLambda7.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6174)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:869)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
qw...@gmail.com <qw...@gmail.com> #16
Hi, is this issue fixed in the last beta release?
qw...@gmail.com <qw...@gmail.com> #17
Hello. Any update?
wu...@google.com <wu...@google.com> #18
Hello, thanks for asking again. This is in progress now. We will need more time to get this problem fixed. Thanks for your patience and we will keep you posted once it's fixed!
we...@google.com <we...@google.com> #19
Hi, We already phase in an improvement for the devices that report incorrect codec information. The crash will be redirected to an error signal in the later update.
qw...@gmail.com <qw...@gmail.com> #20
That's better. Thanks
wu...@google.com <wu...@google.com>
ap...@google.com <ap...@google.com> #21
Project: platform/frameworks/support
Branch: androidx-main
commit f0da105e43d71749c70f142fb6979f710f5b74db
Author: leo huang <leohuang@google.com>
Date: Thu Mar 03 20:50:34 2022
Retry setting video encoder when starting video recording
Recorder may fail to set video encoder in the initial state and enter an error state. One case is when the codec resource is occupied by a previous Recorder that is in a releasing state, or even occupied by another process. This change will try to reconfigure the video encoder when the recording request is made.
Relnote: "Fixed a crash when the Recorder encountered an InvalidConfigException. However, this fix only prevents app from crashing, but doesn't resolve the cause of the InvalidConfigException. If the Recorder still cannot be configured, applications will receive error callback when it starts recording."
Bug: 200359121
Bug: 213617227
Test: ./gradlew camera:camera-video:connectedAndroidTest
Change-Id: I89c295716c6228c47f8bdadefef8336c9c058bd3
A camera/camera-video/src/main/java/androidx/camera/video/internal/encoder/EncoderFactory.java
M camera/camera-video/src/main/java/androidx/camera/video/VideoCapture.java
M camera/camera-video/src/main/java/androidx/camera/video/Recorder.java
M camera/camera-video/src/main/java/androidx/camera/video/StreamInfo.java
M camera/camera-video/src/androidTest/java/androidx/camera/video/RecorderTest.kt
https://android-review.googlesource.com/1996232
Branch: androidx-main
commit f0da105e43d71749c70f142fb6979f710f5b74db
Author: leo huang <leohuang@google.com>
Date: Thu Mar 03 20:50:34 2022
Retry setting video encoder when starting video recording
Recorder may fail to set video encoder in the initial state and enter an error state. One case is when the codec resource is occupied by a previous Recorder that is in a releasing state, or even occupied by another process. This change will try to reconfigure the video encoder when the recording request is made.
Relnote: "Fixed a crash when the Recorder encountered an InvalidConfigException. However, this fix only prevents app from crashing, but doesn't resolve the cause of the InvalidConfigException. If the Recorder still cannot be configured, applications will receive error callback when it starts recording."
Bug: 200359121
Bug: 213617227
Test: ./gradlew camera:camera-video:connectedAndroidTest
Change-Id: I89c295716c6228c47f8bdadefef8336c9c058bd3
A camera/camera-video/src/main/java/androidx/camera/video/internal/encoder/EncoderFactory.java
M camera/camera-video/src/main/java/androidx/camera/video/VideoCapture.java
M camera/camera-video/src/main/java/androidx/camera/video/Recorder.java
M camera/camera-video/src/main/java/androidx/camera/video/StreamInfo.java
M camera/camera-video/src/androidTest/java/androidx/camera/video/RecorderTest.kt
le...@google.com <le...@google.com> #22
Hi Reporter,
We have a solution to fix the crash and an improvement
They will be included in the next release (versions greater than 1.1.0-beta02
) so please stay tune. You can find release information
Feel free to open a bug if you still encounter any issues. Thanks.
Description
Fatal Exception: java.lang.IllegalStateException
Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
androidx.camera.video.Recorder.onSurfaceRequested (Recorder.java:406)
androidx.camera.video.VideoCapture.createPipeline (VideoCapture.java:416)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:980)
CAMERAX VERSION (1.1.0-alpha12)
ANDROID OS BUILD NUMBER: Android 10
DEVICE NAME: CUBOT NOTE &
STEPS TO REPRODUCE:
We don't know
REPRODUCIBILITY
We don't know