diff options
| author | Chris Wailes <chriswailes@google.com> | 2019-06-07 16:49:46 -0700 |
|---|---|---|
| committer | Chris Wailes <chriswailes@google.com> | 2019-06-11 16:34:40 -0700 |
| commit | bed1976f858d369b1ea9086c8c7e77573308c90c (patch) | |
| tree | b6c444bc9fed7e83ab818bba78f257930e4133cb /core/java/android | |
| parent | bd32a804ef2de48c2b1ad1dc5967441e3993c43e (diff) | |
Removes unused code from the SystemServer/Zygote classes.
This patch partially reversts ag/6991475 and ag/7161709. These changes
are no longer needed due to a change in the graphics driver strategy for
Q.
In addition, the preloading of the graphics driver in the USAPs need to
be removed to avoid causing a memory regression on devices with graphics
driver preloading in the Zygote disabled.
Bug: 134526352
Test: Treehugger
Change-Id: I570037866d1ae90794c711622e6045ebbffa5b9c
Merged-In: I570037866d1ae90794c711622e6045ebbffa5b9c
(cherry picked from commit fcd68fd74b6d2704fc39074f1e177b0c0defc43c)
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/os/Process.java | 9 | ||||
| -rw-r--r-- | core/java/android/os/ZygoteProcess.java | 10 |
2 files changed, 5 insertions, 14 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index e50ab6cfc017..74c89d6898e5 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -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); } /** diff --git a/core/java/android/os/ZygoteProcess.java b/core/java/android/os/ZygoteProcess.java index d42478e5031d..9bcdceef61f1 100644 --- a/core/java/android/os/ZygoteProcess.java +++ b/core/java/android/os/ZygoteProcess.java @@ -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); } |
