Loading core/java/com/android/internal/os/InstallerConnection.java +11 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.internal.os; import android.net.LocalSocket; import android.net.LocalSocketAddress; import android.os.SystemClock; import android.util.Slog; import libcore.io.IoUtils; import libcore.io.Streams; Loading Loading @@ -206,4 +207,14 @@ public class InstallerConnection { } return true; } public void waitForConnection() { for (;;) { if (execute("ping") >= 0) { return; } Slog.w(TAG, "installd not ready"); SystemClock.sleep(1000); } } } core/java/com/android/internal/os/ZygoteInit.java +1 −0 Original line number Diff line number Diff line Loading @@ -468,6 +468,7 @@ public class ZygoteInit { private static void performSystemServerDexOpt(String classPath) { final String[] classPathElements = classPath.split(":"); final InstallerConnection installer = new InstallerConnection(); installer.waitForConnection(); final String instructionSet = VMRuntime.getRuntime().vmInstructionSet(); try { Loading services/core/java/com/android/server/pm/Installer.java +1 −9 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ public final class Installer extends SystemService { @Override public void onStart() { Slog.i(TAG, "Waiting for installd to be ready."); ping(); mInstaller.waitForConnection(); } private static String escapeNull(String arg) { Loading Loading @@ -310,14 +310,6 @@ public final class Installer extends SystemService { return mInstaller.execute(builder.toString()); } public boolean ping() { if (mInstaller.execute("ping") < 0) { return false; } else { return true; } } @Deprecated public int freeCache(long freeStorageSize) { return freeCache(null, freeStorageSize); Loading Loading
core/java/com/android/internal/os/InstallerConnection.java +11 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.internal.os; import android.net.LocalSocket; import android.net.LocalSocketAddress; import android.os.SystemClock; import android.util.Slog; import libcore.io.IoUtils; import libcore.io.Streams; Loading Loading @@ -206,4 +207,14 @@ public class InstallerConnection { } return true; } public void waitForConnection() { for (;;) { if (execute("ping") >= 0) { return; } Slog.w(TAG, "installd not ready"); SystemClock.sleep(1000); } } }
core/java/com/android/internal/os/ZygoteInit.java +1 −0 Original line number Diff line number Diff line Loading @@ -468,6 +468,7 @@ public class ZygoteInit { private static void performSystemServerDexOpt(String classPath) { final String[] classPathElements = classPath.split(":"); final InstallerConnection installer = new InstallerConnection(); installer.waitForConnection(); final String instructionSet = VMRuntime.getRuntime().vmInstructionSet(); try { Loading
services/core/java/com/android/server/pm/Installer.java +1 −9 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ public final class Installer extends SystemService { @Override public void onStart() { Slog.i(TAG, "Waiting for installd to be ready."); ping(); mInstaller.waitForConnection(); } private static String escapeNull(String arg) { Loading Loading @@ -310,14 +310,6 @@ public final class Installer extends SystemService { return mInstaller.execute(builder.toString()); } public boolean ping() { if (mInstaller.execute("ping") < 0) { return false; } else { return true; } } @Deprecated public int freeCache(long freeStorageSize) { return freeCache(null, freeStorageSize); Loading