Only add commit callback when using sync transaction

There's no need to add a commit callback when we're not syncing since
the callback won't actually do anything. Instead only add a commit
callback when a sync transaction has been requested.

Test: BLASTBufferQueueTest
Bug: 205278630
Change-Id: Ib7345f2581b6e4ce8923531aebcd457c14d86027
Merged-In: Ib7345f2581b6e4ce8923531aebcd457c14d86027
1 file changed