packages/apps/Settings
Revision | 81693d9760ac0f01f5e898e7b88deb34adaad784 (tree) |
---|---|
Zeit | 2009-11-16 01:51:59 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
KeyboardPicker: use ISO 639-1 language code for layout names
Also add Swedish and United Kingdom to the list.
@@ -1,3 +1,19 @@ | ||
1 | +/* | |
2 | + * Copyright (C) 2009 The Android-x86 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 | + | |
1 | 17 | package com.android.settings; |
2 | 18 | |
3 | 19 | import java.util.ArrayList; |
@@ -31,10 +47,12 @@ public class KeyboardPicker extends ListActivity { | ||
31 | 47 | mKeyboardLayouts.put("Finnish", "fn"); |
32 | 48 | mKeyboardLayouts.put("French", "fr"); |
33 | 49 | mKeyboardLayouts.put("German", "de"); |
34 | - mKeyboardLayouts.put("Ireland", "Ireland"); | |
50 | + mKeyboardLayouts.put("Ireland", "uk"); | |
35 | 51 | mKeyboardLayouts.put("Japanese", "jp"); |
36 | - mKeyboardLayouts.put("Russia", "ru"); | |
37 | - mKeyboardLayouts.put("Spanish(Latin America)", "spanish_latin"); | |
52 | + mKeyboardLayouts.put("Russian", "ru"); | |
53 | + mKeyboardLayouts.put("Spanish(Latin America)", "es_latin"); | |
54 | + mKeyboardLayouts.put("Swedish", "fn"); | |
55 | + mKeyboardLayouts.put("United Kingdom", "uk"); | |
38 | 56 | |
39 | 57 | mKeyboardList = new ArrayList<String>(mKeyboardLayouts.keySet()); |
40 | 58 | ArrayAdapter<String> adapter = |
@@ -44,8 +62,7 @@ public class KeyboardPicker extends ListActivity { | ||
44 | 62 | @Override |
45 | 63 | protected void onListItemClick(ListView l, View v, int position, long id) { |
46 | 64 | String kb = mKeyboardList.get(position); |
47 | - String name = mKeyboardLayouts.get(kb); | |
48 | - SystemProperties.set("persist.sys.keylayout", name); | |
65 | + SystemProperties.set("persist.sys.keylayout", mKeyboardLayouts.get(kb)); | |
49 | 66 | Toast.makeText(this, "Set keyboard layout to " + kb + |
50 | 67 | ".\nPlease reboot your machine to enable the new keyboard layout.", Toast.LENGTH_LONG).show(); |
51 | 68 | } |