Skip to content
Permalink
Browse files
By default Android tooling does not compress certain assets and just …
…puts them in as STORED. Making sure the Maven plugin respects such decision and does not compress them when repackaging the archive. Needed for MediaPlayer to play mp3 from asset folder, as they are required to be uncompressed.
  • Loading branch information
Jaroslav Tulach committed Jul 21, 2014
1 parent b149e10 commit 43f7ace88fe42e5bd7243b2743403300f21fc627
Showing 1 changed file with 11 additions and 2 deletions.
@@ -422,8 +422,17 @@ private void updateWithMetaInf( ZipOutputStream zos, File jarFile, Set<String> e
continue;
}
}

zos.putNextEntry( new ZipEntry( zn ) );
final ZipEntry ne;
if ( ze.getMethod() == ZipEntry.STORED )
{
ne = new ZipEntry( ze );
}
else
{
ne = new ZipEntry( zn );
}

zos.putNextEntry( ne );

InputStream is = zin.getInputStream( ze );

0 comments on commit 43f7ace

Please sign in to comment.