summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorAndrey Kulikov <andreykulikov@google.com>2018-10-31 14:57:22 +0000
committerAndrey Kulikov <andreykulikov@google.com>2018-11-01 12:33:53 +0000
commita4ae81857a7eb84d019ea7855b24ba9fe69fbf50 (patch)
tree7333b9768e017821899c61b0dfe72a25064eebe9 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentd33b50a66acde10cf35fecfb63ae194a62483c0e (diff)
Make transitions Scene.getCurrentScene() public
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions