a4ae81857a7eb84d019ea7855b24ba9fe69fbf50
I pretty sure the getter method Scene.getCurrentScene() should be promoted to be public. This method is the only option for developers to understand is the sceneRoot already in the scene they need. Otherwise they have to introduce their own states and sync it with all scene changes which is more error-prone. To make it simpler to developers we can just make the method public. As an example of usage:
void displayMessages(List<Message> messages) {
if (!messages.isEmpty()) {
if (Scene.getCurrentScene(root) != messagesScene) {
TransitionManager.go(messagesScene);
MyAnalytics.trackDisplayMessages();
(... more initialization ... )
}
messagesView.display(messages);
}
}
Test: added a cts test for getCurrentScene
Change in AndroidX: aosp/807055
Bug: 118720709
Change-Id: Ic90e3576a82b5ab9a88e38e396efd49875968011
…
…
…
Merge "Add CarrierConfig to hide "Network default" option in Caller ID setting" am:
e3a989f7d3 am: 22b595e5bd
Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am:
0d63da86e2 am: d62c2baa6d
…
Description
No description provided
Languages
Java
73.7%
Kotlin
14%
PowerBuilder
5.8%
C++
5.2%
AIDL
1%