Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39d02f5e authored by Xiaowen Lei's avatar Xiaowen Lei Committed by Automerger Merge Worker
Browse files

Merge "Add WM transit types for dream activity." into tm-qpr-dev am: 15e2cd92 am: 0b61ab32

parents 4a9c50bb 0b61ab32
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@ import android.app.Activity;
import android.os.Bundle;
import android.text.TextUtils;

import com.android.internal.R;

/**
 * The Activity used by the {@link DreamService} to draw screensaver content
 * on the screen. This activity runs in dream application's process, but is started by a
@@ -65,17 +63,4 @@ public class DreamActivity extends Activity {
            callback.onActivityCreated(this);
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        overridePendingTransition(R.anim.dream_activity_open_enter,
                                  R.anim.dream_activity_open_exit);
    }

    @Override
    public void finishAndRemoveTask() {
        super.finishAndRemoveTask();
        overridePendingTransition(0, R.anim.dream_activity_close_exit);
    }
}
+15 −1
Original line number Diff line number Diff line
@@ -340,6 +340,18 @@ public interface WindowManager extends ViewManager {
     */
    int TRANSIT_OLD_TASK_FRAGMENT_CHANGE = 30;

    /**
     * A dream activity is being opened.
     * @hide
     */
    int TRANSIT_OLD_DREAM_ACTIVITY_OPEN = 31;

    /**
     * A dream activity is being closed.
     * @hide
     */
    int TRANSIT_OLD_DREAM_ACTIVITY_CLOSE = 32;

    /**
     * @hide
     */
@@ -368,7 +380,9 @@ public interface WindowManager extends ViewManager {
            TRANSIT_OLD_TASK_CHANGE_WINDOWING_MODE,
            TRANSIT_OLD_TASK_FRAGMENT_OPEN,
            TRANSIT_OLD_TASK_FRAGMENT_CLOSE,
            TRANSIT_OLD_TASK_FRAGMENT_CHANGE
            TRANSIT_OLD_TASK_FRAGMENT_CHANGE,
            TRANSIT_OLD_DREAM_ACTIVITY_OPEN,
            TRANSIT_OLD_DREAM_ACTIVITY_CLOSE
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface TransitionOldType {}
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.window;

import static android.view.WindowManager.transitTypeToString;

import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.WindowConfiguration;
@@ -366,7 +368,7 @@ public final class TransitionRequestInfo implements Parcelable {
        // String fieldNameToString() { ... }

        return "TransitionRequestInfo { " +
                "type = " + mType + ", " +
                "type = " + transitTypeToString(mType) + ", " +
                "triggerTask = " + mTriggerTask + ", " +
                "remoteTransition = " + mRemoteTransition + ", " +
                "displayChange = " + mDisplayChange +
+9 −0
Original line number Diff line number Diff line
@@ -2422,6 +2422,15 @@
        <!--  When closing the current activity, this is the animation that is
              run on the current activity (which is exiting the screen). -->
        <attr name="activityCloseExitAnimation" format="reference" />
        <!--  When closing a dream activity, this is the animation that is
              run on the dream activity (which is exiting the screen). -->
        <attr name="dreamActivityCloseExitAnimation" format="reference" />
        <!--  When opening a dream activity, this is the animation that is
              run on the dream activity (which is entering the screen). -->
        <attr name="dreamActivityOpenEnterAnimation" format="reference" />
        <!--  When opening a dream activity, this is the animation that is
              run on the old activity (which is exiting the screen). -->
        <attr name="dreamActivityOpenExitAnimation" format="reference" />
        <!--  When opening an activity in a new task, this is the animation that is
              run on the activity of the new task (which is entering the screen). -->
        <attr name="taskOpenEnterAnimation" format="reference" />
+3 −0
Original line number Diff line number Diff line
@@ -85,6 +85,9 @@ please see styles_device_defaults.xml.
        <item name="activityOpenExitAnimation">@anim/activity_open_exit</item>
        <item name="activityCloseEnterAnimation">@anim/activity_close_enter</item>
        <item name="activityCloseExitAnimation">@anim/activity_close_exit</item>
        <item name="dreamActivityCloseExitAnimation">@anim/dream_activity_close_exit</item>
        <item name="dreamActivityOpenEnterAnimation">@anim/dream_activity_open_enter</item>
        <item name="dreamActivityOpenExitAnimation">@anim/dream_activity_open_exit</item>
        <item name="taskOpenEnterAnimation">@anim/task_open_enter</item>
        <item name="taskOpenExitAnimation">@anim/task_open_exit</item>
        <item name="launchTaskBehindTargetAnimation">@anim/launch_task_behind_target</item>
Loading