Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* |
michael@0 | 2 | * Copyright (C) 2008 The Android Open Source Project |
michael@0 | 3 | * |
michael@0 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
michael@0 | 5 | * you may not use this file except in compliance with the License. |
michael@0 | 6 | * You may obtain a copy of the License at |
michael@0 | 7 | * |
michael@0 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
michael@0 | 9 | * |
michael@0 | 10 | * Unless required by applicable law or agreed to in writing, software |
michael@0 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
michael@0 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
michael@0 | 13 | * See the License for the specific language governing permissions and |
michael@0 | 14 | * limitations under the License. |
michael@0 | 15 | */ |
michael@0 | 16 | |
michael@0 | 17 | #ifndef _ANDROIDFW_KEYCODE_LABELS_H |
michael@0 | 18 | #define _ANDROIDFW_KEYCODE_LABELS_H |
michael@0 | 19 | |
michael@0 | 20 | #include "android_keycodes.h" |
michael@0 | 21 | |
michael@0 | 22 | struct KeycodeLabel { |
michael@0 | 23 | const char *literal; |
michael@0 | 24 | int value; |
michael@0 | 25 | }; |
michael@0 | 26 | |
michael@0 | 27 | static const KeycodeLabel KEYCODES[] = { |
michael@0 | 28 | { "SOFT_LEFT", 1 }, |
michael@0 | 29 | { "SOFT_RIGHT", 2 }, |
michael@0 | 30 | { "HOME", 3 }, |
michael@0 | 31 | { "BACK", 4 }, |
michael@0 | 32 | { "CALL", 5 }, |
michael@0 | 33 | { "ENDCALL", 6 }, |
michael@0 | 34 | { "0", 7 }, |
michael@0 | 35 | { "1", 8 }, |
michael@0 | 36 | { "2", 9 }, |
michael@0 | 37 | { "3", 10 }, |
michael@0 | 38 | { "4", 11 }, |
michael@0 | 39 | { "5", 12 }, |
michael@0 | 40 | { "6", 13 }, |
michael@0 | 41 | { "7", 14 }, |
michael@0 | 42 | { "8", 15 }, |
michael@0 | 43 | { "9", 16 }, |
michael@0 | 44 | { "STAR", 17 }, |
michael@0 | 45 | { "POUND", 18 }, |
michael@0 | 46 | { "DPAD_UP", 19 }, |
michael@0 | 47 | { "DPAD_DOWN", 20 }, |
michael@0 | 48 | { "DPAD_LEFT", 21 }, |
michael@0 | 49 | { "DPAD_RIGHT", 22 }, |
michael@0 | 50 | { "DPAD_CENTER", 23 }, |
michael@0 | 51 | { "VOLUME_UP", 24 }, |
michael@0 | 52 | { "VOLUME_DOWN", 25 }, |
michael@0 | 53 | { "POWER", 26 }, |
michael@0 | 54 | { "CAMERA", 27 }, |
michael@0 | 55 | { "CLEAR", 28 }, |
michael@0 | 56 | { "A", 29 }, |
michael@0 | 57 | { "B", 30 }, |
michael@0 | 58 | { "C", 31 }, |
michael@0 | 59 | { "D", 32 }, |
michael@0 | 60 | { "E", 33 }, |
michael@0 | 61 | { "F", 34 }, |
michael@0 | 62 | { "G", 35 }, |
michael@0 | 63 | { "H", 36 }, |
michael@0 | 64 | { "I", 37 }, |
michael@0 | 65 | { "J", 38 }, |
michael@0 | 66 | { "K", 39 }, |
michael@0 | 67 | { "L", 40 }, |
michael@0 | 68 | { "M", 41 }, |
michael@0 | 69 | { "N", 42 }, |
michael@0 | 70 | { "O", 43 }, |
michael@0 | 71 | { "P", 44 }, |
michael@0 | 72 | { "Q", 45 }, |
michael@0 | 73 | { "R", 46 }, |
michael@0 | 74 | { "S", 47 }, |
michael@0 | 75 | { "T", 48 }, |
michael@0 | 76 | { "U", 49 }, |
michael@0 | 77 | { "V", 50 }, |
michael@0 | 78 | { "W", 51 }, |
michael@0 | 79 | { "X", 52 }, |
michael@0 | 80 | { "Y", 53 }, |
michael@0 | 81 | { "Z", 54 }, |
michael@0 | 82 | { "COMMA", 55 }, |
michael@0 | 83 | { "PERIOD", 56 }, |
michael@0 | 84 | { "ALT_LEFT", 57 }, |
michael@0 | 85 | { "ALT_RIGHT", 58 }, |
michael@0 | 86 | { "SHIFT_LEFT", 59 }, |
michael@0 | 87 | { "SHIFT_RIGHT", 60 }, |
michael@0 | 88 | { "TAB", 61 }, |
michael@0 | 89 | { "SPACE", 62 }, |
michael@0 | 90 | { "SYM", 63 }, |
michael@0 | 91 | { "EXPLORER", 64 }, |
michael@0 | 92 | { "ENVELOPE", 65 }, |
michael@0 | 93 | { "ENTER", 66 }, |
michael@0 | 94 | { "DEL", 67 }, |
michael@0 | 95 | { "GRAVE", 68 }, |
michael@0 | 96 | { "MINUS", 69 }, |
michael@0 | 97 | { "EQUALS", 70 }, |
michael@0 | 98 | { "LEFT_BRACKET", 71 }, |
michael@0 | 99 | { "RIGHT_BRACKET", 72 }, |
michael@0 | 100 | { "BACKSLASH", 73 }, |
michael@0 | 101 | { "SEMICOLON", 74 }, |
michael@0 | 102 | { "APOSTROPHE", 75 }, |
michael@0 | 103 | { "SLASH", 76 }, |
michael@0 | 104 | { "AT", 77 }, |
michael@0 | 105 | { "NUM", 78 }, |
michael@0 | 106 | { "HEADSETHOOK", 79 }, |
michael@0 | 107 | { "FOCUS", 80 }, |
michael@0 | 108 | { "PLUS", 81 }, |
michael@0 | 109 | { "MENU", 82 }, |
michael@0 | 110 | { "NOTIFICATION", 83 }, |
michael@0 | 111 | { "SEARCH", 84 }, |
michael@0 | 112 | { "MEDIA_PLAY_PAUSE", 85 }, |
michael@0 | 113 | { "MEDIA_STOP", 86 }, |
michael@0 | 114 | { "MEDIA_NEXT", 87 }, |
michael@0 | 115 | { "MEDIA_PREVIOUS", 88 }, |
michael@0 | 116 | { "MEDIA_REWIND", 89 }, |
michael@0 | 117 | { "MEDIA_FAST_FORWARD", 90 }, |
michael@0 | 118 | { "MUTE", 91 }, |
michael@0 | 119 | { "PAGE_UP", 92 }, |
michael@0 | 120 | { "PAGE_DOWN", 93 }, |
michael@0 | 121 | { "PICTSYMBOLS", 94 }, |
michael@0 | 122 | { "SWITCH_CHARSET", 95 }, |
michael@0 | 123 | { "BUTTON_A", 96 }, |
michael@0 | 124 | { "BUTTON_B", 97 }, |
michael@0 | 125 | { "BUTTON_C", 98 }, |
michael@0 | 126 | { "BUTTON_X", 99 }, |
michael@0 | 127 | { "BUTTON_Y", 100 }, |
michael@0 | 128 | { "BUTTON_Z", 101 }, |
michael@0 | 129 | { "BUTTON_L1", 102 }, |
michael@0 | 130 | { "BUTTON_R1", 103 }, |
michael@0 | 131 | { "BUTTON_L2", 104 }, |
michael@0 | 132 | { "BUTTON_R2", 105 }, |
michael@0 | 133 | { "BUTTON_THUMBL", 106 }, |
michael@0 | 134 | { "BUTTON_THUMBR", 107 }, |
michael@0 | 135 | { "BUTTON_START", 108 }, |
michael@0 | 136 | { "BUTTON_SELECT", 109 }, |
michael@0 | 137 | { "BUTTON_MODE", 110 }, |
michael@0 | 138 | { "ESCAPE", 111 }, |
michael@0 | 139 | { "FORWARD_DEL", 112 }, |
michael@0 | 140 | { "CTRL_LEFT", 113 }, |
michael@0 | 141 | { "CTRL_RIGHT", 114 }, |
michael@0 | 142 | { "CAPS_LOCK", 115 }, |
michael@0 | 143 | { "SCROLL_LOCK", 116 }, |
michael@0 | 144 | { "META_LEFT", 117 }, |
michael@0 | 145 | { "META_RIGHT", 118 }, |
michael@0 | 146 | { "FUNCTION", 119 }, |
michael@0 | 147 | { "SYSRQ", 120 }, |
michael@0 | 148 | { "BREAK", 121 }, |
michael@0 | 149 | { "MOVE_HOME", 122 }, |
michael@0 | 150 | { "MOVE_END", 123 }, |
michael@0 | 151 | { "INSERT", 124 }, |
michael@0 | 152 | { "FORWARD", 125 }, |
michael@0 | 153 | { "MEDIA_PLAY", 126 }, |
michael@0 | 154 | { "MEDIA_PAUSE", 127 }, |
michael@0 | 155 | { "MEDIA_CLOSE", 128 }, |
michael@0 | 156 | { "MEDIA_EJECT", 129 }, |
michael@0 | 157 | { "MEDIA_RECORD", 130 }, |
michael@0 | 158 | { "F1", 131 }, |
michael@0 | 159 | { "F2", 132 }, |
michael@0 | 160 | { "F3", 133 }, |
michael@0 | 161 | { "F4", 134 }, |
michael@0 | 162 | { "F5", 135 }, |
michael@0 | 163 | { "F6", 136 }, |
michael@0 | 164 | { "F7", 137 }, |
michael@0 | 165 | { "F8", 138 }, |
michael@0 | 166 | { "F9", 139 }, |
michael@0 | 167 | { "F10", 140 }, |
michael@0 | 168 | { "F11", 141 }, |
michael@0 | 169 | { "F12", 142 }, |
michael@0 | 170 | { "NUM_LOCK", 143 }, |
michael@0 | 171 | { "NUMPAD_0", 144 }, |
michael@0 | 172 | { "NUMPAD_1", 145 }, |
michael@0 | 173 | { "NUMPAD_2", 146 }, |
michael@0 | 174 | { "NUMPAD_3", 147 }, |
michael@0 | 175 | { "NUMPAD_4", 148 }, |
michael@0 | 176 | { "NUMPAD_5", 149 }, |
michael@0 | 177 | { "NUMPAD_6", 150 }, |
michael@0 | 178 | { "NUMPAD_7", 151 }, |
michael@0 | 179 | { "NUMPAD_8", 152 }, |
michael@0 | 180 | { "NUMPAD_9", 153 }, |
michael@0 | 181 | { "NUMPAD_DIVIDE", 154 }, |
michael@0 | 182 | { "NUMPAD_MULTIPLY", 155 }, |
michael@0 | 183 | { "NUMPAD_SUBTRACT", 156 }, |
michael@0 | 184 | { "NUMPAD_ADD", 157 }, |
michael@0 | 185 | { "NUMPAD_DOT", 158 }, |
michael@0 | 186 | { "NUMPAD_COMMA", 159 }, |
michael@0 | 187 | { "NUMPAD_ENTER", 160 }, |
michael@0 | 188 | { "NUMPAD_EQUALS", 161 }, |
michael@0 | 189 | { "NUMPAD_LEFT_PAREN", 162 }, |
michael@0 | 190 | { "NUMPAD_RIGHT_PAREN", 163 }, |
michael@0 | 191 | { "VOLUME_MUTE", 164 }, |
michael@0 | 192 | { "INFO", 165 }, |
michael@0 | 193 | { "CHANNEL_UP", 166 }, |
michael@0 | 194 | { "CHANNEL_DOWN", 167 }, |
michael@0 | 195 | { "ZOOM_IN", 168 }, |
michael@0 | 196 | { "ZOOM_OUT", 169 }, |
michael@0 | 197 | { "TV", 170 }, |
michael@0 | 198 | { "WINDOW", 171 }, |
michael@0 | 199 | { "GUIDE", 172 }, |
michael@0 | 200 | { "DVR", 173 }, |
michael@0 | 201 | { "BOOKMARK", 174 }, |
michael@0 | 202 | { "CAPTIONS", 175 }, |
michael@0 | 203 | { "SETTINGS", 176 }, |
michael@0 | 204 | { "TV_POWER", 177 }, |
michael@0 | 205 | { "TV_INPUT", 178 }, |
michael@0 | 206 | { "STB_POWER", 179 }, |
michael@0 | 207 | { "STB_INPUT", 180 }, |
michael@0 | 208 | { "AVR_POWER", 181 }, |
michael@0 | 209 | { "AVR_INPUT", 182 }, |
michael@0 | 210 | { "PROG_RED", 183 }, |
michael@0 | 211 | { "PROG_GREEN", 184 }, |
michael@0 | 212 | { "PROG_YELLOW", 185 }, |
michael@0 | 213 | { "PROG_BLUE", 186 }, |
michael@0 | 214 | { "APP_SWITCH", 187 }, |
michael@0 | 215 | { "BUTTON_1", 188 }, |
michael@0 | 216 | { "BUTTON_2", 189 }, |
michael@0 | 217 | { "BUTTON_3", 190 }, |
michael@0 | 218 | { "BUTTON_4", 191 }, |
michael@0 | 219 | { "BUTTON_5", 192 }, |
michael@0 | 220 | { "BUTTON_6", 193 }, |
michael@0 | 221 | { "BUTTON_7", 194 }, |
michael@0 | 222 | { "BUTTON_8", 195 }, |
michael@0 | 223 | { "BUTTON_9", 196 }, |
michael@0 | 224 | { "BUTTON_10", 197 }, |
michael@0 | 225 | { "BUTTON_11", 198 }, |
michael@0 | 226 | { "BUTTON_12", 199 }, |
michael@0 | 227 | { "BUTTON_13", 200 }, |
michael@0 | 228 | { "BUTTON_14", 201 }, |
michael@0 | 229 | { "BUTTON_15", 202 }, |
michael@0 | 230 | { "BUTTON_16", 203 }, |
michael@0 | 231 | { "LANGUAGE_SWITCH", 204 }, |
michael@0 | 232 | { "MANNER_MODE", 205 }, |
michael@0 | 233 | { "3D_MODE", 206 }, |
michael@0 | 234 | { "CONTACTS", 207 }, |
michael@0 | 235 | { "CALENDAR", 208 }, |
michael@0 | 236 | { "MUSIC", 209 }, |
michael@0 | 237 | { "CALCULATOR", 210 }, |
michael@0 | 238 | { "ZENKAKU_HANKAKU", 211 }, |
michael@0 | 239 | { "EISU", 212 }, |
michael@0 | 240 | { "MUHENKAN", 213 }, |
michael@0 | 241 | { "HENKAN", 214 }, |
michael@0 | 242 | { "KATAKANA_HIRAGANA", 215 }, |
michael@0 | 243 | { "YEN", 216 }, |
michael@0 | 244 | { "RO", 217 }, |
michael@0 | 245 | { "KANA", 218 }, |
michael@0 | 246 | { "ASSIST", 219 }, |
michael@0 | 247 | { "BRIGHTNESS_DOWN", 220 }, |
michael@0 | 248 | { "BRIGHTNESS_UP", 221 }, |
michael@0 | 249 | |
michael@0 | 250 | // NOTE: If you add a new keycode here you must also add it to several other files. |
michael@0 | 251 | // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. |
michael@0 | 252 | |
michael@0 | 253 | { NULL, 0 } |
michael@0 | 254 | }; |
michael@0 | 255 | |
michael@0 | 256 | // NOTE: If you edit these flags, also edit policy flags in Input.h. |
michael@0 | 257 | static const KeycodeLabel FLAGS[] = { |
michael@0 | 258 | { "WAKE", 0x00000001 }, |
michael@0 | 259 | { "WAKE_DROPPED", 0x00000002 }, |
michael@0 | 260 | { "SHIFT", 0x00000004 }, |
michael@0 | 261 | { "CAPS_LOCK", 0x00000008 }, |
michael@0 | 262 | { "ALT", 0x00000010 }, |
michael@0 | 263 | { "ALT_GR", 0x00000020 }, |
michael@0 | 264 | { "MENU", 0x00000040 }, |
michael@0 | 265 | { "LAUNCHER", 0x00000080 }, |
michael@0 | 266 | { "VIRTUAL", 0x00000100 }, |
michael@0 | 267 | { "FUNCTION", 0x00000200 }, |
michael@0 | 268 | { NULL, 0 } |
michael@0 | 269 | }; |
michael@0 | 270 | |
michael@0 | 271 | static const KeycodeLabel AXES[] = { |
michael@0 | 272 | { "X", 0 }, |
michael@0 | 273 | { "Y", 1 }, |
michael@0 | 274 | { "PRESSURE", 2 }, |
michael@0 | 275 | { "SIZE", 3 }, |
michael@0 | 276 | { "TOUCH_MAJOR", 4 }, |
michael@0 | 277 | { "TOUCH_MINOR", 5 }, |
michael@0 | 278 | { "TOOL_MAJOR", 6 }, |
michael@0 | 279 | { "TOOL_MINOR", 7 }, |
michael@0 | 280 | { "ORIENTATION", 8 }, |
michael@0 | 281 | { "VSCROLL", 9 }, |
michael@0 | 282 | { "HSCROLL", 10 }, |
michael@0 | 283 | { "Z", 11 }, |
michael@0 | 284 | { "RX", 12 }, |
michael@0 | 285 | { "RY", 13 }, |
michael@0 | 286 | { "RZ", 14 }, |
michael@0 | 287 | { "HAT_X", 15 }, |
michael@0 | 288 | { "HAT_Y", 16 }, |
michael@0 | 289 | { "LTRIGGER", 17 }, |
michael@0 | 290 | { "RTRIGGER", 18 }, |
michael@0 | 291 | { "THROTTLE", 19 }, |
michael@0 | 292 | { "RUDDER", 20 }, |
michael@0 | 293 | { "WHEEL", 21 }, |
michael@0 | 294 | { "GAS", 22 }, |
michael@0 | 295 | { "BRAKE", 23 }, |
michael@0 | 296 | { "DISTANCE", 24 }, |
michael@0 | 297 | { "TILT", 25 }, |
michael@0 | 298 | { "GENERIC_1", 32 }, |
michael@0 | 299 | { "GENERIC_2", 33 }, |
michael@0 | 300 | { "GENERIC_3", 34 }, |
michael@0 | 301 | { "GENERIC_4", 35 }, |
michael@0 | 302 | { "GENERIC_5", 36 }, |
michael@0 | 303 | { "GENERIC_6", 37 }, |
michael@0 | 304 | { "GENERIC_7", 38 }, |
michael@0 | 305 | { "GENERIC_8", 39 }, |
michael@0 | 306 | { "GENERIC_9", 40 }, |
michael@0 | 307 | { "GENERIC_10", 41 }, |
michael@0 | 308 | { "GENERIC_11", 42 }, |
michael@0 | 309 | { "GENERIC_12", 43 }, |
michael@0 | 310 | { "GENERIC_13", 44 }, |
michael@0 | 311 | { "GENERIC_14", 45 }, |
michael@0 | 312 | { "GENERIC_15", 46 }, |
michael@0 | 313 | { "GENERIC_16", 47 }, |
michael@0 | 314 | |
michael@0 | 315 | // NOTE: If you add a new axis here you must also add it to several other files. |
michael@0 | 316 | // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list. |
michael@0 | 317 | |
michael@0 | 318 | { NULL, -1 } |
michael@0 | 319 | }; |
michael@0 | 320 | |
michael@0 | 321 | #endif // _ANDROIDFW_KEYCODE_LABELS_H |