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

Commit 4660f140 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "fix the NPE problem due to add null InsetsControlTarget object to map...

Merge "fix the NPE problem due to add null InsetsControlTarget object to map ." into main am: d16b5596

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



Change-Id: Ic2b629d69191408c207b4a52934b8f5ee387e41d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents cb2bca5f d16b5596
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -100,7 +100,8 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
            // isLeashReadyForDispatching (used to dispatch the leash of the control) is
            // depending on mGivenInsetsReady. Therefore, triggering notifyControlChanged here
            // again, so that the control with leash can be eventually dispatched
            if (!mGivenInsetsReady && mServerVisible && !givenInsetsPending) {
            if (!mGivenInsetsReady && mServerVisible && !givenInsetsPending
                    && mControlTarget != null) {
                mGivenInsetsReady = true;
                ImeTracker.forLogging().onProgress(mStatsToken,
                        ImeTracker.PHASE_WM_POST_LAYOUT_NOTIFY_CONTROLS_CHANGED);
+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ class InsetsSourceProvider {
        final boolean serverVisibleChanged = mServerVisible != isServerVisible;
        setServerVisible(isServerVisible);
        final boolean positionChanged = updateInsetsControlPosition(windowState);
        if (mControl != null && !positionChanged
        if (mControl != null && mControlTarget != null && !positionChanged
                // The insets hint would be updated if the position is changed. Here updates it for
                // the possible change of the bounds or the server visibility.
                && (updateInsetsHint()
+1 −1
Original line number Diff line number Diff line
@@ -373,7 +373,7 @@ class InsetsStateController {
        array.add(provider);
    }

    void notifyControlChanged(InsetsControlTarget target, InsetsSourceProvider provider) {
    void notifyControlChanged(@NonNull InsetsControlTarget target, InsetsSourceProvider provider) {
        addToPendingControlMaps(target, provider);
        notifyPendingInsetsControlChanged();