Exploit database

GH-31c028f5638c2b362488617d5ac6548b

pvharmo2/gha-lab-360f77d0d4

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-39866

2 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files17

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

quickstep/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java

Java · 2,406 bytes
package com.android.quickstep.inputconsumers;

import android.view.MotionEvent;

import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.quickstep.InputConsumer;
import com.android.quickstep.util.ActiveGestureProtoLogProxy;
import com.android.systemui.shared.system.InputMonitorCompat;

public abstract class DelegateInputConsumer implements InputConsumer {

    protected static final int STATE_INACTIVE = 0;
    protected static final int STATE_ACTIVE = 1;
    protected static final int STATE_DELEGATE_ACTIVE = 2;

    protected final InputConsumer mDelegate;
    protected final InputMonitorCompat mInputMonitor;

    private final int mDisplayId;

    protected int mState;

    public DelegateInputConsumer(
            int displayId, InputConsumer delegate, InputMonitorCompat inputMonitor) {
        mDisplayId = displayId;
        mDelegate = delegate;
        mInputMonitor = inputMonitor;
        mState = STATE_INACTIVE;
    }

    @Override
    public int getDisplayId() {
        return mDisplayId;
    }

    @Override
    public InputConsumer getActiveConsumerInHierarchy() {
        if (mState == STATE_ACTIVE) {
            return this;
        }
        return mDelegate.getActiveConsumerInHierarchy();
    }

    @Override
    public boolean allowInterceptByParent() {
        return mDelegate.allowInterceptByParent() && mState != STATE_ACTIVE;
    }

    @Override
    public void onConsumerAboutToBeSwitched() {
        mDelegate.onConsumerAboutToBeSwitched();
    }

    /**
     * Returns the name of this DelegateInputConsumer.
     */
    protected abstract String getDelegatorName();

    @Override
    public <T extends InputConsumer> T getInputConsumerOfClass(Class<T> c) {
        if (getClass().equals(c)) {
            return c.cast(this);
        }
        return mDelegate.getInputConsumerOfClass(c);
    }

    protected void setActive(MotionEvent ev) {
        ActiveGestureProtoLogProxy.logInputConsumerBecameActive(getDelegatorName());

        mState = STATE_ACTIVE;
        TestLogging.recordEvent(TestProtocol.SEQUENCE_PILFER, "pilferPointers");
        mInputMonitor.pilferPointers();

        // Send cancel event
        MotionEvent event = MotionEvent.obtain(ev);
        event.setAction(MotionEvent.ACTION_CANCEL);
        mDelegate.onMotionEvent(event);
        event.recycle();
    }
}