Loading packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +5 −3 Original line number Original line Diff line number Diff line Loading @@ -85,10 +85,12 @@ public class SystemUIFactory { @VisibleForTesting @VisibleForTesting public void init(Context context, boolean fromTest) public void init(Context context, boolean fromTest) throws ExecutionException, InterruptedException { throws ExecutionException, InterruptedException { final boolean initializeComponents = !fromTest && android.os.Process.myUserHandle().isSystem(); mRootComponent = buildGlobalRootComponent(context); mRootComponent = buildGlobalRootComponent(context); // Stand up WMComponent // Stand up WMComponent mWMComponent = mRootComponent.getWMComponentBuilder().build(); mWMComponent = mRootComponent.getWMComponentBuilder().build(); if (!fromTest) { if (initializeComponents) { // Only initialize when not starting from tests since this currently initializes some // Only initialize when not starting from tests since this currently initializes some // components that shouldn't be run in the test environment // components that shouldn't be run in the test environment mWMComponent.init(); mWMComponent.init(); Loading @@ -96,7 +98,7 @@ public class SystemUIFactory { // And finally, retrieve whatever SysUI needs from WMShell and build SysUI. // And finally, retrieve whatever SysUI needs from WMShell and build SysUI. SysUIComponent.Builder builder = mRootComponent.getSysUIComponent(); SysUIComponent.Builder builder = mRootComponent.getSysUIComponent(); if (!fromTest) { if (initializeComponents) { // Only initialize when not starting from tests since this currently initializes some // Only initialize when not starting from tests since this currently initializes some // components that shouldn't be run in the test environment // components that shouldn't be run in the test environment builder = builder.setPip(mWMComponent.getPip()) builder = builder.setPip(mWMComponent.getPip()) Loading @@ -111,7 +113,7 @@ public class SystemUIFactory { .setInputConsumerController(mWMComponent.getInputConsumerController()) .setInputConsumerController(mWMComponent.getInputConsumerController()) .setShellTaskOrganizer(mWMComponent.getShellTaskOrganizer()) .setShellTaskOrganizer(mWMComponent.getShellTaskOrganizer()) .build(); .build(); if (!fromTest) { if (initializeComponents) { mSysUIComponent.init(); mSysUIComponent.init(); } } Loading Loading
packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +5 −3 Original line number Original line Diff line number Diff line Loading @@ -85,10 +85,12 @@ public class SystemUIFactory { @VisibleForTesting @VisibleForTesting public void init(Context context, boolean fromTest) public void init(Context context, boolean fromTest) throws ExecutionException, InterruptedException { throws ExecutionException, InterruptedException { final boolean initializeComponents = !fromTest && android.os.Process.myUserHandle().isSystem(); mRootComponent = buildGlobalRootComponent(context); mRootComponent = buildGlobalRootComponent(context); // Stand up WMComponent // Stand up WMComponent mWMComponent = mRootComponent.getWMComponentBuilder().build(); mWMComponent = mRootComponent.getWMComponentBuilder().build(); if (!fromTest) { if (initializeComponents) { // Only initialize when not starting from tests since this currently initializes some // Only initialize when not starting from tests since this currently initializes some // components that shouldn't be run in the test environment // components that shouldn't be run in the test environment mWMComponent.init(); mWMComponent.init(); Loading @@ -96,7 +98,7 @@ public class SystemUIFactory { // And finally, retrieve whatever SysUI needs from WMShell and build SysUI. // And finally, retrieve whatever SysUI needs from WMShell and build SysUI. SysUIComponent.Builder builder = mRootComponent.getSysUIComponent(); SysUIComponent.Builder builder = mRootComponent.getSysUIComponent(); if (!fromTest) { if (initializeComponents) { // Only initialize when not starting from tests since this currently initializes some // Only initialize when not starting from tests since this currently initializes some // components that shouldn't be run in the test environment // components that shouldn't be run in the test environment builder = builder.setPip(mWMComponent.getPip()) builder = builder.setPip(mWMComponent.getPip()) Loading @@ -111,7 +113,7 @@ public class SystemUIFactory { .setInputConsumerController(mWMComponent.getInputConsumerController()) .setInputConsumerController(mWMComponent.getInputConsumerController()) .setShellTaskOrganizer(mWMComponent.getShellTaskOrganizer()) .setShellTaskOrganizer(mWMComponent.getShellTaskOrganizer()) .build(); .build(); if (!fromTest) { if (initializeComponents) { mSysUIComponent.init(); mSysUIComponent.init(); } } Loading