Constants.java revision 0553e12bc9b10b65703e2bf96e6d74906b5fea79
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 EnableInfoPane = true;
32            public static final boolean EnableSearchButton = false;
33
34            // This disables the bitmap and icon caches
35            public static final boolean DisableBackgroundCache = false;
36            // For debugging, this enables us to create mock recents tasks
37            public static final boolean EnableSystemServicesProxy = false;
38            // For debugging, this defines the number of mock recents packages to create
39            public static final int SystemServicesProxyMockPackageCount = 3;
40            // For debugging, this defines the number of mock recents tasks to create
41            public static final int SystemServicesProxyMockTaskCount = 75;
42
43            // Timing certain paths
44            public static final String TimeRecentsStartupKey = "startup";
45            public static final String TimeRecentsLaunchKey = "launchTask";
46            public static final boolean TimeRecentsStartup = false;
47            public static final boolean TimeRecentsLaunchTask = false;
48
49            public static final boolean RecentsComponent = false;
50            public static final boolean TaskDataLoader = false;
51            public static final boolean SystemUIHandshake = false;
52            public static final boolean TimeSystemCalls = false;
53            public static final boolean Memory = false;
54        }
55
56        public static class UI {
57            public static final boolean Draw = false;
58            public static final boolean ClickEvents = false;
59            public static final boolean TouchEvents = false;
60            public static final boolean MeasureAndLayout = false;
61            public static final boolean HwLayers = false;
62        }
63
64        public static class TaskStack {
65            public static final boolean SynchronizeViewsWithModel = false;
66        }
67
68        public static class ViewPool {
69            public static final boolean PoolCallbacks = false;
70        }
71    }
72
73    public static class Values {
74        public static class Window {
75            // The dark background dim is set behind the empty recents view
76            public static final float DarkBackgroundDim = 0.5f;
77        }
78
79        public static class RecentsTaskLoader {
80            // XXX: This should be calculated on the first load
81            public static final int PreloadFirstTasksCount = 5;
82        }
83
84        public static class TaskStackView {
85            public static final int TaskStackOverscrollRange = 150;
86            public static final int FilterStartDelay = 25;
87
88            // The amount to inverse scale the movement if we are overscrolling
89            public static final float TouchOverscrollScaleFactor = 3f;
90
91            // The padding will be applied to the smallest dimension, and then applied to all sides
92            public static final float StackPaddingPct = 0.15f;
93            // The overlap height relative to the task height
94            public static final float StackOverlapPct = 0.65f;
95            // The height of the peek space relative to the stack height
96            public static final float StackPeekHeightPct = 0.1f;
97            // The min scale of the last card in the peek area
98            public static final float StackPeekMinScale = 0.9f;
99            // The number of cards we see in the peek space
100            public static final int StackPeekNumCards = 3;
101        }
102
103        public static class TaskView {
104            public static final boolean AnimateFrontTaskBarOnEnterRecents = true;
105            public static final boolean AnimateFrontTaskBarOnLeavingRecents = true;
106        }
107    }
108}