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

Commit 8a148a3b authored by Bryce Lee's avatar Bryce Lee
Browse files

Make sure that changes to UI in SwipeDismissLayout are on UI thread.

Bug: 23036658
Change-Id: I2f51f7275c24f32c5f291f58b0dd331e608d8beb
parent eda52f0a
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -89,8 +89,9 @@ public class SwipeDismissLayout extends FrameLayout {
                }
            };
    private BroadcastReceiver mScreenOffReceiver = new BroadcastReceiver() {
        private Runnable mRunnable = new Runnable() {
            @Override
        public void onReceive(Context context, Intent intent) {
            public void run() {
                if (mDismissed) {
                    dismiss();
                } else {
@@ -99,6 +100,12 @@ public class SwipeDismissLayout extends FrameLayout {
                resetMembers();
            }
        };

        @Override
        public void onReceive(Context context, Intent intent) {
            post(mRunnable);
        }
    };
    private IntentFilter mScreenOffFilter = new IntentFilter(Intent.ACTION_SCREEN_OFF);

    private float mLastX;