What's the use case for the cookie in android.os.Trace#beginAsyncSection

Viewed 80
1 Answers

It's a unique identifier for distinguishing simultaneous events. Imagine that You have multiple *AsyncSection instances of the same method name. The cookie connects begin with end in each pair. The answer for the last question - You have to call endAsyncSection with a cookie used in one of beginAsyncSection.

Related