Move AndroidOs to non-inner class
ForwardingOs isn't available in host-side tests because it's a special class in LibCore that only exists on-device. When ActivityThread.class is loaded, it will automatically load all inner classes including this static one. The class loading will fail because the superclass, ForwardingOs.class, won't exist. Pushing the class load to runtime allows the tests to load the ActivityThread.class by itself for mocking, without triggering a load of the non-existent ForwardingOs.class. Flag: EXEMPT mechanically moving code Test: atest ActivityThreadTest Bug: 362981229 Change-Id: I128822335d62814d959d4f19d363207954629c8a
Loading
Please register or sign in to comment