Merge "Don't crash if we get a DHCP packet with the wrong port."
diff --git a/api/current.txt b/api/current.txt
index 64e3458..8744ac9 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -55442,6 +55442,17 @@
method public abstract int size();
}
+ public class DoubleSummaryStatistics implements java.util.function.DoubleConsumer {
+ ctor public DoubleSummaryStatistics();
+ method public void accept(double);
+ method public void combine(java.util.DoubleSummaryStatistics);
+ method public final double getAverage();
+ method public final long getCount();
+ method public final double getMax();
+ method public final double getMin();
+ method public final double getSum();
+ }
+
public class DuplicateFormatFlagsException extends java.util.IllegalFormatException {
ctor public DuplicateFormatFlagsException(java.lang.String);
method public java.lang.String getFlags();
@@ -55664,6 +55675,17 @@
ctor public InputMismatchException(java.lang.String);
}
+ public class IntSummaryStatistics implements java.util.function.IntConsumer {
+ ctor public IntSummaryStatistics();
+ method public void accept(int);
+ method public void combine(java.util.IntSummaryStatistics);
+ method public final double getAverage();
+ method public final long getCount();
+ method public final int getMax();
+ method public final int getMin();
+ method public final long getSum();
+ }
+
public class InvalidPropertiesFormatException extends java.io.IOException {
ctor public InvalidPropertiesFormatException(java.lang.Throwable);
ctor public InvalidPropertiesFormatException(java.lang.String);
@@ -55855,6 +55877,18 @@
enum_constant public static final java.util.Locale.Category FORMAT;
}
+ public class LongSummaryStatistics implements java.util.function.IntConsumer java.util.function.LongConsumer {
+ ctor public LongSummaryStatistics();
+ method public void accept(int);
+ method public void accept(long);
+ method public void combine(java.util.LongSummaryStatistics);
+ method public final double getAverage();
+ method public final long getCount();
+ method public final long getMax();
+ method public final long getMin();
+ method public final long getSum();
+ }
+
public abstract interface Map {
method public abstract void clear();
method public abstract boolean containsKey(java.lang.Object);
@@ -63252,4 +63286,3 @@
}
}
-
diff --git a/api/system-current.txt b/api/system-current.txt
index 7a19388..d745410 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -58060,6 +58060,17 @@
method public abstract int size();
}
+ public class DoubleSummaryStatistics implements java.util.function.DoubleConsumer {
+ ctor public DoubleSummaryStatistics();
+ method public void accept(double);
+ method public void combine(java.util.DoubleSummaryStatistics);
+ method public final double getAverage();
+ method public final long getCount();
+ method public final double getMax();
+ method public final double getMin();
+ method public final double getSum();
+ }
+
public class DuplicateFormatFlagsException extends java.util.IllegalFormatException {
ctor public DuplicateFormatFlagsException(java.lang.String);
method public java.lang.String getFlags();
@@ -58282,6 +58293,17 @@
ctor public InputMismatchException(java.lang.String);
}
+ public class IntSummaryStatistics implements java.util.function.IntConsumer {
+ ctor public IntSummaryStatistics();
+ method public void accept(int);
+ method public void combine(java.util.IntSummaryStatistics);
+ method public final double getAverage();
+ method public final long getCount();
+ method public final int getMax();
+ method public final int getMin();
+ method public final long getSum();
+ }
+
public class InvalidPropertiesFormatException extends java.io.IOException {
ctor public InvalidPropertiesFormatException(java.lang.Throwable);
ctor public InvalidPropertiesFormatException(java.lang.String);
@@ -58473,6 +58495,18 @@
enum_constant public static final java.util.Locale.Category FORMAT;
}
+ public class LongSummaryStatistics implements java.util.function.IntConsumer java.util.function.LongConsumer {
+ ctor public LongSummaryStatistics();
+ method public void accept(int);
+ method public void accept(long);
+ method public void combine(java.util.LongSummaryStatistics);
+ method public final double getAverage();
+ method public final long getCount();
+ method public final long getMax();
+ method public final long getMin();
+ method public final long getSum();
+ }
+
public abstract interface Map {
method public abstract void clear();
method public abstract boolean containsKey(java.lang.Object);
@@ -65870,4 +65904,3 @@
}
}
-
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 79c7929..5067665 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4448,7 +4448,7 @@
}
VMRuntime.registerAppInfo(profileFile.getAbsolutePath(), appInfo.dataDir,
- codePaths.toArray(new String[codePaths.size()]));
+ codePaths.toArray(new String[codePaths.size()]), null);
}
/*
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 67ed85a..6317c07 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -484,7 +484,7 @@
try {
for (String classPathElement : classPathElements) {
final int dexoptNeeded = DexFile.getDexOptNeeded(
- classPathElement, "*", instructionSet, false /* defer */);
+ classPathElement, instructionSet, DexFile.COMPILATION_TYPE_FULL);
if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) {
installer.dexopt(classPathElement, Process.SYSTEM_UID, instructionSet,
dexoptNeeded, 0 /*dexFlags*/);
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index 6c6871f..1e4d4a3 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -145,8 +145,8 @@
dexoptNeeded = DexFile.DEX2OAT_NEEDED;
} else {
try {
- dexoptNeeded = DexFile.getDexOptNeeded(path, pkg.packageName,
- dexCodeInstructionSet, defer);
+ dexoptNeeded = DexFile.getDexOptNeeded(path,
+ dexCodeInstructionSet, DexFile.COMPILATION_TYPE_FULL);
} catch (IOException ioe) {
Slog.w(TAG, "IOException reading apk: " + path, ioe);
return DEX_OPT_FAILED;
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 558dfa9..ef79eb8 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -1980,7 +1980,8 @@
}
try {
- int dexoptNeeded = DexFile.getDexOptNeeded(lib, null, dexCodeInstructionSet, false);
+ int dexoptNeeded = DexFile.getDexOptNeeded(lib, dexCodeInstructionSet,
+ DexFile.COMPILATION_TYPE_FULL);
if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) {
alreadyDexOpted.add(lib);
mInstaller.dexopt(lib, Process.SYSTEM_UID, dexCodeInstructionSet,
@@ -2030,7 +2031,8 @@
continue;
}
try {
- int dexoptNeeded = DexFile.getDexOptNeeded(path, null, dexCodeInstructionSet, false);
+ int dexoptNeeded = DexFile.getDexOptNeeded(path, dexCodeInstructionSet,
+ DexFile.COMPILATION_TYPE_FULL);
if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) {
mInstaller.dexopt(path, Process.SYSTEM_UID, dexCodeInstructionSet,
dexoptNeeded, DEXOPT_PUBLIC /*dexFlags*/);
@@ -2087,8 +2089,14 @@
scanDirLI(systemAppDir, PackageParser.PARSE_IS_SYSTEM
| PackageParser.PARSE_IS_SYSTEM_DIR, scanFlags, 0);
+ // Collected privileged vendor packages.
+ final File privilegedVendorAppDir = new File(Environment.getVendorDirectory(), "priv-app");
+ scanDirLI(privilegedVendorAppDir, PackageParser.PARSE_IS_SYSTEM
+ | PackageParser.PARSE_IS_SYSTEM_DIR
+ | PackageParser.PARSE_IS_PRIVILEGED, scanFlags, 0);
+
// Collect all vendor packages.
- File vendorAppDir = new File("/vendor/app");
+ File vendorAppDir = new File(Environment.getVendorDirectory(), "app");
try {
vendorAppDir = vendorAppDir.getCanonicalFile();
} catch (IOException e) {
@@ -12994,7 +13002,10 @@
try {
final String privilegedAppDir = new File(Environment.getRootDirectory(), "priv-app")
.getCanonicalPath();
- return path.getCanonicalPath().startsWith(privilegedAppDir);
+ final String privilegedAppVendorDir = new File(Environment.getVendorDirectory(), "priv-app")
+ .getCanonicalPath();
+ return (path.getCanonicalPath().startsWith(privilegedAppDir)
+ || path.getCanonicalPath().startsWith(privilegedAppVendorDir));
} catch (IOException e) {
Slog.e(TAG, "Unable to access code path " + path);
}