Skip to content

Commit 4a5ec24

Browse files
committed
fix isPackageId and isResourceId
1 parent 121ae6a commit 4a5ec24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/reandroid/arsc/chunk/PackageBlock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,10 +811,10 @@ public String toString(){
811811
return builder.toString();
812812
}
813813
public static boolean isPackageId(int packageId){
814-
return (byte)packageId > 0;
814+
return packageId > 0 && packageId <= 0xff;
815815
}
816816
public static boolean isResourceId(int resourceId){
817-
return (resourceId >>> 16) != 0;
817+
return ((resourceId >> 24) & (byte) (resourceId >> 16)) != 0;
818818
}
819819

820820
public static void changePackageId(ValueItem valueItem, int packageIdOld, int packageIdNew){

0 commit comments

Comments
 (0)