public void hide(boolean animate) { if (mBar != null) { // This will indirectly cause show(false, ...) to get called mBar.animateCollapse(CommandQueue.FLAG_EXCLUDE_NONE); } else { setVisibility(View.INVISIBLE); } }
private void startAssistActivity() { // Close Recent Apps if needed mBar.animateCollapse(CommandQueue.FLAG_EXCLUDE_SEARCH_PANEL); // Launch Assist Intent intent = SearchManager.getAssistIntent(mContext); if (intent == null) return; try { ActivityOptions opts = ActivityOptions.makeCustomAnimation( mContext, R.anim.search_launch_enter, R.anim.search_launch_exit, getHandler(), this); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(intent, opts.toBundle()); } catch (ActivityNotFoundException e) { Slog.w(TAG, "Activity not found for " + intent.getAction()); onAnimationStarted(); } }