diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 076e4e118e667..2db9e0918d721 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -716,7 +716,8 @@ public class ZygoteInit { } catch (ErrnoException ex) { throw new RuntimeException("Failed to capget()", ex); } - capabilities &= ((long) data[0].effective) | (((long) data[1].effective) << 32); + capabilities &= Integer.toUnsignedLong(data[0].effective) | + (Integer.toUnsignedLong(data[1].effective) << 32); /* Hardcoded command line to start the system server */ String[] args = {