Merge "Lazy load status icon related components" into rvc-dev am: 71f6afb212 am: c34ec33e1e am: df2c28d915
Change-Id: I32fe3f281d095e98bbe97c024bcfb325223be889
This commit is contained in:
@@ -78,8 +78,8 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
|||||||
private final IStatusBarService mBarService;
|
private final IStatusBarService mBarService;
|
||||||
private final Lazy<KeyguardStateController> mKeyguardStateControllerLazy;
|
private final Lazy<KeyguardStateController> mKeyguardStateControllerLazy;
|
||||||
private final ButtonSelectionStateController mButtonSelectionStateController;
|
private final ButtonSelectionStateController mButtonSelectionStateController;
|
||||||
private final PhoneStatusBarPolicy mIconPolicy;
|
private final Lazy<PhoneStatusBarPolicy> mIconPolicyLazy;
|
||||||
private final StatusBarIconController mIconController;
|
private final Lazy<StatusBarIconController> mIconControllerLazy;
|
||||||
|
|
||||||
private final int mDisplayId;
|
private final int mDisplayId;
|
||||||
|
|
||||||
@@ -124,8 +124,8 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
|||||||
IStatusBarService barService,
|
IStatusBarService barService,
|
||||||
Lazy<KeyguardStateController> keyguardStateControllerLazy,
|
Lazy<KeyguardStateController> keyguardStateControllerLazy,
|
||||||
ButtonSelectionStateController buttonSelectionStateController,
|
ButtonSelectionStateController buttonSelectionStateController,
|
||||||
PhoneStatusBarPolicy iconPolicy,
|
Lazy<PhoneStatusBarPolicy> iconPolicyLazy,
|
||||||
StatusBarIconController iconController
|
Lazy<StatusBarIconController> iconControllerLazy
|
||||||
) {
|
) {
|
||||||
super(context);
|
super(context);
|
||||||
mResources = resources;
|
mResources = resources;
|
||||||
@@ -140,8 +140,8 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
|||||||
mBarService = barService;
|
mBarService = barService;
|
||||||
mKeyguardStateControllerLazy = keyguardStateControllerLazy;
|
mKeyguardStateControllerLazy = keyguardStateControllerLazy;
|
||||||
mButtonSelectionStateController = buttonSelectionStateController;
|
mButtonSelectionStateController = buttonSelectionStateController;
|
||||||
mIconPolicy = iconPolicy;
|
mIconPolicyLazy = iconPolicyLazy;
|
||||||
mIconController = iconController;
|
mIconControllerLazy = iconControllerLazy;
|
||||||
|
|
||||||
mDisplayId = context.getDisplayId();
|
mDisplayId = context.getDisplayId();
|
||||||
}
|
}
|
||||||
@@ -238,8 +238,8 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
|||||||
// Must be called on the main thread due to the use of observeForever() in
|
// Must be called on the main thread due to the use of observeForever() in
|
||||||
// mIconPolicy.init().
|
// mIconPolicy.init().
|
||||||
mMainHandler.post(() -> {
|
mMainHandler.post(() -> {
|
||||||
mIconPolicy.init();
|
mIconPolicyLazy.get().init();
|
||||||
mSignalPolicy = new StatusBarSignalPolicy(mContext, mIconController);
|
mSignalPolicy = new StatusBarSignalPolicy(mContext, mIconControllerLazy.get());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class CarNavigationBarTest extends SysuiTestCase {
|
|||||||
mCarNavigationBarController, mWindowManager, mDeviceProvisionedController,
|
mCarNavigationBarController, mWindowManager, mDeviceProvisionedController,
|
||||||
new CommandQueue(mContext), mAutoHideController, mButtonSelectionStateListener,
|
new CommandQueue(mContext), mAutoHideController, mButtonSelectionStateListener,
|
||||||
mHandler, mBackgroundHandler, mBarService, () -> mKeyguardStateController,
|
mHandler, mBackgroundHandler, mBarService, () -> mKeyguardStateController,
|
||||||
mButtonSelectionStateController, mIconPolicy, mIconController);
|
mButtonSelectionStateController, () -> mIconPolicy, () -> mIconController);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user