Associate UHID devices to displays on Android 15 by yume-chan · Pull Request #6009 · Genymobile/scrcpy (original) (raw)

rom1v

@yume-chan

@yume-chan

rom1v added a commit that referenced this pull request

May 22, 2025

@rom1v

Use the public ClipboardManager API, with the FakeContext as context.

PR #6009 <#6009>

Suggested by: Simon Chan 1330321+yume-chan@users.noreply.github.com

rom1v pushed a commit that referenced this pull request

May 22, 2025

@yume-chan @rom1v

Use the public InputManager API.

PR #6009 <#6009>

Signed-off-by: Romain Vimont rom@rom1v.com

rom1v added a commit that referenced this pull request

May 22, 2025

@rom1v

Do not use reflection to retrieve the method for every call.

PR #6009 <#6009>

rom1v added a commit that referenced this pull request

May 22, 2025

@rom1v

The DisplayManager and its method getDisplayInfo() may be used from both the Controller thread and the video (main) thread.

PR #6009 <#6009>

rom1v pushed a commit that referenced this pull request

May 22, 2025

@yume-chan @rom1v

This allows the mouse pointer to appear on the correct display (only for devices running Android 15+).

Fixes #5547 <#5547> PR #6009 <#6009>

Signed-off-by: Romain Vimont rom@rom1v.com

rom1v added a commit that referenced this pull request

Jun 3, 2025

@rom1v

Calling wait(0) results in waiting without a timeout, which is unintended.

Refs #6009 comment <#6009 (comment)>

@yume-chan yume-chan changed the titleAssociate UHID devices to virtual displays on Android 14+ Associate UHID devices to virtual displays on Android 15

Jun 4, 2025

@yume-chan yume-chan changed the titleAssociate UHID devices to virtual displays on Android 15 Associate UHID devices to displays on Android 15

Jun 4, 2025

rom1v pushed a commit that referenced this pull request

Jun 5, 2025

@yume-chan @rom1v

Use the public InputManager API.

PR #6009 <#6009>

Signed-off-by: Romain Vimont rom@rom1v.com

rom1v added a commit that referenced this pull request

Jun 5, 2025

@rom1v

Do not use reflection to retrieve the method for every call.

PR #6009 <#6009>

rom1v added a commit that referenced this pull request

Jun 5, 2025

@rom1v

The DisplayManager and its method getDisplayInfo() may be used from both the Controller thread and the video (main) thread.

PR #6009 <#6009>

rom1v pushed a commit that referenced this pull request

Jun 5, 2025

@yume-chan @rom1v

This allows the mouse pointer to appear on the correct display (only for devices running Android 15+).

Fixes #5547 <#5547> PR #6009 <#6009>

Signed-off-by: Romain Vimont rom@rom1v.com

rom1v added a commit that referenced this pull request

Jun 5, 2025

@rom1v

This will allow the main thread to process any event posted to the main looper.

Refs #6009 comment <#6009 (comment)>

rom1v added a commit that referenced this pull request

Jun 5, 2025

@rom1v

Use the public ClipboardManager API, with the FakeContext as context.

This requires an active main looper, otherwise clipboard changes are not processed.

PR #6009 <#6009>

Suggested by: Simon Chan 1330321+yume-chan@users.noreply.github.com

rom1v added a commit that referenced this pull request

Jun 5, 2025

@rom1v

Use the public ClipboardManager API, with the FakeContext as context.

This requires a running main looper, otherwise clipboard changes are not processed.

PR #6009 <#6009>

Suggested by: Simon Chan 1330321+yume-chan@users.noreply.github.com

@rom1v rom1v mentioned this pull request

Jun 5, 2025

rom1v added a commit that referenced this pull request

Jun 6, 2025

@rom1v

Instead of blocking the main thread until completion, run a looper.

This will allow the main thread to process any event posted to the main looper.

Refs #6009 comment <#6009 (comment)>

rom1v added a commit that referenced this pull request

Jun 6, 2025

@rom1v

Use the public ClipboardManager API, with the FakeContext as context.

This requires a running main looper, otherwise clipboard changes are not processed.

PR #6009 <#6009>

Suggested by: Simon Chan 1330321+yume-chan@users.noreply.github.com

rom1v added a commit that referenced this pull request

Jun 11, 2025

@rom1v

Instead of blocking the main thread until completion, run a looper.

This will allow the main thread to process any event posted to the main looper.

Refs #6009 comment <#6009 (comment)> PR #6129 <#6129>

rom1v added a commit that referenced this pull request

Jun 11, 2025

@rom1v

Use the public ClipboardManager API, with the FakeContext as context.

This requires a running main looper, otherwise clipboard changes are not processed.

Refs #6009 <#6009> PR #6129 <#6129>

Suggested by: Simon Chan 1330321+yume-chan@users.noreply.github.com

This was referenced

Jun 11, 2025

rom1v added a commit that referenced this pull request

Nov 4, 2025

@rom1v

On some devices, DisplayInfo does not have a "uniqueId" field. This field is only used for correct UHID behavior on virtual displays, so its absence should not prevent scrcpy from working.

Refs #6009 <#6009> Fixes #6461 <#6461>

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})