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

Commit 381625d9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "remove the wms lock in notifyMovementBoundsChanged method." into main

parents bd9903f6 9989d677
Loading
Loading
Loading
Loading
+16 −15
Original line number Original line Diff line number Diff line
@@ -348,12 +348,14 @@ class PinnedTaskController {
     * Notifies listeners that the PIP needs to be adjusted for the IME.
     * Notifies listeners that the PIP needs to be adjusted for the IME.
     */
     */
    private void notifyImeVisibilityChanged(boolean imeVisible, int imeHeight) {
    private void notifyImeVisibilityChanged(boolean imeVisible, int imeHeight) {
        if (mPinnedTaskListener != null) {
        if (mPinnedTaskListener == null) {
            return;
        }

        try {
        try {
            mPinnedTaskListener.onImeVisibilityChanged(imeVisible, imeHeight);
            mPinnedTaskListener.onImeVisibilityChanged(imeVisible, imeHeight);
        } catch (RemoteException e) {
        } catch (RemoteException e) {
                Slog.e(TAG_WM, "Error delivering bounds changed event.", e);
            Slog.e(TAG_WM, "Error delivering ime visibility changed event.", e);
            }
        }
        }
    }
    }


@@ -361,15 +363,14 @@ class PinnedTaskController {
     * Notifies listeners that the PIP movement bounds have changed.
     * Notifies listeners that the PIP movement bounds have changed.
     */
     */
    private void notifyMovementBoundsChanged(boolean fromImeAdjustment) {
    private void notifyMovementBoundsChanged(boolean fromImeAdjustment) {
        synchronized (mService.mGlobalLock) {
        if (mPinnedTaskListener == null) {
        if (mPinnedTaskListener == null) {
            return;
            return;
        }
        }

        try {
        try {
            mPinnedTaskListener.onMovementBoundsChanged(fromImeAdjustment);
            mPinnedTaskListener.onMovementBoundsChanged(fromImeAdjustment);
        } catch (RemoteException e) {
        } catch (RemoteException e) {
                Slog.e(TAG_WM, "Error delivering actions changed event.", e);
            Slog.e(TAG_WM, "Error delivering movement bounds changed event.", e);
            }
        }
        }
    }
    }