Search in sources :

Example 71 with RecentsConfiguration

use of com.android.systemui.recents.RecentsConfiguration in project android_frameworks_base by DirtyUnicorns.

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 72 with RecentsConfiguration

use of com.android.systemui.recents.RecentsConfiguration in project android_frameworks_base by DirtyUnicorns.

the class RecentsView method startFABanimation.

public void startFABanimation() {
    RecentsConfiguration config = Recents.getConfiguration();
    // Animate the action button in
    mFloatingButton = ((View) getParent()).findViewById(R.id.floating_action_button);
    mFloatingButton.animate().alpha(1f).setStartDelay(config.fabEnterAnimDelay).setDuration(config.fabEnterAnimDuration).setInterpolator(Interpolators.ALPHA_IN).withLayer().start();
}
Also used : RecentsConfiguration(com.android.systemui.recents.RecentsConfiguration)

Example 73 with RecentsConfiguration

use of com.android.systemui.recents.RecentsConfiguration in project android_frameworks_base by DirtyUnicorns.

the class RecentsView method onReload.

/**
     * Called from RecentsActivity when it is relaunched.
     */
public void onReload(boolean isResumingFromVisible, boolean isTaskStackEmpty) {
    RecentsConfiguration config = Recents.getConfiguration();
    RecentsActivityLaunchState launchState = config.getLaunchState();
    if (mTaskStackView == null) {
        isResumingFromVisible = false;
        mTaskStackView = new TaskStackView(getContext());
        mTaskStackView.setSystemInsets(mSystemInsets);
        addView(mTaskStackView);
    }
    // Reset the state
    mAwaitingFirstLayout = !isResumingFromVisible;
    mLastTaskLaunchedWasFreeform = false;
    // Update the stack
    mTaskStackView.onReload(isResumingFromVisible);
    if (isResumingFromVisible) {
        // If we are already visible, then restore the background scrim
        animateBackgroundScrim(1f, DEFAULT_UPDATE_SCRIM_DURATION);
    } else {
        // the tasks for the home animation.
        if (launchState.launchedViaDockGesture || launchState.launchedFromApp || isTaskStackEmpty) {
            mBackgroundScrim.setAlpha(255);
        } else {
            mBackgroundScrim.setAlpha(0);
        }
    }
}
Also used : RecentsActivityLaunchState(com.android.systemui.recents.RecentsActivityLaunchState) RecentsConfiguration(com.android.systemui.recents.RecentsConfiguration)

Example 74 with RecentsConfiguration

use of com.android.systemui.recents.RecentsConfiguration in project android_frameworks_base by DirtyUnicorns.

the class RecentsView method endFABanimation.

public void endFABanimation() {
    RecentsConfiguration config = Recents.getConfiguration();
    // Animate the action button away
    mFloatingButton = ((View) getParent()).findViewById(R.id.floating_action_button);
    mFloatingButton.animate().alpha(0f).setStartDelay(0).setDuration(config.fabExitAnimDuration).setInterpolator(Interpolators.ALPHA_OUT).withLayer().start();
}
Also used : RecentsConfiguration(com.android.systemui.recents.RecentsConfiguration)

Example 75 with RecentsConfiguration

use of com.android.systemui.recents.RecentsConfiguration in project android_frameworks_base by DirtyUnicorns.

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)

Aggregations

RecentsConfiguration (com.android.systemui.recents.RecentsConfiguration)86 RecentsActivityLaunchState (com.android.systemui.recents.RecentsActivityLaunchState)45 Resources (android.content.res.Resources)20 Task (com.android.systemui.recents.model.Task)20 SystemServicesProxy (com.android.systemui.recents.misc.SystemServicesProxy)15 TaskStack (com.android.systemui.recents.model.TaskStack)15 ValueAnimator (android.animation.ValueAnimator)10 RecentsVisibilityChangedEvent (com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent)10 Animator (android.animation.Animator)5 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)5 ActivityOptions (android.app.ActivityOptions)5 Intent (android.content.Intent)5 ActivityInfo (android.content.pm.ActivityInfo)5 BitmapDrawable (android.graphics.drawable.BitmapDrawable)5 Drawable (android.graphics.drawable.Drawable)5 View (android.view.View)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