Bug 723550 - Lots of base64 decode errors in logcat [r=blassey]

This commit is contained in:
Brian Nicholson 2012-02-03 15:55:09 -05:00
Родитель aeeaa2018d
Коммит 3bba375c88
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1900,7 +1900,7 @@ public class GeckoAppShell
*/ */
public static byte[] decodeBase64(byte[] in) { public static byte[] decodeBase64(byte[] in) {
if (Build.VERSION.SDK_INT >=Build.VERSION_CODES.FROYO) if (Build.VERSION.SDK_INT >=Build.VERSION_CODES.FROYO)
return Base64.decode(in, GUID_ENCODE_FLAGS); return Base64.decode(in, Base64.DEFAULT);
int iOff = 0; int iOff = 0;
int iLen = in.length; int iLen = in.length;
if (iLen%4 != 0) throw new IllegalArgumentException ("Length of Base64 encoded input string is not a multiple of 4."); if (iLen%4 != 0) throw new IllegalArgumentException ("Length of Base64 encoded input string is not a multiple of 4.");