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

Commit 77b9c764 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Removing memory object checks based on "dumpsys meminfo"" into udc-dev...

Merge "Removing memory object checks based on "dumpsys meminfo"" into udc-dev am: c0f24b4e am: 24301138

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23421682



Change-Id: I24e31426f5973cd04c6737ee452d45370a3acc80
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 807f6d18 24301138
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.launcher3.testing;

import static com.android.launcher3.testing.shared.TestProtocol.VIEW_AND_ACTIVITY_LEAKS;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;

@@ -25,10 +24,7 @@ import android.app.Application;
import android.content.Context;
import android.os.Binder;
import android.os.Bundle;
import android.os.Process;
import android.system.Os;
import android.util.Log;
import android.view.View;

import androidx.annotation.Keep;
import androidx.annotation.Nullable;
@@ -42,7 +38,6 @@ import com.android.launcher3.testing.shared.TestProtocol;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.CountDownLatch;
@@ -52,7 +47,6 @@ import java.util.concurrent.TimeUnit;
 * Class to handle requests from tests, including debug ones.
 */
public class DebugTestInformationHandler extends TestInformationHandler {
    private static LinkedList sLeaks;
    private static Collection<String> sEvents;
    private static Application.ActivityLifecycleCallbacks sActivityLifecycleCallbacks;
    private static final Map<Activity, Boolean> sActivities =
@@ -158,19 +152,6 @@ public class DebugTestInformationHandler extends TestInformationHandler {
                return response;
            }

            case TestProtocol.REQUEST_VIEW_LEAK: {
                if (sLeaks == null) sLeaks = new LinkedList();
                Log.d(VIEW_AND_ACTIVITY_LEAKS, "forcefully leaking 2 views");
                sLeaks.add(new View(mContext));
                sLeaks.add(new View(mContext));
                return response;
            }

            case TestProtocol.PRINT_VIEW_LEAK: {
                Log.d(VIEW_AND_ACTIVITY_LEAKS, "(pid=" + Process.myPid() + ") sLeaks=" + sLeaks);
                return response;
            }

            case TestProtocol.REQUEST_START_EVENT_LOGGING: {
                sEvents = new ArrayList<>();
                TestLogging.setEventConsumer(
+0 −3
Original line number Diff line number Diff line
@@ -105,8 +105,6 @@ public final class TestProtocol {
    public static final String REQUEST_WINDOW_INSETS = "window-insets";
    public static final String REQUEST_PID = "pid";
    public static final String REQUEST_FORCE_GC = "gc";
    public static final String REQUEST_VIEW_LEAK = "view-leak";
    public static final String PRINT_VIEW_LEAK = "print-leak";
    public static final String REQUEST_RECENT_TASKS_LIST = "recent-tasks-list";
    public static final String REQUEST_START_EVENT_LOGGING = "start-event-logging";
    public static final String REQUEST_GET_TEST_EVENTS = "get-test-events";
@@ -155,7 +153,6 @@ public final class TestProtocol {
    public static final String REQUEST_MOCK_SENSOR_ROTATION = "mock-sensor-rotation";

    public static final String PERMANENT_DIAG_TAG = "TaplTarget";
    public static final String VIEW_AND_ACTIVITY_LEAKS = "b/260260325";
    public static final String WORK_TAB_MISSING = "b/243688989";
    public static final String TWO_TASKBAR_LONG_CLICKS = "b/262282528";
    public static final String WORKSPACE_LOADS_FOREVER = "b/267200150";
+0 −8
Original line number Diff line number Diff line
@@ -1856,14 +1856,6 @@ public final class LauncherInstrumentation {
        return testInfo != null ? testInfo.getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD) : null;
    }

    public void produceViewLeak() {
        getTestInfo(TestProtocol.REQUEST_VIEW_LEAK);
    }

    public void printViewLeak() {
        getTestInfo(TestProtocol.PRINT_VIEW_LEAK);
    }

    public ArrayList<ComponentName> getRecentTasks() {
        ArrayList<ComponentName> tasks = new ArrayList<>();
        ArrayList<String> components = getTestInfo(TestProtocol.REQUEST_RECENT_TASKS_LIST)