Defer (more) complex object creation until used.
As part of supporting SysUI multivalentTests under the new Ravenwood testing environment, tests need to be more careful about only creating and interacting with "complex" objects when they're actually needed by a test. Attempting interactions during <init> or <clinit> of the overall test class fails on Ravenwood when these complex objects aren't yet supported, and they throw an exception. This change is a continuation of the recent `by lazy` work, expanded to catch examples that have emerged over the recent few weeks. There are also a few tests where `by lazy` left some dirty state between test cases, so we pivot those tests to use `lateinit` instead so that all existing tests remain passing. Bug: 319647875 Test: atest SystemUiRoboTests Change-Id: I2a646ad8d189fd9545123e9585796f35b4290b12
Loading
Please register or sign in to comment