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

Commit 7047502b authored by Candice's avatar Candice
Browse files

Add null check for magnificationSettingsController

Since the DisplayIdIndexSupplier#get could return a null controller, we
need to check if the controller is null before performing the next
steps.

Bug: 378043155
Test: atest IMagnificationConnectionTest
Flag: EXEMPT bugfix
Change-Id: I494e6f0b69c6ef47a71920d5e5e3e115b6c6d2c4
parent 91989f88
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -453,8 +453,10 @@ public class MagnificationImpl implements Magnification, CommandQueue.Callbacks

        final MagnificationSettingsController magnificationSettingsController =
                mMagnificationSettingsSupplier.get(displayId);
        if (magnificationSettingsController != null) {
            magnificationSettingsController.setMagnificationScale(scale);
        }
    }

    @VisibleForTesting
    final WindowMagnifierCallback mWindowMagnifierCallback = new WindowMagnifierCallback() {