Loading services/core/java/com/android/server/pm/SELinuxMMAC.java +2 −3 Original line number Diff line number Diff line Loading @@ -323,9 +323,8 @@ public final class SELinuxMMAC { */ public static boolean isRestoreconNeeded(File file) { try { final byte[] buf = new byte[20]; final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH, buf); if ((len == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) { final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH); if ((buf.length == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) { return false; } } catch (ErrnoException e) { Loading services/core/java/com/android/server/pm/UserManagerService.java +2 −3 Original line number Diff line number Diff line Loading @@ -2958,9 +2958,8 @@ public class UserManagerService extends IUserManager.Stub { */ private static int getSerialNumber(File file) throws IOException { try { final byte[] buf = new byte[256]; final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL, buf); final String serial = new String(buf, 0, len); final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL); final String serial = new String(buf); try { return Integer.parseInt(serial); } catch (NumberFormatException e) { Loading Loading
services/core/java/com/android/server/pm/SELinuxMMAC.java +2 −3 Original line number Diff line number Diff line Loading @@ -323,9 +323,8 @@ public final class SELinuxMMAC { */ public static boolean isRestoreconNeeded(File file) { try { final byte[] buf = new byte[20]; final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH, buf); if ((len == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) { final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH); if ((buf.length == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) { return false; } } catch (ErrnoException e) { Loading
services/core/java/com/android/server/pm/UserManagerService.java +2 −3 Original line number Diff line number Diff line Loading @@ -2958,9 +2958,8 @@ public class UserManagerService extends IUserManager.Stub { */ private static int getSerialNumber(File file) throws IOException { try { final byte[] buf = new byte[256]; final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL, buf); final String serial = new String(buf, 0, len); final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL); final String serial = new String(buf); try { return Integer.parseInt(serial); } catch (NumberFormatException e) { Loading