diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 1505ccce97a12..85cb15bdd9061 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -721,7 +721,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 = {