Skip to content
Commit 7c0aab93 authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Correct method signature of screenshot keychord invocation

Fixes the screenshot call in PhoneWindowManager so that the
screenshot source is correctly set.

The root cause is that Handler.java has method signatures:

obtainMessage(int msg, int arg1, int arg2)
obtainMessage(int msg, Object obj)

As part of the ScreenshotRequest refactor (ag/20894854), arg2 was no longer needed in PhoneWindowManager and was removed. However, this silently changed the signature (setting msg.obj instead of msg.arg1), and wasn't noticed since the int arg1 just gets cast to an object. Ultimately this makes the argument default to 0, which (once the ScreenshotRequest is constructed) gets translated to describing a global actions invocation.

Bug: b/273560369
Fix: b/273560369
Test: manual (invoke a screenshot using the keychord, verify that
we get a SCREENSHOT_REQUESTED_KEYCHORD log)

Change-Id: I6337226ce7d36aed874e3d3a1a6ebc4ff9a00920
parent edf1ca06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment