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

Commit 14e43ef0 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Disable OrientationEventListener in RotationTouchHelper#destroy()

* Also cleared the list of runnables to run on destroy after
they are all executed

Bug: 361850561
Flag: EXEMPT bugfix
Test: QS works as expected in different rotations
Change-Id: If0dfbb7d538b24fe7aad0b4ed427d779b5a86bfd
parent 76fa57f4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ public class RotationTouchHelper implements DisplayInfoChangeListener, SafeClose
                }
            }
        };
        runOnDestroy(() -> mOrientationListener.disable());
        mNeedsInit = false;
    }

@@ -212,6 +213,7 @@ public class RotationTouchHelper implements DisplayInfoChangeListener, SafeClose
            r.run();
        }
        mNeedsInit = true;
        mOnDestroyActions.clear();
    }

    public boolean isTaskListFrozen() {