Merge "Removes unused code from the SystemServer/Zygote classes." into qt-dev
am: 7983bfb3e6
Change-Id: Icd72a60403a1cec0db1dc72251ab241c7aa60d41
This commit is contained in:
@@ -511,7 +511,6 @@ public class Process {
|
||||
* @param appDataDir null-ok the data directory of the app.
|
||||
* @param invokeWith null-ok the command to invoke with.
|
||||
* @param packageName null-ok the name of the package this process belongs to.
|
||||
* @param useSystemGraphicsDriver whether the process uses system graphics driver.
|
||||
*
|
||||
* @param zygoteArgs Additional arguments to supply to the zygote process.
|
||||
* @return An object that describes the result of the attempt to start the process.
|
||||
@@ -531,13 +530,11 @@ public class Process {
|
||||
@Nullable String appDataDir,
|
||||
@Nullable String invokeWith,
|
||||
@Nullable String packageName,
|
||||
boolean useSystemGraphicsDriver,
|
||||
@Nullable String[] zygoteArgs) {
|
||||
return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids,
|
||||
runtimeFlags, mountExternal, targetSdkVersion, seInfo,
|
||||
abi, instructionSet, appDataDir, invokeWith, packageName,
|
||||
/*useUsapPool=*/ true,
|
||||
useSystemGraphicsDriver, zygoteArgs);
|
||||
/*useUsapPool=*/ true, zygoteArgs);
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@@ -553,13 +550,11 @@ public class Process {
|
||||
@Nullable String appDataDir,
|
||||
@Nullable String invokeWith,
|
||||
@Nullable String packageName,
|
||||
boolean useSystemGraphicsDriver,
|
||||
@Nullable String[] zygoteArgs) {
|
||||
return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids,
|
||||
runtimeFlags, mountExternal, targetSdkVersion, seInfo,
|
||||
abi, instructionSet, appDataDir, invokeWith, packageName,
|
||||
/*useUsapPool=*/ false,
|
||||
useSystemGraphicsDriver, zygoteArgs);
|
||||
/*useUsapPool=*/ false, zygoteArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -307,7 +307,6 @@ public class ZygoteProcess {
|
||||
* @param invokeWith null-ok the command to invoke with.
|
||||
* @param packageName null-ok the name of the package this process belongs to.
|
||||
* @param zygoteArgs Additional arguments to supply to the zygote process.
|
||||
* @param useSystemGraphicsDriver whether the process uses system graphics driver.
|
||||
*
|
||||
* @return An object that describes the result of the attempt to start the process.
|
||||
* @throws RuntimeException on fatal start failure
|
||||
@@ -324,7 +323,6 @@ public class ZygoteProcess {
|
||||
@Nullable String invokeWith,
|
||||
@Nullable String packageName,
|
||||
boolean useUsapPool,
|
||||
boolean useSystemGraphicsDriver,
|
||||
@Nullable String[] zygoteArgs) {
|
||||
// TODO (chriswailes): Is there a better place to check this value?
|
||||
if (fetchUsapPoolEnabledPropWithMinInterval()) {
|
||||
@@ -335,7 +333,7 @@ public class ZygoteProcess {
|
||||
return startViaZygote(processClass, niceName, uid, gid, gids,
|
||||
runtimeFlags, mountExternal, targetSdkVersion, seInfo,
|
||||
abi, instructionSet, appDataDir, invokeWith, /*startChildZygote=*/ false,
|
||||
packageName, useUsapPool, useSystemGraphicsDriver, zygoteArgs);
|
||||
packageName, useUsapPool, zygoteArgs);
|
||||
} catch (ZygoteStartFailedEx ex) {
|
||||
Log.e(LOG_TAG,
|
||||
"Starting VM process through Zygote failed");
|
||||
@@ -554,7 +552,6 @@ public class ZygoteProcess {
|
||||
boolean startChildZygote,
|
||||
@Nullable String packageName,
|
||||
boolean useUsapPool,
|
||||
boolean useSystemGraphicsDriver,
|
||||
@Nullable String[] extraArgs)
|
||||
throws ZygoteStartFailedEx {
|
||||
ArrayList<String> argsForZygote = new ArrayList<>();
|
||||
@@ -636,7 +633,7 @@ public class ZygoteProcess {
|
||||
// The USAP pool can not be used if the application will not use the systems graphics
|
||||
// driver. If that driver is requested use the Zygote application start path.
|
||||
return zygoteSendArgsAndGetResult(openZygoteSocketIfNeeded(abi),
|
||||
useUsapPool && useSystemGraphicsDriver,
|
||||
useUsapPool,
|
||||
argsForZygote);
|
||||
}
|
||||
}
|
||||
@@ -1147,8 +1144,7 @@ public class ZygoteProcess {
|
||||
gids, runtimeFlags, 0 /* mountExternal */, 0 /* targetSdkVersion */, seInfo,
|
||||
abi, instructionSet, null /* appDataDir */, null /* invokeWith */,
|
||||
true /* startChildZygote */, null /* packageName */,
|
||||
false /* useUsapPool */, false /*useSystemGraphicsDriver*/,
|
||||
extraArgs);
|
||||
false /* useUsapPool */, extraArgs);
|
||||
} catch (ZygoteStartFailedEx ex) {
|
||||
throw new RuntimeException("Starting child-zygote through Zygote failed", ex);
|
||||
}
|
||||
|
||||
@@ -512,9 +512,6 @@ public final class Zygote {
|
||||
Credentials peerCredentials = null;
|
||||
ZygoteArguments args = null;
|
||||
|
||||
// Load resources
|
||||
ZygoteInit.nativePreloadGraphicsDriver();
|
||||
|
||||
while (true) {
|
||||
try {
|
||||
sessionSocket = usapPoolSocket.accept();
|
||||
|
||||
@@ -63,7 +63,6 @@ import android.os.AppZygote;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.GraphicsEnvironment;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
@@ -705,16 +704,6 @@ public final class ProcessList {
|
||||
return prefix + "+" + Integer.toString(diff);
|
||||
}
|
||||
|
||||
private static boolean shouldUseSystemGraphicsDriver(Context context, Bundle coreSettings,
|
||||
ApplicationInfo applicationInfo) {
|
||||
final boolean shouldUseGameDriver =
|
||||
GraphicsEnvironment.shouldUseGameDriver(context, coreSettings, applicationInfo);
|
||||
final boolean shouldUseAngle =
|
||||
GraphicsEnvironment.shouldUseAngle(context, coreSettings,
|
||||
applicationInfo.packageName);
|
||||
return !shouldUseGameDriver && !shouldUseAngle;
|
||||
}
|
||||
|
||||
public static String makeOomAdjString(int setAdj, boolean compact) {
|
||||
if (setAdj >= ProcessList.CACHED_APP_MIN_ADJ) {
|
||||
return buildOomTag("cch", "cch", " ", setAdj,
|
||||
@@ -1811,8 +1800,6 @@ public final class ProcessList {
|
||||
String seInfo, String requiredAbi, String instructionSet, String invokeWith,
|
||||
long startTime) {
|
||||
try {
|
||||
final boolean useSystemGraphicsDriver = shouldUseSystemGraphicsDriver(mService.mContext,
|
||||
mService.mCoreSettingsObserver.getCoreSettingsLocked(), app.info);
|
||||
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "Start proc: " +
|
||||
app.processName);
|
||||
checkSlow(startTime, "startProcess: asking zygote to start proc");
|
||||
@@ -1822,7 +1809,6 @@ public final class ProcessList {
|
||||
app.processName, uid, uid, gids, runtimeFlags, mountExternal,
|
||||
app.info.targetSdkVersion, seInfo, requiredAbi, instructionSet,
|
||||
app.info.dataDir, null, app.info.packageName,
|
||||
useSystemGraphicsDriver,
|
||||
new String[] {PROC_START_SEQ_IDENT + app.startSeq});
|
||||
} else if (hostingRecord.usesAppZygote()) {
|
||||
final AppZygote appZygote = createAppZygoteForProcessIfNeeded(app);
|
||||
@@ -1831,14 +1817,13 @@ public final class ProcessList {
|
||||
app.processName, uid, uid, gids, runtimeFlags, mountExternal,
|
||||
app.info.targetSdkVersion, seInfo, requiredAbi, instructionSet,
|
||||
app.info.dataDir, null, app.info.packageName,
|
||||
/*useUsapPool=*/ false, useSystemGraphicsDriver,
|
||||
/*useUsapPool=*/ false,
|
||||
new String[] {PROC_START_SEQ_IDENT + app.startSeq});
|
||||
} else {
|
||||
startResult = Process.start(entryPoint,
|
||||
app.processName, uid, uid, gids, runtimeFlags, mountExternal,
|
||||
app.info.targetSdkVersion, seInfo, requiredAbi, instructionSet,
|
||||
app.info.dataDir, invokeWith, app.info.packageName,
|
||||
useSystemGraphicsDriver,
|
||||
new String[] {PROC_START_SEQ_IDENT + app.startSeq});
|
||||
}
|
||||
checkSlow(startTime, "startProcess: returned from zygote!");
|
||||
|
||||
Reference in New Issue
Block a user