AlternateRecentsComponent recents = Recents.getRecentsComponent(
context.getApplicationContext(), true);
switch (intent.getAction()) {
case ACTION_PROXY_SHOW_RECENTS_TO_USER: {
boolean triggeredFromAltTab = intent.getBooleanExtra(
AlternateRecentsComponent.EXTRA_TRIGGERED_FROM_ALT_TAB, false);
recents.showRecents(triggeredFromAltTab);
break;
}
case ACTION_PROXY_HIDE_RECENTS_TO_USER: {
boolean triggeredFromAltTab = intent.getBooleanExtra(
AlternateRecentsComponent.EXTRA_TRIGGERED_FROM_ALT_TAB, false);
boolean triggeredFromHome = intent.getBooleanExtra(
AlternateRecentsComponent.EXTRA_TRIGGERED_FROM_HOME_KEY, false);
recents.hideRecents(triggeredFromAltTab, triggeredFromHome);
break;
}
case ACTION_PROXY_TOGGLE_RECENTS_TO_USER:
recents.toggleRecents();
break;
case ACTION_PROXY_PRELOAD_RECENTS_TO_USER:
recents.preloadRecents();
break;
case ACTION_PROXY_CONFIG_CHANGE_TO_USER:
recents.configurationChanged();
break;
}