diff options
author | zachh <zachh@google.com> | 2017-07-31 20:20:08 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-08-01 08:42:56 -0700 |
commit | d2035dc3bfabc3a885f9d0016a5d5846645dae94 (patch) | |
tree | ae653b7b33ca54fc106fc2f8ab17fa830f854397 /java/com | |
parent | f4a53a42d1dfc994b3480cbacba9d9dac8b39295 (diff) |
Set thread stats tag before getContent() when downloading map.
Failing to set the tag before invoking getContent() causes a strict mode violation.
Bug: 64080588
Test: none
PiperOrigin-RevId: 163785889
Change-Id: Id08886616f353b93df47d090abc9c0b68a09954e
Diffstat (limited to 'java/com')
-rw-r--r-- | java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java b/java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java index b093a1b15..035f5cdac 100644 --- a/java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java +++ b/java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java @@ -50,9 +50,9 @@ class DownloadMapImageTask extends AsyncTask<Location, Void, Drawable> { try { URL mapUrl = new URL(LocationUrlBuilder.getStaticMapUrl(ui.getContext(), locations[0])); + TrafficStats.setThreadStatsTag(TrafficStatsTags.DOWNLOAD_LOCATION_MAP_TAG); InputStream content = (InputStream) mapUrl.getContent(); - TrafficStats.setThreadStatsTag(TrafficStatsTags.DOWNLOAD_LOCATION_MAP_TAG); return Drawable.createFromStream(content, STATIC_MAP_SRC_NAME); } catch (Exception ex) { LogUtil.e("DownloadMapImageTask.doInBackground", "Exception!!!", ex); |