Search in sources :

Example 26 with RecentsActivityLaunchState

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();
}
Also used : RecentsActivityLaunchState(com.android.systemui.recents.RecentsActivityLaunchState) RecentsConfiguration(com.android.systemui.recents.RecentsConfiguration) RecentsVisibilityChangedEvent(com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent)

Example 27 with RecentsActivityLaunchState

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();
}
Also used : RecentsActivityLaunchState(com.android.systemui.recents.RecentsActivityLaunchState) RecentsConfiguration(com.android.systemui.recents.RecentsConfiguration)

Example 28 with RecentsActivityLaunchState

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());
}
Also used : RecentsActivityStartingEvent(com.android.systemui.recents.events.activity.RecentsActivityStartingEvent) RecentsActivityLaunchState(com.android.systemui.recents.RecentsActivityLaunchState) RecentsConfiguration(com.android.systemui.recents.RecentsConfiguration) Intent(android.content.Intent)

Example 29 with RecentsActivityLaunchState

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;
    }
}
Also used : RecentsActivityLaunchState(com.android.systemui.recents.RecentsActivityLaunchState) RecentsDebugFlags(com.android.systemui.recents.RecentsDebugFlags)

Example 30 with RecentsActivityLaunchState

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();
}
Also used : RecentsActivityLaunchState(com.android.systemui.recents.RecentsActivityLaunchState) RecentsConfiguration(com.android.systemui.recents.RecentsConfiguration)

Aggregations

RecentsActivityLaunchState (com.android.systemui.recents.RecentsActivityLaunchState)75 RecentsConfiguration (com.android.systemui.recents.RecentsConfiguration)45 Task (com.android.systemui.recents.model.Task)30 SystemServicesProxy (com.android.systemui.recents.misc.SystemServicesProxy)15 TaskStack (com.android.systemui.recents.model.TaskStack)15 Resources (android.content.res.Resources)10 RecentsVisibilityChangedEvent (com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent)10 ArrayList (java.util.ArrayList)10 Animator (android.animation.Animator)5 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)5 ValueAnimator (android.animation.ValueAnimator)5 ActivityOptions (android.app.ActivityOptions)5 Intent (android.content.Intent)5 Rect (android.graphics.Rect)5 View (android.view.View)5 RecentsDebugFlags (com.android.systemui.recents.RecentsDebugFlags)5 EnterRecentsWindowAnimationCompletedEvent (com.android.systemui.recents.events.activity.EnterRecentsWindowAnimationCompletedEvent)5 RecentsActivityStartingEvent (com.android.systemui.recents.events.activity.RecentsActivityStartingEvent)5 DeleteTaskDataEvent (com.android.systemui.recents.events.ui.DeleteTaskDataEvent)5 RecentsTaskLoadPlan (com.android.systemui.recents.model.RecentsTaskLoadPlan)5