Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90c58c32 authored by Marat Davliatchin's avatar Marat Davliatchin Committed by Android (Google) Code Review
Browse files

Merge "Multiple instances of the IdleHostViewController class exist at the same time"

parents 9b1377cb f644bcc3
Loading
Loading
Loading
Loading
+14 −8
Original line number Original line Diff line number Diff line
@@ -346,6 +346,7 @@ public class NotificationPanelViewController extends PanelViewController {
    private VelocityTracker mQsVelocityTracker;
    private VelocityTracker mQsVelocityTracker;
    private boolean mQsTracking;
    private boolean mQsTracking;


    private IdleHostView mIdleHostView;
    private CommunalHostView mCommunalView;
    private CommunalHostView mCommunalView;


    /**
    /**
@@ -894,6 +895,7 @@ public class NotificationPanelViewController extends PanelViewController {
    private void onFinishInflate() {
    private void onFinishInflate() {
        loadDimens();
        loadDimens();
        mKeyguardStatusBar = mView.findViewById(R.id.keyguard_header);
        mKeyguardStatusBar = mView.findViewById(R.id.keyguard_header);
        mIdleHostView = mView.findViewById(R.id.idle_host_view);
        mCommunalView = mView.findViewById(R.id.communal_host);
        mCommunalView = mView.findViewById(R.id.communal_host);


        FrameLayout userAvatarContainer = null;
        FrameLayout userAvatarContainer = null;
@@ -916,10 +918,11 @@ public class NotificationPanelViewController extends PanelViewController {
                        .getKeyguardStatusBarViewController();
                        .getKeyguardStatusBarViewController();
        mKeyguardStatusBarViewController.init();
        mKeyguardStatusBarViewController.init();


        IdleViewComponent idleViewComponent = mIdleViewComponentFactory
        if (mIdleHostView != null) {
                .build(mView.findViewById(R.id.idle_host_view));
            IdleViewComponent idleViewComponent = mIdleViewComponentFactory.build(mIdleHostView);
            mIdleHostViewController = idleViewComponent.getIdleHostViewController();
            mIdleHostViewController = idleViewComponent.getIdleHostViewController();
            mIdleHostViewController.init();
            mIdleHostViewController.init();
        }


        if (mCommunalView != null) {
        if (mCommunalView != null) {
            CommunalViewComponent communalViewComponent =
            CommunalViewComponent communalViewComponent =
@@ -934,7 +937,7 @@ public class NotificationPanelViewController extends PanelViewController {
                mView.findViewById(R.id.keyguard_status_view),
                mView.findViewById(R.id.keyguard_status_view),
                userAvatarContainer,
                userAvatarContainer,
                keyguardUserSwitcherView,
                keyguardUserSwitcherView,
                mView.findViewById(R.id.idle_host_view),
                mIdleHostView,
                mCommunalView);
                mCommunalView);
        mNotificationContainerParent = mView.findViewById(R.id.notification_container_parent);
        mNotificationContainerParent = mView.findViewById(R.id.notification_container_parent);
        NotificationStackScrollLayout stackScrollLayout = mView.findViewById(
        NotificationStackScrollLayout stackScrollLayout = mView.findViewById(
@@ -1032,9 +1035,12 @@ public class NotificationPanelViewController extends PanelViewController {
        mKeyguardStatusViewController = statusViewComponent.getKeyguardStatusViewController();
        mKeyguardStatusViewController = statusViewComponent.getKeyguardStatusViewController();
        mKeyguardStatusViewController.init();
        mKeyguardStatusViewController.init();


        if (idleHostView != null && idleHostView != mIdleHostView) {
            mIdleHostView = idleHostView;
            IdleViewComponent idleViewComponent = mIdleViewComponentFactory.build(idleHostView);
            IdleViewComponent idleViewComponent = mIdleViewComponentFactory.build(idleHostView);
            mIdleHostViewController = idleViewComponent.getIdleHostViewController();
            mIdleHostViewController = idleViewComponent.getIdleHostViewController();
            mIdleHostViewController.init();
            mIdleHostViewController.init();
        }


        if (mKeyguardUserSwitcherController != null) {
        if (mKeyguardUserSwitcherController != null) {
            // Try to close the switcher so that callbacks are triggered if necessary.
            // Try to close the switcher so that callbacks are triggered if necessary.