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

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

Merge "Only update lock icon views on the main thread" into sc-v2-dev am: 29608606

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

Change-Id: I386a6bd9be1093567e9f0bb7b85ed3fdc6119504
parents 8ea64535 29608606
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -695,8 +695,11 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
    private final AuthController.Callback mAuthControllerCallback = new AuthController.Callback() {
        @Override
        public void onAllAuthenticatorsRegistered() {
            // must be called from the main thread since it may update the views
            mExecutor.execute(() -> {
                updateIsUdfpsEnrolled();
                updateConfiguration();
            });
        }
    };
}
+4 −2
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.time.FakeSystemClock;

import com.airbnb.lottie.LottieAnimationView;

@@ -97,11 +98,11 @@ public class LockIconViewControllerTest extends SysuiTestCase {
    private @Mock DumpManager mDumpManager;
    private @Mock AccessibilityManager mAccessibilityManager;
    private @Mock ConfigurationController mConfigurationController;
    private @Mock DelayableExecutor mDelayableExecutor;
    private @Mock Vibrator mVibrator;
    private @Mock AuthRippleController mAuthRippleController;
    private @Mock LottieAnimationView mAodFp;
    private @Mock LayoutInflater mLayoutInflater;
    private FakeExecutor mDelayableExecutor = new FakeExecutor(new FakeSystemClock());

    private LockIconViewController mLockIconViewController;

@@ -223,6 +224,7 @@ public class LockIconViewControllerTest extends SysuiTestCase {

        // WHEN all authenticators are registered
        mAuthControllerCallback.onAllAuthenticatorsRegistered();
        mDelayableExecutor.runAllReady();

        // THEN lock icon view location is updated with the same coordinates as fpProps
        verify(mLockIconView).setCenterLocation(mPointCaptor.capture(), eq(udfps.first));