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

Commit a81822dc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Update smartspace when clock updates." into sc-dev am: 07791ca5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14603826

Change-Id: Iba6a29a2e8300368569342183403dfbd54c81462
parents c0d84490 07791ca5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -259,6 +259,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
            mClockViewController.refreshTime();
            mLargeClockViewController.refreshTime();
        }
        if (mSmartspaceController != null) {
            mSmartspaceController.requestSmartspaceUpdate();
        }

        mView.refresh();
    }
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ class LockscreenSmartspaceController @Inject constructor(
        return view
    }

    fun requestSmartspaceUpdate() {
        session?.requestSmartspaceUpdate()
    }

    private fun buildView(parent: ViewGroup) {
        if (plugin == null) {
            return
+7 −0
Original line number Diff line number Diff line
@@ -232,6 +232,13 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase {
        verify(mView).removeView(mFakeSmartspaceView);
    }

    @Test
    public void testRefresh() {
        mController.refresh();

        verify(mSmartspaceController).requestSmartspaceUpdate();
    }

    private void verifyAttachment(VerificationMode times) {
        verify(mClockManager, times).addOnClockChangedListener(
                any(ClockManager.ClockChangedListener.class));