Kitesurfer
Kitesurfer

Reputation: 3561

For what is TrafficStats good for?

I invested some time study the volley implementation, and found this piece of code in Class NetworkDispatcher:

            // Tag the request (if API >= 14)
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
                TrafficStats.setThreadStatsTag(request.getTrafficStatsTag());
            }

What can be done with this ?

Upvotes: 1

Views: 327

Answers (1)

Delyan
Delyan

Reputation: 8911

It tags the current thread, so that you get its traffic separated in DDMS's Network Statistics tab.

Upvotes: 2

Related Questions