From 06bb908b78e3c790d3db52fef9f2ab0a129e53cd Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 21 Sep 2015 13:20:07 -0700 Subject: Frameworks/base: Propagate boot status to installd Propagate the boot status explicitly to installd so that we do not have to rely on dev.bootcomplete, which isn't meaningfully set when the device needs the decryption screen on boot. Bug: 23898216 Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7 --- core/java/com/android/internal/os/InstallerConnection.java | 7 ++++--- core/java/com/android/internal/os/ZygoteInit.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/java/com/android/internal/os/InstallerConnection.java b/core/java/com/android/internal/os/InstallerConnection.java index dcc6a5e..db2b41f 100644 --- a/core/java/com/android/internal/os/InstallerConnection.java +++ b/core/java/com/android/internal/os/InstallerConnection.java @@ -92,14 +92,14 @@ public class InstallerConnection { } public int dexopt(String apkPath, int uid, boolean isPublic, - String instructionSet, int dexoptNeeded) { + String instructionSet, int dexoptNeeded, boolean bootComplete) { return dexopt(apkPath, uid, isPublic, "*", instructionSet, dexoptNeeded, - false, false, null); + false, false, null, bootComplete); } public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName, String instructionSet, int dexoptNeeded, boolean vmSafeMode, - boolean debuggable, String outputPath) { + boolean debuggable, String outputPath, boolean bootComplete) { StringBuilder builder = new StringBuilder("dexopt"); builder.append(' '); builder.append(apkPath); @@ -116,6 +116,7 @@ public class InstallerConnection { builder.append(debuggable ? " 1" : " 0"); builder.append(' '); builder.append(outputPath != null ? outputPath : "!"); + builder.append(bootComplete ? " 1" : " 0"); return execute(builder.toString()); } diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 06919e1..59283bb 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -477,7 +477,7 @@ public class ZygoteInit { classPathElement, "*", instructionSet, false /* defer */); if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) { installer.dexopt(classPathElement, Process.SYSTEM_UID, false, - instructionSet, dexoptNeeded); + instructionSet, dexoptNeeded, false /* boot complete */); } } } catch (IOException ioe) { -- cgit v1.1