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

Commit 49c9fca3 authored by Harry Cutts's avatar Harry Cutts
Browse files

uinput: recycle SomeArgs after opening uinput

SomeArgs objects are held in a pool, which gets depleted if they're not
recycled after use, lowering performance.

Bug: 245989146
Test: play back an evemu recording
Change-Id: I0d5109f654bd61eb2b3ef68a2ce7a3ab07371ded
parent a0d2cc09
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -172,8 +172,10 @@ public class Device {
                        RuntimeException ex = new RuntimeException(
                                "Could not create uinput device \"" + name + "\"");
                        Log.e(TAG, "Couldn't create uinput device, exiting.", ex);
                        args.recycle();
                        throw ex;
                    }
                    args.recycle();
                    break;
                case MSG_INJECT_EVENT:
                    if (mPtr != 0) {