@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (isWorkspaceLocked())
return true;
boolean handled = super.onKeyDown(keyCode, event);
if (!handled && acceptFilter() && keyCode != KeyEvent.KEYCODE_ENTER) {
boolean gotKey = TextKeyListener.getInstance().onKeyDown(
mWorkspace, mDefaultKeySsb, keyCode, event);
if (gotKey && mDefaultKeySsb != null && mDefaultKeySsb.length() > 0) {
// something usable has been typed - start a search
// the typed text will be retrieved and cleared by
// showSearchDialog()
// If there are multiple keystrokes before the search dialog
// takes focus,
// onSearchRequested() will be called for every keystroke,
// but it is idempotent, so it's fine.
return onSearchRequested();
}
}
// Eat the long press event so the keyboard doesn't come up.
if (keyCode == KeyEvent.KEYCODE_MENU && event.isLongPress()) {
return true;
}
if (keyCode == KeyEvent.KEYCODE_BACK && mThumbnailWorkspace.isVisible()) {
int currPageIndex = ((CellLayout) mWorkspace.getChildAt(mWorkspace.getCurrentScreen())).getPageIndex();
mThumbnailWorkspace.setmCurSelectedScreenIndex(currPageIndex);
closeThumbnailWorkspace(true);
return true;
}
return handled;
}
Launcher.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:fruit.launcher
作者:
评论列表
文章目录