From 301d517c959263c67fe7500fe30620c493e30133 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 30 Nov 2020 09:30:22 +0900 Subject: [PATCH] Call SystemUIFactory.prepareSysUIComponentBuilder even for tests Thus any downstream project can customize SysUIComponent.Builder for their tests. Bug: 171436765 Test: atest SystemUITests Change-Id: I033dd144b21b99b8f455775099f7ecb6a1dffe6b --- .../src/com/android/systemui/SystemUIFactory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java index 8e5e9ea257bac..6b4e8bdef72af 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java @@ -113,8 +113,10 @@ public class SystemUIFactory { .setShellCommandHandler(mWMComponent.getShellCommandHandler()) .setAppPairs(mWMComponent.getAppPairs()); } else { - // TODO: Call on prepareSysUIComponentBuilder but not with real components. - builder = builder.setPip(Optional.ofNullable(null)) + // TODO: Call on prepareSysUIComponentBuilder but not with real components. Other option + // is separating this logic into newly creating SystemUITestsFactory. + builder = prepareSysUIComponentBuilder(builder, mWMComponent) + .setPip(Optional.ofNullable(null)) .setSplitScreen(Optional.ofNullable(null)) .setOneHanded(Optional.ofNullable(null)) .setBubbles(Optional.ofNullable(null)) @@ -194,4 +196,4 @@ public class SystemUIFactory { AssetManager am, String modelName) { return new BackGestureTfClassifierProvider(); } -} \ No newline at end of file +}