Merge \\"Fix inefficiency in APK entry data alignment.\\" am: a85e0aa883

am: 7fe6ba2197

Change-Id: I97934b2a4cdfabb463f5012149ef28a15768c321
This commit is contained in:
Alex Klyubin 2016-06-13 18:26:05 +00:00 committed by android-build-merger
commit 876080b437

View file

@ -445,7 +445,8 @@ class SignApk {
int extraPaddingSizeBytes = 0;
if (alignment > 0) {
long paddingStartOffset = offset + ALIGNMENT_ZIP_EXTRA_DATA_FIELD_MIN_SIZE_BYTES;
extraPaddingSizeBytes = alignment - (int) (paddingStartOffset % alignment);
extraPaddingSizeBytes =
(alignment - (int) (paddingStartOffset % alignment)) % alignment;
}
byte[] extra =
new byte[ALIGNMENT_ZIP_EXTRA_DATA_FIELD_MIN_SIZE_BYTES + extraPaddingSizeBytes];