Daisuke Miyakawa | 7674b81 | 2009-07-09 14:30:44 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 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 android.pim.vcard; |
| 17 | |
| 18 | /** |
| 19 | * The class representing VCard related configurations |
| 20 | */ |
| 21 | public class VCardConfig { |
| 22 | static final int LOG_LEVEL_NONE = 0; |
| 23 | static final int LOG_LEVEL_PERFORMANCE_MEASUREMENT = 0x1; |
| 24 | static final int LOG_LEVEL_SHOW_WARNING = 0x2; |
| 25 | static final int LOG_LEVEL_VERBOSE = |
| 26 | LOG_LEVEL_PERFORMANCE_MEASUREMENT | LOG_LEVEL_SHOW_WARNING; |
| 27 | |
| 28 | // Assumes that "iso-8859-1" is able to map "all" 8bit characters to some unicode and |
| 29 | // decode the unicode to the original charset. If not, this setting will cause some bug. |
| 30 | public static final String DEFAULT_CHARSET = "iso-8859-1"; |
| 31 | |
| 32 | // TODO: use this flag |
| 33 | public static boolean IGNORE_CASE_EXCEPT_VALUE = true; |
| 34 | |
| 35 | protected static final int LOG_LEVEL = LOG_LEVEL_PERFORMANCE_MEASUREMENT; |
| 36 | |
| 37 | // Note: phonetic name probably should be "LAST FIRST MIDDLE" for European languages, and |
| 38 | // space should be added between each element while it should not be in Japanese. |
| 39 | // But unfortunately, we currently do not have the data and are not sure whether we should |
| 40 | // support European version of name ordering. |
| 41 | // |
| 42 | // TODO: Implement the logic described above if we really need European version of |
| 43 | // phonetic name handling. Also, adding the appropriate test case of vCard would be |
| 44 | // highly appreciated. |
| 45 | public static final int NAME_ORDER_TYPE_ENGLISH = 0; |
| 46 | public static final int NAME_ORDER_TYPE_JAPANESE = 1; |
| 47 | |
| 48 | public static final int NAME_ORDER_TYPE_DEFAULT = NAME_ORDER_TYPE_ENGLISH; |
| 49 | |
| 50 | /** |
| 51 | * @hide temporal. may be deleted |
| 52 | */ |
| 53 | public static boolean showPerformanceLog() { |
| 54 | return (LOG_LEVEL & LOG_LEVEL_PERFORMANCE_MEASUREMENT) != 0; |
| 55 | } |
| 56 | |
| 57 | private VCardConfig() { |
| 58 | } |
| 59 | } |