1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package org.chromium.base;
6
7import android.support.annotation.IntDef;
8
9import java.lang.annotation.Retention;
10import java.lang.annotation.RetentionPolicy;
11
12/**
13 * A set of states that represent the last state change of an Activity.
14 */
15public interface ActivityState {
16
17    @Retention(RetentionPolicy.SOURCE)
18    @IntDef({CREATED, STARTED, RESUMED, PAUSED, STOPPED, DESTROYED})
19    public @interface ActivityStateEnum {}
20
21    /**
22     * Represents Activity#onCreate().
23     */
24    public final int CREATED = 1;
25
26    /**
27     * Represents Activity#onStart().
28     */
29    public final int STARTED = 2;
30
31    /**
32     * Represents Activity#onResume().
33     */
34    public final int RESUMED = 3;
35
36    /**
37     * Represents Activity#onPause().
38     */
39    public final int PAUSED = 4;
40
41    /**
42     * Represents Activity#onStop().
43     */
44    public final int STOPPED = 5;
45
46    /**
47     * Represents Activity#onDestroy().  This is also used when the state of an Activity is unknown.
48     */
49    public final int DESTROYED = 6;
50}
51