public boolean onKeyPreIme(int keyCode, KeyEvent event) { if (keyCode == 4) { DispatcherState state; if (event.getAction() == 0 && event.getRepeatCount() == 0) { state = getKeyDispatcherState(); if (state == null) { return true; } state.startTracking(event, this); return true; } else if (event.getAction() == 1) { state = getKeyDispatcherState(); if (state != null) { state.handleUpEvent(event); } if (event.isTracking() && !event.isCanceled()) { this.mSearchView.clearFocus(); this.mSearchView.setImeVisibility(false); return true; } } } return super.onKeyPreIme(keyCode, event); }
public boolean onKeyPreIme(int keyCode, KeyEvent event) { if (keyCode == 4 && isShowing()) { View anchorView = this.mDropDownAnchorView; DispatcherState state; if (event.getAction() == 0 && event.getRepeatCount() == 0) { state = anchorView.getKeyDispatcherState(); if (state == null) { return true; } state.startTracking(event, this); return true; } else if (event.getAction() == 1) { state = anchorView.getKeyDispatcherState(); if (state != null) { state.handleUpEvent(event); } if (event.isTracking() && !event.isCanceled()) { dismiss(); return true; } } } return false; }
public boolean onKeyPreIme(int i, KeyEvent keyEvent) { if (i == 4) { DispatcherState keyDispatcherState; if (keyEvent.getAction() == 0 && keyEvent.getRepeatCount() == 0) { keyDispatcherState = getKeyDispatcherState(); if (keyDispatcherState == null) { return true; } keyDispatcherState.startTracking(keyEvent, this); return true; } else if (keyEvent.getAction() == 1) { keyDispatcherState = getKeyDispatcherState(); if (keyDispatcherState != null) { keyDispatcherState.handleUpEvent(keyEvent); } if (keyEvent.isTracking() && !keyEvent.isCanceled()) { this.f1186b.clearFocus(); this.f1186b.setImeVisibility(false); return true; } } } return super.onKeyPreIme(i, keyEvent); }
public boolean onKeyPreIme(int paramInt, KeyEvent paramKeyEvent) { if ((paramInt == 4) && (hasFocus()) && (paramKeyEvent.getAction() == 1)) { KeyEvent.DispatcherState localDispatcherState = getKeyDispatcherState(); if (localDispatcherState != null) { localDispatcherState.handleUpEvent(paramKeyEvent); } if (!paramKeyEvent.isCanceled()) { clearFocus(); return true; } } return super.onKeyPreIme(paramInt, paramKeyEvent); }
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { if (keyCode == 82 || keyCode == 4) { Window win; View decor; DispatcherState ds; if (event.getAction() == 0 && event.getRepeatCount() == 0) { win = this.mDialog.getWindow(); if (win != null) { decor = win.getDecorView(); if (decor != null) { ds = decor.getKeyDispatcherState(); if (ds != null) { ds.startTracking(event, this); return true; } } } } else if (event.getAction() == 1 && !event.isCanceled()) { win = this.mDialog.getWindow(); if (win != null) { decor = win.getDecorView(); if (decor != null) { ds = decor.getKeyDispatcherState(); if (ds != null && ds.isTracking(event)) { this.mMenu.close(true); dialog.dismiss(); return true; } } } } } return this.mMenu.performShortcut(keyCode, event, 0); }
public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) { if (i == 82 || i == 4) { Window window; View decorView; DispatcherState keyDispatcherState; if (keyEvent.getAction() == 0 && keyEvent.getRepeatCount() == 0) { window = this.f1018c.getWindow(); if (window != null) { decorView = window.getDecorView(); if (decorView != null) { keyDispatcherState = decorView.getKeyDispatcherState(); if (keyDispatcherState != null) { keyDispatcherState.startTracking(keyEvent, this); return true; } } } } else if (keyEvent.getAction() == 1 && !keyEvent.isCanceled()) { window = this.f1018c.getWindow(); if (window != null) { decorView = window.getDecorView(); if (decorView != null) { keyDispatcherState = decorView.getKeyDispatcherState(); if (keyDispatcherState != null && keyDispatcherState.isTracking(keyEvent)) { this.f1017b.m2115a(true); dialogInterface.dismiss(); return true; } } } } } return this.f1017b.performShortcut(i, keyEvent, 0); }
public boolean onKeyPreIme(int paramInt, KeyEvent paramKeyEvent) { if (paramInt == 4) { if ((paramKeyEvent.getAction() == 0) && (paramKeyEvent.getRepeatCount() == 0)) { KeyEvent.DispatcherState localDispatcherState2 = getKeyDispatcherState(); if (localDispatcherState2 != null) { localDispatcherState2.startTracking(paramKeyEvent, this); } return true; } if (paramKeyEvent.getAction() == 1) { KeyEvent.DispatcherState localDispatcherState1 = getKeyDispatcherState(); if (localDispatcherState1 != null) { localDispatcherState1.handleUpEvent(paramKeyEvent); } if ((paramKeyEvent.isTracking()) && (!paramKeyEvent.isCanceled())) { this.mSearchView.clearFocus(); this.mSearchView.setImeVisibility(false); return true; } } } return super.onKeyPreIme(paramInt, paramKeyEvent); }
public boolean onKeyPreIme(int paramInt, KeyEvent paramKeyEvent) { if (paramInt == 4) { if ((paramKeyEvent.getAction() == 0) && (paramKeyEvent.getRepeatCount() == 0)) { KeyEvent.DispatcherState localDispatcherState2 = getKeyDispatcherState(); if (localDispatcherState2 != null) { localDispatcherState2.startTracking(paramKeyEvent, this); } return true; } if (paramKeyEvent.getAction() == 1) { KeyEvent.DispatcherState localDispatcherState1 = getKeyDispatcherState(); if (localDispatcherState1 != null) { localDispatcherState1.handleUpEvent(paramKeyEvent); } if ((paramKeyEvent.isTracking()) && (!paramKeyEvent.isCanceled())) { this.a.clearFocus(); this.a.b(false); return true; } } } return super.onKeyPreIme(paramInt, paramKeyEvent); }
public static boolean dispatch(KeyEvent event, Callback receiver, Object state, Object target) { return event.dispatch(receiver, (DispatcherState) state, target); }
public final boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent) { if ((paramInt == 82) || (paramInt == 4)) { if ((paramKeyEvent.getAction() == 0) && (paramKeyEvent.getRepeatCount() == 0)) { Window localWindow2 = this.mDialog.getWindow(); if (localWindow2 != null) { View localView2 = localWindow2.getDecorView(); if (localView2 != null) { KeyEvent.DispatcherState localDispatcherState2 = localView2.getKeyDispatcherState(); if (localDispatcherState2 != null) { localDispatcherState2.startTracking(paramKeyEvent, this); return true; } } } } else if ((paramKeyEvent.getAction() == 1) && (!paramKeyEvent.isCanceled())) { Window localWindow1 = this.mDialog.getWindow(); if (localWindow1 != null) { View localView1 = localWindow1.getDecorView(); if (localView1 != null) { KeyEvent.DispatcherState localDispatcherState1 = localView1.getKeyDispatcherState(); if ((localDispatcherState1 != null) && (localDispatcherState1.isTracking(paramKeyEvent))) { this.mMenu.close(true); paramDialogInterface.dismiss(); return true; } } } } } return this.mMenu.performShortcut(paramInt, paramKeyEvent, 0); }