Skip to content

Commit

Permalink
Work-around for missing Base64 support on Eclair.
Browse files Browse the repository at this point in the history
  • Loading branch information
NightWhistler committed Apr 19, 2012
1 parent 42216b6 commit 0a8a790
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,12 @@ private void loadImageLink( Link imageLink, String baseUrl ) throws IOException

if ( href.startsWith("data:image/png;base64")) {
String dataString = href.substring( href.indexOf(',') + 1 );
imageLink.setBinData( Base64.decode(dataString, Base64.DEFAULT ));
try {
imageLink.setBinData( Base64.decode(dataString, Base64.DEFAULT ));
} catch ( NoClassDefFoundError ncd ) {
//Slight hack for Android 2.1
imageLink.setBinData(null);
}
} else {
String target = new URL(new URL(baseUrl), href).toString();

Expand Down

0 comments on commit 0a8a790

Please sign in to comment.