Constants.java revision 37c8d8ef855aacb074ee0b702a46dbc62b7551a2
1/*
2 * Copyright (C) 2014 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
17package com.android.systemui.recents;
18
19/**
20 * Constants
21 * XXX: We are going to move almost all of these into a resource.
22 */
23public class Constants {
24    public static class DebugFlags {
25        // Enable this with any other debug flag to see more info
26        public static final boolean Verbose = false;
27
28        public static class App {
29            public static final boolean EnableTaskFiltering = false;
30            public static final boolean EnableTaskStackClipping = false;
31            public static final boolean EnableToggleNewRecentsActivity = false;
32            // This disables the bitmap and icon caches to
33            public static final boolean DisableBackgroundCache = false;
34
35            // Timing certain paths
36            public static final String TimeRecentsStartupKey = "startup";
37            public static final String TimeRecentsLaunchKey = "launchTask";
38            public static final boolean TimeRecentsStartup = false;
39            public static final boolean TimeRecentsLaunchTask = false;
40
41            public static final boolean RecentsComponent = false;
42            public static final boolean TaskDataLoader = false;
43            public static final boolean SystemUIHandshake = false;
44            public static final boolean TimeSystemCalls = false;
45            public static final boolean Memory = false;
46        }
47
48        public static class UI {
49            public static final boolean Draw = false;
50            public static final boolean ClickEvents = false;
51            public static final boolean TouchEvents = false;
52            public static final boolean MeasureAndLayout = false;
53            public static final boolean HwLayers = false;
54        }
55
56        public static class TaskStack {
57            public static final boolean SynchronizeViewsWithModel = false;
58        }
59
60        public static class ViewPool {
61            public static final boolean PoolCallbacks = false;
62        }
63    }
64
65    public static class Values {
66        public static class Window {
67            // The dark background dim is set behind the empty recents view
68            public static final float DarkBackgroundDim = 0.5f;
69            // The background dim is set behind the card stack
70            public static final float BackgroundDim = 0.35f;
71        }
72
73        public static class RecentsTaskLoader {
74            // XXX: This should be calculated on the first load
75            public static final int PreloadFirstTasksCount = 5;
76            // For debugging, this allows us to multiply the number of cards for each task
77            public static final int TaskEntryMultiplier = 1;
78        }
79
80        public static class TaskStackView {
81            public static class Animation {
82                public static final int TaskRemovedReshuffleDuration = 200;
83                public static final int SnapScrollBackDuration = 650;
84            }
85
86            public static final int TaskStackOverscrollRange = 150;
87
88            // The padding will be applied to the smallest dimension, and then applied to all sides
89            public static final float StackPaddingPct = 0.15f;
90            // The overlap height relative to the task height
91            public static final float StackOverlapPct = 0.65f;
92            // The height of the peek space relative to the stack height
93            public static final float StackPeekHeightPct = 0.1f;
94            // The min scale of the last card in the peek area
95            public static final float StackPeekMinScale = 0.9f;
96            // The number of cards we see in the peek space
97            public static final int StackPeekNumCards = 3;
98        }
99
100        public static class TaskView {
101            public static class Animation {
102                public static final int TaskDataUpdatedFadeDuration = 250;
103                public static final int TaskIconOnEnterDuration = 175;
104                public static final int TaskIconOnLeavingDuration = 75;
105            }
106
107            public static final boolean AnimateFrontTaskIconOnEnterRecents = true;
108            public static final boolean AnimateFrontTaskIconOnLeavingRecents = true;
109
110            public static final boolean UseRoundedCorners = true;
111            public static final float RoundedCornerRadiusDps = 3;
112        }
113    }
114}