1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.android.launcher3.uioverrides.states;
17 
18 import android.content.Context;
19 
20 import com.android.launcher3.LauncherState;
21 import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
22 
23 /**
24  * Definition for overview state
25  */
26 public class OverviewState extends LauncherState {
27 
OverviewState(int id)28     public OverviewState(int id) {
29         super(id, ContainerType.WORKSPACE, FLAG_DISABLE_RESTORE);
30     }
31 
32     @Override
getTransitionDuration(Context context)33     public int getTransitionDuration(Context context) {
34         return 250;
35     }
36 
newBackgroundState(int id)37     public static OverviewState newBackgroundState(int id) {
38         return new OverviewState(id);
39     }
40 
newPeekState(int id)41     public static OverviewState newPeekState(int id) {
42         return new OverviewState(id);
43     }
44 
newSwitchState(int id)45     public static OverviewState newSwitchState(int id) {
46         return new OverviewState(id);
47     }
48 
49     /**
50      *  New Overview substate that represents the overview in modal mode (one task shown on its own)
51      */
newModalTaskState(int id)52     public static OverviewState newModalTaskState(int id) {
53         return new OverviewState(id);
54     }
55 }
56