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

Commit 9989d677 authored by lijilou's avatar lijilou Committed by Jilou li
Browse files

remove the wms lock in notifyMovementBoundsChanged method.

ALL callers call the notifyMovementBoundsChanged  with the wms lock,we
don't need add lock in this method.

Bug: none
Flag: EXEMPT minor optimization
Change-Id: I20940378b1384f1b57cfb2b41bf1cf94beeb4da0
parent 6407e3b6
Loading
Loading
Loading
Loading
+16 −15
Original line number Diff line number Diff line
@@ -348,12 +348,14 @@ class PinnedTaskController {
     * Notifies listeners that the PIP needs to be adjusted for the IME.
     */
    private void notifyImeVisibilityChanged(boolean imeVisible, int imeHeight) {
        if (mPinnedTaskListener != null) {
        if (mPinnedTaskListener == null) {
            return;
        }

        try {
            mPinnedTaskListener.onImeVisibilityChanged(imeVisible, imeHeight);
        } 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.
     */
    private void notifyMovementBoundsChanged(boolean fromImeAdjustment) {
        synchronized (mService.mGlobalLock) {
        if (mPinnedTaskListener == null) {
            return;
        }

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