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

Commit 7da243d4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clean up unused code for Underlay." into main

parents 5f0beb75 37d29de5
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@ import android.util.SparseBooleanArray;
import android.view.contentcapture.ContentCaptureCondition;
import android.view.contentcapture.DataRemovalRequest;
import android.view.contentcapture.DataShareRequest;
import android.view.contentcapture.flags.Flags;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.os.IResultReceiver;
@@ -97,9 +96,6 @@ final class ContentCapturePerUserService
    static final int EVENT_LOG_CONNECT_STATE_CONNECTED = 1;
    static final int EVENT_LOG_CONNECT_STATE_DISCONNECTED = 2;

    private final String ACTION_CREATE_UNDERLAY = "com.systemui.underlay.action.CREATE_UNDERLAY";
    private final String ACTION_DESTROY_UNDERLAY = "com.systemui.underlay.action.DESTROY_UNDERLAY";

    @GuardedBy("mLock")
    private final SparseArray<ContentCaptureServerSession> mSessions = new SparseArray<>();

@@ -370,11 +366,6 @@ final class ContentCapturePerUserService
        }
        mSessions.put(sessionId, newSession);
        newSession.notifySessionStartedLocked(clientReceiver);

        if (Flags.enableSystemUiUnderlay()) {
            if (mMaster.debug) Slog.d(mTag, "startSessionLocked " + componentName);
            createSystemUIUnderlay(newSession.getSessionId(), activityId);
        }
    }

    @GuardedBy("mLock")
@@ -585,33 +576,9 @@ final class ContentCapturePerUserService

        if (mMaster.verbose) Slog.v(mTag, "onActivityEvent(): " + event);

        if (Flags.enableSystemUiUnderlay()) {
            if (type == ActivityEvent.TYPE_ACTIVITY_STARTED) {
                ContentCaptureServerSession session = getSession(activityId);
                if (session != null) {
                    createSystemUIUnderlay(session.getSessionId(), activityId);
                }
            } else if (type == ActivityEvent.TYPE_ACTIVITY_STOPPED) {
                ContentCaptureServerSession session = getSession(activityId);
                if (session != null) {
                    destroySystemUIUnderlay(session.getSessionId(), activityId);
                }
            }
        }

        mRemoteService.onActivityLifecycleEvent(event);
    }

    private void createSystemUIUnderlay(int sessionId, ActivityId activityId) {
        if (mMaster.debug) Slog.d(mTag, "createSystemUIUnderlay: " + sessionId);
        // TODO: b/403422950 migrate to aidl when available
    }

    private void destroySystemUIUnderlay(int sessionId, ActivityId activityId) {
        if (mMaster.debug) Slog.d(mTag, "destroySystemUIUnderlay: " + sessionId);
        // TODO: b/403422950 migrate to aidl when available
    }

    @Override
    protected void dumpLocked(String prefix, PrintWriter pw) {
        super.dumpLocked(prefix, pw);