Winson Chung | 303e1ff | 2014-03-07 15:06:19 -0800 | [diff] [blame] | 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 | |
| 17 | package com.android.systemui.recents; |
| 18 | |
| 19 | /** |
| 20 | * Constants |
| 21 | * XXX: We are going to move almost all of these into a resource. |
| 22 | */ |
| 23 | public 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; |
Winson Chung | 04dfe0d | 2014-03-14 14:06:29 -0700 | [diff] [blame] | 31 | // This disables the bitmap and icon caches to |
| 32 | public static final boolean DisableBackgroundCache = false; |
Winson Chung | 4d7b092 | 2014-03-13 17:14:17 -0700 | [diff] [blame] | 33 | |
Winson Chung | 7124390 | 2014-03-14 17:52:47 -0700 | [diff] [blame^] | 34 | public static final boolean TaskDataLoader = false; |
Winson Chung | 303e1ff | 2014-03-07 15:06:19 -0800 | [diff] [blame] | 35 | public static final boolean SystemUIHandshake = false; |
| 36 | public static final boolean TimeSystemCalls = false; |
Winson Chung | 4d7b092 | 2014-03-13 17:14:17 -0700 | [diff] [blame] | 37 | public static final boolean Memory = false; |
Winson Chung | 303e1ff | 2014-03-07 15:06:19 -0800 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | public static class UI { |
| 41 | public static final boolean Draw = false; |
| 42 | public static final boolean ClickEvents = false; |
| 43 | public static final boolean TouchEvents = false; |
| 44 | public static final boolean MeasureAndLayout = false; |
| 45 | public static final boolean Clipping = false; |
Winson Chung | 7124390 | 2014-03-14 17:52:47 -0700 | [diff] [blame^] | 46 | public static final boolean HwLayers = false; |
Winson Chung | 303e1ff | 2014-03-07 15:06:19 -0800 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | public static class TaskStack { |
| 50 | public static final boolean SynchronizeViewsWithModel = false; |
| 51 | } |
| 52 | |
| 53 | public static class ViewPool { |
| 54 | public static final boolean PoolCallbacks = false; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | public static class Values { |
| 59 | public static class Window { |
Winson Chung | 4d7b092 | 2014-03-13 17:14:17 -0700 | [diff] [blame] | 60 | // The dark background dim is set behind the empty recents view |
Winson Chung | 303e1ff | 2014-03-07 15:06:19 -0800 | [diff] [blame] | 61 | public static final float DarkBackgroundDim = 0.5f; |
Winson Chung | 4d7b092 | 2014-03-13 17:14:17 -0700 | [diff] [blame] | 62 | // The background dim is set behind the card stack |
Winson Chung | 303e1ff | 2014-03-07 15:06:19 -0800 | [diff] [blame] | 63 | public static final float BackgroundDim = 0.35f; |
| 64 | } |
| 65 | |
| 66 | public static class RecentsTaskLoader { |
| 67 | // XXX: This should be calculated on the first load |
| 68 | public static final int PreloadFirstTasksCount = 5; |
Winson Chung | 4d7b092 | 2014-03-13 17:14:17 -0700 | [diff] [blame] | 69 | // For debugging, this allows us to multiply the number of cards for each task |
Winson Chung | 303e1ff | 2014-03-07 15:06:19 -0800 | [diff] [blame] | 70 | public static final int TaskEntryMultiplier = 1; |
| 71 | } |
| 72 | |
| 73 | public static class TaskStackView { |
| 74 | public static class Animation { |
| 75 | public static final int TaskRemovedReshuffleDuration = 200; |
| 76 | public static final int SnapScrollBackDuration = 650; |
Winson Chung | 303e1ff | 2014-03-07 15:06:19 -0800 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | // The padding will be applied to the smallest dimension, and then applied to all sides |
| 80 | public static final float StackPaddingPct = 0.15f; |
| 81 | // The overlap height relative to the task height |
| 82 | public static final float StackOverlapPct = 0.65f; |
| 83 | // The height of the peek space relative to the stack height |
| 84 | public static final float StackPeekHeightPct = 0.1f; |
| 85 | // The min scale of the last card in the peek area |
| 86 | public static final float StackPeekMinScale = 0.9f; |
| 87 | // The number of cards we see in the peek space |
| 88 | public static final int StackPeekNumCards = 3; |
| 89 | } |
| 90 | |
| 91 | public static class TaskView { |
| 92 | public static class Animation { |
| 93 | public static final int TaskDataUpdatedFadeDuration = 250; |
| 94 | public static final int TaskIconCircularClipInDuration = 225; |
| 95 | public static final int TaskIconCircularClipOutDuration = 85; |
| 96 | } |
| 97 | |
| 98 | public static final boolean AnimateFrontTaskIconOnEnterRecents = true; |
| 99 | public static final boolean AnimateFrontTaskIconOnLeavingRecents = true; |
| 100 | public static final boolean AnimateFrontTaskIconOnLeavingUseClip = false; |
| 101 | public static final boolean DrawColoredTaskBars = false; |
| 102 | public static final boolean UseRoundedCorners = true; |
| 103 | public static final float RoundedCornerRadiusDps = 3; |
| 104 | |
| 105 | public static final float TaskBarHeightDps = 54; |
| 106 | public static final float TaskIconSizeDps = 60; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | // UNMIGRATED CONSTANTS: |
| 111 | |
| 112 | /** Determines whether to layout the stack vertically in landscape mode */ |
| 113 | public static final boolean LANDSCAPE_LAYOUT_VERTICAL_STACK = true; |
| 114 | } |