use of com.android.systemui.recents.RecentsActivityLaunchState in project android_frameworks_base by ResurrectionRemix.
the class RecentsTvActivity method onStop.
@Override
protected void onStop() {
super.onStop();
mIgnoreAltTabRelease = false;
// Notify that recents is now hidden
EventBus.getDefault().send(new RecentsVisibilityChangedEvent(this, false));
// Workaround for b/22542869, if the RecentsActivity is started again, but without going
// through SystemUI, we need to reset the config launch flags to ensure that we do not
// wait on the system to send a signal that was never queued.
RecentsConfiguration config = Recents.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
launchState.reset();
// Workaround for b/28333917.
finish();
}
use of com.android.systemui.recents.RecentsActivityLaunchState in project android_frameworks_base by ResurrectionRemix.
the class RecentsTvView method init.
/**
* Initialize the view.
*/
public void init(TaskStack stack) {
RecentsConfiguration config = Recents.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
mStack = stack;
mTaskStackHorizontalView.init(stack);
if (stack.getStackTaskCount() > 0) {
hideEmptyView();
} else {
showEmptyView();
}
// Layout with the new stack
requestLayout();
}
use of com.android.systemui.recents.RecentsActivityLaunchState in project android_frameworks_base by ResurrectionRemix.
the class RecentsTvImpl method startRecentsActivity.
protected void startRecentsActivity(ActivityManager.RunningTaskInfo runningTask, ActivityOptions opts, boolean fromHome, boolean fromThumbnail) {
// Update the configuration based on the launch options
RecentsConfiguration config = Recents.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
launchState.launchedFromHome = fromHome;
launchState.launchedFromApp = fromThumbnail;
launchState.launchedToTaskId = (runningTask != null) ? runningTask.id : -1;
launchState.launchedWithAltTab = mTriggeredFromAltTab;
Intent intent = new Intent();
intent.setClassName(RECENTS_PACKAGE, RECENTS_TV_ACTIVITY);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_TASK_ON_HOME);
if (opts != null) {
mContext.startActivityAsUser(intent, opts.toBundle(), UserHandle.CURRENT);
} else {
mContext.startActivityAsUser(intent, UserHandle.CURRENT);
}
EventBus.getDefault().send(new RecentsActivityStartingEvent());
}
use of com.android.systemui.recents.RecentsActivityLaunchState in project android_frameworks_base by crdroidandroid.
the class TaskStackLayoutAlgorithm method getInitialFocusState.
/**
* Returns the default focus state.
*/
public int getInitialFocusState() {
RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
RecentsDebugFlags debugFlags = Recents.getDebugFlags();
if (debugFlags.isPagingEnabled() || launchState.launchedWithAltTab) {
return STATE_FOCUSED;
} else {
return STATE_UNFOCUSED;
}
}
use of com.android.systemui.recents.RecentsActivityLaunchState in project android_frameworks_base by crdroidandroid.
the class RecentsTvView method init.
/**
* Initialize the view.
*/
public void init(TaskStack stack) {
RecentsConfiguration config = Recents.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
mStack = stack;
mTaskStackHorizontalView.init(stack);
if (stack.getStackTaskCount() > 0) {
hideEmptyView();
} else {
showEmptyView();
}
// Layout with the new stack
requestLayout();
}
Aggregations