Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b0c11da authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #5150899: Call activity takes 15MB we never get back."

parents a59e3146 5d927c2d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23714,7 +23714,7 @@ package android.view {
    field public static final int FLAGS_CHANGED = 4; // 0x4
    field public static final int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 1; // 0x1
    field public static final int FLAG_ALT_FOCUSABLE_IM = 131072; // 0x20000
    field public static final int FLAG_BLUR_BEHIND = 4; // 0x4
    field public static final deprecated int FLAG_BLUR_BEHIND = 4; // 0x4
    field public static final int FLAG_DIM_BEHIND = 2; // 0x2
    field public static final int FLAG_DISMISS_KEYGUARD = 4194304; // 0x400000
    field public static final int FLAG_DITHER = 4096; // 0x1000
+16 −4
Original line number Diff line number Diff line
@@ -372,6 +372,7 @@ public final class ActivityThread {
        IInstrumentationWatcher instrumentationWatcher;
        int debugMode;
        boolean restrictedBackupMode;
        boolean persistent;
        Configuration config;
        CompatibilityInfo compatInfo;
        boolean handlingProfiling;
@@ -644,9 +645,9 @@ public final class ActivityThread {
                ComponentName instrumentationName, String profileFile,
                ParcelFileDescriptor profileFd, boolean autoStopProfiler,
                Bundle instrumentationArgs, IInstrumentationWatcher instrumentationWatcher,
                int debugMode, boolean isRestrictedBackupMode, Configuration config,
                CompatibilityInfo compatInfo, Map<String, IBinder> services,
                Bundle coreSettings) {
                int debugMode, boolean isRestrictedBackupMode, boolean persistent,
                Configuration config, CompatibilityInfo compatInfo,
                Map<String, IBinder> services, Bundle coreSettings) {

            if (services != null) {
                // Setup the service cache in the ServiceManager
@@ -666,6 +667,7 @@ public final class ActivityThread {
            data.instrumentationWatcher = instrumentationWatcher;
            data.debugMode = debugMode;
            data.restrictedBackupMode = isRestrictedBackupMode;
            data.persistent = persistent;
            data.config = config;
            data.compatInfo = compatInfo;
            queueOrSendMessage(H.BIND_APPLICATION, data);
@@ -3687,6 +3689,16 @@ public final class ActivityThread {
        Process.setArgV0(data.processName);
        android.ddm.DdmHandleAppName.setAppName(data.processName);

        if (data.persistent) {
            // Persistent processes on low-memory devices do not get to
            // use hardware accelerated drawing, since this can add too much
            // overhead to the process.
            Display display = WindowManagerImpl.getDefault().getDefaultDisplay();
            if (!ActivityManager.isHighEndGfx(display)) {
                HardwareRenderer.disable(false);
            }
        }

        if (data.profileFd != null) {
            data.startProfiling();
        }
@@ -4242,7 +4254,7 @@ public final class ActivityThread {
    }

    public static final ActivityThread systemMain() {
        HardwareRenderer.disable();
        HardwareRenderer.disable(true);
        ActivityThread thread = new ActivityThread();
        thread.attach(true);
        return thread;
+5 −3
Original line number Diff line number Diff line
@@ -267,13 +267,14 @@ public abstract class ApplicationThreadNative extends Binder
            IInstrumentationWatcher testWatcher = IInstrumentationWatcher.Stub.asInterface(binder);
            int testMode = data.readInt();
            boolean restrictedBackupMode = (data.readInt() != 0);
            boolean persistent = (data.readInt() != 0);
            Configuration config = Configuration.CREATOR.createFromParcel(data);
            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
            HashMap<String, IBinder> services = data.readHashMap(null);
            Bundle coreSettings = data.readBundle();
            bindApplication(packageName, info,
                            providers, testName, profileName, profileFd, autoStopProfiler,
                            testArgs, testWatcher, testMode, restrictedBackupMode,
                            testArgs, testWatcher, testMode, restrictedBackupMode, persistent,
                            config, compatInfo, services, coreSettings);
            return true;
        }
@@ -811,8 +812,8 @@ class ApplicationThreadProxy implements IApplicationThread {
    public final void bindApplication(String packageName, ApplicationInfo info,
            List<ProviderInfo> providers, ComponentName testName, String profileName,
            ParcelFileDescriptor profileFd, boolean autoStopProfiler, Bundle testArgs,
            IInstrumentationWatcher testWatcher, int debugMode,
            boolean restrictedBackupMode, Configuration config, CompatibilityInfo compatInfo,
            IInstrumentationWatcher testWatcher, int debugMode, boolean restrictedBackupMode,
            boolean persistent, Configuration config, CompatibilityInfo compatInfo,
            Map<String, IBinder> services, Bundle coreSettings) throws RemoteException {
        Parcel data = Parcel.obtain();
        data.writeInterfaceToken(IApplicationThread.descriptor);
@@ -837,6 +838,7 @@ class ApplicationThreadProxy implements IApplicationThread {
        data.writeStrongInterface(testWatcher);
        data.writeInt(debugMode);
        data.writeInt(restrictedBackupMode ? 1 : 0);
        data.writeInt(persistent ? 1 : 0);
        config.writeToParcel(data, 0);
        compatInfo.writeToParcel(data, 0);
        data.writeMap(services);
+2 −2
Original line number Diff line number Diff line
@@ -88,8 +88,8 @@ public interface IApplicationThread extends IInterface {
    static final int DEBUG_WAIT = 2;
    void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers,
            ComponentName testName, String profileName, ParcelFileDescriptor profileFd,
            boolean autoStopProfiler, Bundle testArguments,
            IInstrumentationWatcher testWatcher, int debugMode, boolean restrictedBackupMode,
            boolean autoStopProfiler, Bundle testArguments, IInstrumentationWatcher testWatcher,
            int debugMode, boolean restrictedBackupMode, boolean persistent,
            Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
            Bundle coreSettings) throws RemoteException;
    void scheduleExit() throws RemoteException;
+11 −1
Original line number Diff line number Diff line
@@ -94,6 +94,13 @@ public abstract class HardwareRenderer {
     */
    public static boolean sRendererDisabled = false;

    /**
     * Further hardware renderer disabling for the system process.
     * 
     * @hide
     */
    public static boolean sSystemRendererDisabled = false;

    private boolean mEnabled;
    private boolean mRequested = true;

@@ -102,8 +109,11 @@ public abstract class HardwareRenderer {
     * 
     * @hide
     */
    public static void disable() {
    public static void disable(boolean system) {
        sRendererDisabled = true;
        if (system) {
            sSystemRendererDisabled = true;
        }
    }

    /**
Loading