{"comment":{"url":"https://api.github.com/repos/grzesiekrzaca/frostwire/comments/19834961","html_url":"https://github.com/grzesiekrzaca/frostwire/commit/bfcd2c6ac1db275f0dec68fea063a8c73fbcf2e6#commitcomment-19834961","id":19834961,"user":{"login":"gubatron","id":163977,"avatar_url":"https://avatars.githubusercontent.com/u/163977?v=3","gravatar_id":"","url":"https://api.github.com/users/gubatron","html_url":"https://github.com/gubatron","followers_url":"https://api.github.com/users/gubatron/followers","following_url":"https://api.github.com/users/gubatron/following{/other_user}","gists_url":"https://api.github.com/users/gubatron/gists{/gist_id}","starred_url":"https://api.github.com/users/gubatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gubatron/subscriptions","organizations_url":"https://api.github.com/users/gubatron/orgs","repos_url":"https://api.github.com/users/gubatron/repos","events_url":"https://api.github.com/users/gubatron/events{/privacy}","received_events_url":"https://api.github.com/users/gubatron/received_events","type":"User","site_admin":false},"position":23,"line":886,"path":"android/apollo/src/com/andrew/apollo/MusicPlaybackService.java","commit_id":"bfcd2c6ac1db275f0dec68fea063a8c73fbcf2e6","created_at":"2016-11-15T20:14:59Z","updated_at":"2016-11-15T20:14:59Z","body":"let's see...\r\n\r\n```java\r\n**\r\n     * @return The album art for the current album.\r\n     */\r\n    public Bitmap getAlbumArt() {\r\n        try {\r\n            // Return the cached artwork\r\n            final Bitmap bitmap = mImageFetcher.getAlbumImage(getAlbumId());\r\n            return bitmap;\r\n        } catch (Throwable e) {\r\n            e.printStackTrace();\r\n            // due to the lifecycle of android components,\r\n            // mImageFetcher could be null at the moment of call\r\n            // updateRemoveControlClient.\r\n        }\r\n        return null;\r\n}\r\n```\r\n\r\nand the `ImageFetcher::getAlbumImage` code...\r\n```java\r\npublic Bitmap getAlbumImage(final Long id) {\r\n        final ImageLoader loader = ImageLoader.getInstance(mContext.getApplicationContext());\r\n        Bitmap bitmap = loader.get(ImageLoader.getAlbumArtUri(id));\r\n        return (bitmap != null) ? bitmap : getDefaultArtwork();\r\n}\r\n```\r\n\r\nand finally our `ImageLoader::get` ends up possibly having to fetch from the internet, which can be slow, so I'd say yes\r\n\r\n```java\r\npublic Bitmap get(Uri uri) {\r\n        try {\r\n            return picasso.load(uri).get();\r\n        } catch (IOException e) {\r\n            return null;\r\n        }\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"gubatron"}}