Fix PackageWatchdog::syncRequestsAsync and related code.
A. mSomeHandler.post(this::doSomething); B. mSomeHandler.removeCallbacks(this::doSomething); B will not remove the pending runnable posted in A since each method reference will create a new Runnable instance. Instead, we should do: mDoSomething = this::doSomething; mSomeHandler.post(mDoSomething); mSomeHandler.removeCallbacks(mDoSomething); Bug: 140085748 Test: Manual testing && atest PackageWatchdogTest Change-Id: I15752e49741f4e3c3b894d925e2a58beab31209d
Loading
Please register or sign in to comment