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

Commit 8c66f9e2 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Automerger Merge Worker
Browse files

Merge "Ensure waitForIdle() waits until pending messages are handled." into...

Merge "Ensure waitForIdle() waits until pending messages are handled." into rvc-dev am: 40c41402 am: 9ab5925d

Change-Id: I3993f3ecc43dbe5dc6590fefd751338d58538026
parents 144991ae 9ab5925d
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -1353,8 +1353,15 @@ public class BlobStoreManagerService extends SystemService {


            mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP,
            mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP,
                    "Caller is not allowed to call this; caller=" + Binder.getCallingUid());
                    "Caller is not allowed to call this; caller=" + Binder.getCallingUid());
            // We post messages back and forth between mHandler thread and mBackgroundHandler
            // thread while committing a blob. We need to replicate the same pattern here to
            // ensure pending messages have been handled.
            mHandler.post(() -> {
                mBackgroundHandler.post(() -> {
                    mHandler.post(PooledLambda.obtainRunnable(remoteCallback::sendResult, null)
                    mHandler.post(PooledLambda.obtainRunnable(remoteCallback::sendResult, null)
                            .recycleOnUse());
                            .recycleOnUse());
                });
            });
        }
        }


        @Override
        @Override