Volume Down + Power Key 조합입니다.
하지만 ODROID는 Volume Up/Down키와 Power Key가 동시에 눌러지지 않는 형태입니다.
Screenshot으로 검색해 보면 PhoneWindowManager.java에 관련 코드가 찾아 집니다.
frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags, boolean isScreenOn) {
...
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_DOWN:
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_MUTE: {
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
if (down) {
if (isScreenOn && !mVolumeDownKeyTriggered
&& (event.getFlags() & KeyEvent.FLAG_FALLBACK) == 0) {
mVolumeDownKeyTriggered = true;
mVolumeDownKeyTime = event.getDownTime();
mVolumeDownKeyConsumedByScreenshotChord = false;
cancelPendingPowerKeyAction();
interceptScreenshotChord();
}
} else {
여기서 KEYCODE_VOLUME_DOWN -> KEYCODE_SEARCH으로 바꿉니다.
switch (keyCode) {
case KeyEvent.KEYCODE_SEARCH:
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_MUTE: {
if (keyCode == KeyEvent.KEYCODE_SEARCH) {
if (down) {
if (isScreenOn && !mVolumeDownKeyTriggered
&& (event.getFlags() & KeyEvent.FLAG_FALLBACK) == 0) {
mVolumeDownKeyTriggered = true;
mVolumeDownKeyTime = event.getDownTime();
mVolumeDownKeyConsumedByScreenshotChord = false;
cancelPendingPowerKeyAction();
interceptScreenshotChord();
}
} else {
그럼 Power Key와 Search Key를 동시에 1초 누르면 screenshot이 찍힙니다.
댓글 없음:
댓글 쓰기