commit | bfc60b092b2194cf9d013f8808946ead43692f8d | [log] [tgz] |
---|---|---|
author | Rico Wind <ricow@google.com> | Mon Nov 11 16:46:15 2024 +0100 |
committer | Rico Wind <ricow@google.com> | Tue Nov 12 08:17:32 2024 +0000 |
tree | 61d98ac953bc5f953aadebd9ab24f85b75fb496e | |
parent | e2761c6f7a4861fefd42dd5a4998f9854376f1ef [diff] [blame] |
Fix package id calculation from resource identifier. The aapt2 proto format for the resource table use the uppermost byte of the resource identifier as an unsigned byte. A corresponding fix in AGP is here: http://ag/30321175 Bug: b/378470047 Change-Id: Ia4c0e832d3f501e57a36f2c1ae0a49627de23da1
diff --git a/src/resourceshrinker/java/com/android/build/shrinker/ResourceTableUtil.kt b/src/resourceshrinker/java/com/android/build/shrinker/ResourceTableUtil.kt index 88bb5e4..e81c951 100644 --- a/src/resourceshrinker/java/com/android/build/shrinker/ResourceTableUtil.kt +++ b/src/resourceshrinker/java/com/android/build/shrinker/ResourceTableUtil.kt
@@ -111,7 +111,7 @@ private fun packageIdFromIdentifier( identifier: Int ): Int = - identifier shr 24 + identifier ushr 24 private fun typeIdFromIdentifier( identifier: Int