Status Update
Comments
il...@google.com <il...@google.com>
tr...@gmail.com <tr...@gmail.com> #2
Note for dev team to check: If this isn't an error, CameraX should not log.
a....@gmail.com <a....@gmail.com> #3
Hello,
Thanks for filing this issue, this issue can be safely ignored - we have a todo for removing unnecessarily logging. This should be fixed shortly.
If there are other issues, please let us know.
sj...@gmail.com <sj...@gmail.com> #5
Branch: androidx-master-dev
commit 404aab04fc5ede6314fa93ff7b62431f9646e0e9
Author: Trevor McGuire <trevormcguire@google.com>
Date: Mon Apr 20 15:49:47 2020
Switch "Failed to set already detached use case online" to debug log
This can occur if the use case is detached before the camera's thread
has a chance to add the use case to the capture session. This should
not affect normal operation, so this error log message can be changed
to a debug log.
Relnote: "Converted error log related to detached use case to a debug log on Camera2CameraImpl."
Test: ./gradlew bOS
Bug: 154422490
Change-Id: I1a565e55af6e63792287221f8cbd9e7747fd6875
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraImpl.java
sa...@google.com <sa...@google.com>
ap...@google.com <ap...@google.com> #6
Can this log error message also be safely ignored?
Failed to set already detached use case online
[Deleted User] <[Deleted User]> #7
Sorry, I meant this one:
Failed to set already detached use case active
[Deleted User] <[Deleted User]> #8
Yes, it can be safely ignored. I will switch it to a debug log as well.
[Deleted User] <[Deleted User]> #9
Branch: androidx-master-dev
commit 0cff18a13097a05812b60c8bfb7968baf79464b4
Author: Trevor McGuire <trevormcguire@google.com>
Date: Mon Apr 27 11:52:06 2020
Switch "Failed to set already detached use case active" to debug log
This can occur if the use case is detached before the camera's thread
has a chance react to the use case being marked active. This should
not affect normal operation, so this error log message can be changed
to a debug log.
Bug: 154422490
Test: ./gradlew bOS
Change-Id: I2a99128be65c03af955753c230cb798789f8769f
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraImpl.java
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit e9afa3a28b32897fef6717fea079c6296f3a2e5a
Author: sanura <sanura@google.com>
Date: Tue Apr 25 01:07:17 2023
Create LifecycleEventEffect composable
Adding LifecycleEventEffect composable API to
be used when running SideEffects based on a
particular Lifecycle.Event.
RelNote: "`LifecycleEventEffect` API has been
added to run side effects based on `Lifecycle.Event`."
Test: LifecycleEventEffectTest
Bug: 235529345
Change-Id: Ic9794d7e59b1a66cc7f31cbaebed9b3d3dee5dd3
M lifecycle/lifecycle-runtime-compose/api/current.txt
M lifecycle/lifecycle-runtime-compose/api/public_plus_experimental_current.txt
M lifecycle/lifecycle-runtime-compose/api/restricted_current.txt
M lifecycle/lifecycle-runtime-compose/src/androidTest/java/androidx/lifecycle/compose/CollectAsStateWithLifecycleTests.kt
A lifecycle/lifecycle-runtime-compose/src/androidTest/java/androidx/lifecycle/compose/LifecycleEffectTest.kt
M lifecycle/lifecycle-runtime-compose/src/androidTest/java/androidx/lifecycle/compose/LifecycleExtTest.kt
A lifecycle/lifecycle-runtime-compose/src/main/java/androidx/lifecycle/compose/LifecycleEffect.kt
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit 25a2002ab933ea551295483aa3f7e278d60dbe75
Author: sanura <sanura@google.com>
Date: Wed May 03 20:20:56 2023
Create LifecycleResumeEffect composable
Adding LifecycleResumeEffect composable API to be used when
running SideEffects based on ON_RESUME/ON_PAUSE event callbacks.
RelNote: "`LifecycleResumeEffect` API has been added to run side
effects based on both `Lifecycle.Event.ON_RESUME` and
`Lifecycle.Event.ON_PAUSE` event callbacks."
Test: lifecycleResumeEffectTest
Bug: 235529345
Change-Id: I603860f21eb6a433c909d7ae6f8120f6d23179aa
M lifecycle/lifecycle-runtime-compose/api/current.txt
M lifecycle/lifecycle-runtime-compose/api/public_plus_experimental_current.txt
M lifecycle/lifecycle-runtime-compose/api/restricted_current.txt
M lifecycle/lifecycle-runtime-compose/src/androidTest/java/androidx/lifecycle/compose/LifecycleEffectTest.kt
M lifecycle/lifecycle-runtime-compose/src/main/java/androidx/lifecycle/compose/LifecycleEffect.kt
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit 2b090a54b8182927eb0e96062e0a14d065a8561a
Author: sanura <sanura@google.com>
Date: Tue May 02 19:53:55 2023
Create LifecycleStartEffect composable
Adding LifecycleStartEffect composable API to be used when
running SideEffects based on ON_START/ON_STOP event callbacks.
RelNote: "`LifecycleStartEffect` API has been added to run side
effects based on `Lifecycle.Event.ON_START` and
`Lifecycle.Event.ON_STOP` event callbacks."
Test: lifecycleStartEffectTest
Bug: 235529345
Change-Id: I5a8d1e6f152b7083e086146ba97044c4b454db84
M lifecycle/lifecycle-runtime-compose/api/current.txt
M lifecycle/lifecycle-runtime-compose/api/public_plus_experimental_current.txt
M lifecycle/lifecycle-runtime-compose/api/restricted_current.txt
M lifecycle/lifecycle-runtime-compose/src/androidTest/java/androidx/lifecycle/compose/LifecycleEffectTest.kt
M lifecycle/lifecycle-runtime-compose/src/main/java/androidx/lifecycle/compose/LifecycleEffect.kt
st...@gmail.com <st...@gmail.com> #13
Is there a target API version where this may be released?
il...@google.com <il...@google.com> #14
This is still in progress for inclusion in Lifecycle 2.7.0-alpha01.
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit ad273fa4882a38a5a2f72004044ce3173b2c06a9
Author: sanura <sanura@google.com>
Date: Fri May 05 02:02:59 2023
Add samples for LifecycleEffects
Adding samples for LifecycleEventEffect,
LifecycleStartEffect, and LifecycleResumeEffect.
RelNote: "All composables in `LifecycleEffect` now
link sample usages."
Test: ./gradlew bOS
Bug: 235529345
Change-Id: Ib4786f4b586cf9390f3dbe6f3b0fc86c60267a86
M lifecycle/lifecycle-runtime-compose/samples/src/main/java/androidx/lifecycle/compose/samples/LifecycleComposeSamples.kt
M lifecycle/lifecycle-runtime-compose/src/main/java/androidx/lifecycle/compose/LifecycleEffect.kt
sa...@google.com <sa...@google.com>
[Deleted User] <[Deleted User]> #16
ka...@gmail.com <ka...@gmail.com> #17
When will this be released?
na...@google.com <na...@google.com> #18
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-runtime-compose:2.7.0-alpha01
sj...@gmail.com <sj...@gmail.com> #19
Just want to say that Lifecycle 2.7.0
stable has been finally released. Thank you very much 🙏🏼
ey...@gmail.com <ey...@gmail.com> #20
jb...@google.com <jb...@google.com> #21
Yes, those are the Lifecycle.State
s that reflect those particular Lifecycle.Event
s. Please take a look at the
ey...@gmail.com <ey...@gmail.com> #22
jb...@google.com <jb...@google.com> #23
Receiving a state from the flow would be the signal that a change has occurred and the new state is that particular change. There are cases where you don't care how you get to a state, just that you are there. We also offer Lifecycle.Event
s.
il...@google.com <il...@google.com> #24
If you look at the Lifecycle.asFlow()
to get a Flow of Lifecycle.Event
) and one for Lifecycle State (where you can use Lifecycle.currentStateFlow
to get the current Lifecycle.State
).
Make sure you are using the right API.
ey...@gmail.com <ey...@gmail.com> #25
il...@google.com <il...@google.com> #26
Lifecycle.asFlow()
works outside of Compose too and gives you Lifecycle.Event
instances as they occur. That's why that API exists separately from currentStateFlow
.
Description
Component used: Lifecycle
Version used: 2.5.0-rc01
Reacting to a Lifecycle.State changes is currently fairly complicated in a Jetpack Compose based app, requiring a with registering a
DisposableEffect
based approachLifecycleObserver
with theLocalLifecycleOwner
.Ideally, this would come in two forms:
Lifecycle.State
asState
, perhaps something likeLocalLifecycleOwner.current.lifecycle.currentStateFlow.collectAsState()
LifecycleEventEffect
that would only run the effect when theLifecycle.State
changes.