• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Revision81693d9760ac0f01f5e898e7b88deb34adaad784 (tree)
Time2009-11-16 01:51:59
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

KeyboardPicker: use ISO 639-1 language code for layout names

Also add Swedish and United Kingdom to the list.

Change Summary

Incremental Difference

--- a/src/com/android/settings/KeyboardPicker.java
+++ b/src/com/android/settings/KeyboardPicker.java
@@ -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+
117 package com.android.settings;
218
319 import java.util.ArrayList;
@@ -31,10 +47,12 @@ public class KeyboardPicker extends ListActivity {
3147 mKeyboardLayouts.put("Finnish", "fn");
3248 mKeyboardLayouts.put("French", "fr");
3349 mKeyboardLayouts.put("German", "de");
34- mKeyboardLayouts.put("Ireland", "Ireland");
50+ mKeyboardLayouts.put("Ireland", "uk");
3551 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");
3856
3957 mKeyboardList = new ArrayList<String>(mKeyboardLayouts.keySet());
4058 ArrayAdapter<String> adapter =
@@ -44,8 +62,7 @@ public class KeyboardPicker extends ListActivity {
4462 @Override
4563 protected void onListItemClick(ListView l, View v, int position, long id) {
4664 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));
4966 Toast.makeText(this, "Set keyboard layout to " + kb +
5067 ".\nPlease reboot your machine to enable the new keyboard layout.", Toast.LENGTH_LONG).show();
5168 }