diff options
Diffstat (limited to 'packages')
7 files changed, 1082 insertions, 9 deletions
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java index de77cac..d3bd197 100644 --- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java +++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java @@ -71,7 +71,7 @@ import libcore.io.ErrnoException; import libcore.io.IoUtils; import libcore.io.Libcore; import libcore.io.Streams; -import libcore.io.StructStatFs; +import libcore.io.StructStatVfs; /* * This service copies a downloaded apk to a file passed in as @@ -244,7 +244,7 @@ public class DefaultContainerService extends IntentService { Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND); try { - final StructStatFs stat = Libcore.os.statfs(path); + final StructStatVfs stat = Libcore.os.statvfs(path); final long totalSize = stat.f_blocks * stat.f_bsize; final long availSize = stat.f_bavail * stat.f_bsize; return new long[] { totalSize, availSize }; diff --git a/packages/InputDevices/res/raw/keyboard_layout_brazilian.kcm b/packages/InputDevices/res/raw/keyboard_layout_brazilian.kcm new file mode 100644 index 0000000..140c7ac --- /dev/null +++ b/packages/InputDevices/res/raw/keyboard_layout_brazilian.kcm @@ -0,0 +1,339 @@ +# Copyright (C) 2013 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# Brazilian keyboard layout. +# + +type OVERLAY + +map key 86 PLUS +map key 89 RO + +### ROW 1 + +key GRAVE { + label: '\'' + base: '\'' + shift: '"' +} + +key 1 { + label: '1' + base: '1' + shift: '!' + ralt: '\u00b9' +} + +key 2 { + label: '2' + base: '2' + shift: '@' + ralt: '\u00b2' +} + +key 3 { + label: '3' + base: '3' + shift: '#' + ralt: '\u00b3' +} + +key 4 { + label: '4' + base: '4' + shift: '$' + ralt: '\u00a3' +} + +key 5 { + label: '5' + base: '5' + shift: '%' + ralt: '\u00a2' +} + +key 6 { + label: '6' + base: '6' + shift: '\u0308' + ralt: '\u00ac' +} + +key 7 { + label: '7' + base: '7' + shift: '&' +} + +key 8 { + label: '8' + base: '8' + shift: '*' +} + +key 9 { + label: '9' + base: '9' + shift: '(' +} + +key 0 { + label: '0' + base: '0' + shift: ')' + ralt: '}' +} + +key MINUS { + label: '-' + base: '-' + shift: '_' +} + +key EQUALS { + label: '=' + base: '=' + shift: '+' + ralt: '\u00a7' +} + +### ROW 2 + +key Q { + label: 'Q' + base: 'q' + shift, capslock: 'Q' + ralt: '/' +} + +key W { + label: 'W' + base: 'w' + shift, capslock: 'W' + ralt: '?' +} + +key E { + label: 'E' + base: 'e' + shift, capslock: 'E' + ralt: '\u20ac' +} + +key R { + label: 'R' + base: 'r' + shift, capslock: 'R' +} + +key T { + label: 'T' + base: 't' + shift, capslock: 'T' +} + +key Y { + label: 'Y' + base: 'y' + shift, capslock: 'Y' +} + +key U { + label: 'U' + base: 'u' + shift, capslock: 'U' +} + +key I { + label: 'I' + base: 'i' + shift, capslock: 'I' +} + +key O { + label: 'O' + base: 'o' + shift, capslock: 'O' +} + +key P { + label: 'P' + base: 'p' + shift, capslock: 'P' +} + +key LEFT_BRACKET { + label: '\u00b4' + base: '\u0301' + shift: '\u0300' +} + +key RIGHT_BRACKET { + label: '[' + base: '[' + shift: '{' + ralt: '\u00aa' +} + +### ROW 3 + +key A { + label: 'A' + base: 'a' + shift, capslock: 'A' +} + +key S { + label: 'S' + base: 's' + shift, capslock: 'S' +} + +key D { + label: 'D' + base: 'd' + shift, capslock: 'D' +} + +key F { + label: 'F' + base: 'f' + shift, capslock: 'F' +} + +key G { + label: 'G' + base: 'g' + shift, capslock: 'G' +} + +key H { + label: 'H' + base: 'h' + shift, capslock: 'H' +} + +key J { + label: 'J' + base: 'j' + shift, capslock: 'J' +} + +key K { + label: 'K' + base: 'k' + shift, capslock: 'K' +} + +key L { + label: 'L' + base: 'l' + shift, capslock: 'L' +} + +key SEMICOLON { + label: '\u00c7' + base: '\u00e7' + shift, capslock: '\u00c7' +} + +key APOSTROPHE { + label: '\u02dc' + base: '\u0303' + shift: '\u0302' +} + +key BACKSLASH { + label: ']' + base: ']' + shift, capslock: '}' + ralt: '\u00ba' +} + +### ROW 4 + +key PLUS { + label: '\\' + base: '\\' + shift: '|' +} + +key Z { + label: 'Z' + base: 'z' + shift, capslock: 'Z' +} + +key X { + label: 'X' + base: 'x' + shift, capslock: 'X' +} + +key C { + label: 'C' + base: 'c' + shift, capslock: 'C' + ralt: '\u20a2' +} + +key V { + label: 'V' + base: 'v' + shift, capslock: 'V' +} + +key B { + label: 'B' + base: 'b' + shift, capslock: 'B' +} + +key N { + label: 'N' + base: 'n' + shift, capslock: 'N' +} + +key M { + label: 'M' + base: 'm' + shift, capslock: 'M' +} + +key COMMA { + label: ',' + base: ',' + shift: '<' +} + +key PERIOD { + label: '.' + base: '.' + shift: '>' +} + +key SLASH { + label: ';' + base: ';' + shift: ':' +} + +key RO { + label: '/' + base: '/' + shift: '?' + ralt: '\u00b0' +} diff --git a/packages/InputDevices/res/raw/keyboard_layout_english_us_colemak.kcm b/packages/InputDevices/res/raw/keyboard_layout_english_us_colemak.kcm new file mode 100644 index 0000000..72e6d04 --- /dev/null +++ b/packages/InputDevices/res/raw/keyboard_layout_english_us_colemak.kcm @@ -0,0 +1,330 @@ +# Copyright (C) 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# English (US), Colemak keyboard layout. +# Unlike the default (generic) keyboard layout, English (US) does not contain any +# special ALT characters. +# + +type OVERLAY + +map key 18 F +map key 19 P +map key 20 G +map key 21 J +map key 22 L +map key 23 U +map key 24 Y +map key 25 SEMICOLON +map key 31 R +map key 32 S +map key 33 T +map key 34 D +map key 36 N +map key 37 E +map key 38 I +map key 39 O +map key 49 K +map key 58 DEL + +### ROW 1 + +key GRAVE { + label: '`' + base: '`' + shift: '~' +} + +key 1 { + label: '1' + base: '1' + shift: '!' +} + +key 2 { + label: '2' + base: '2' + shift: '@' +} + +key 3 { + label: '3' + base: '3' + shift: '#' +} + +key 4 { + label: '4' + base: '4' + shift: '$' +} + +key 5 { + label: '5' + base: '5' + shift: '%' +} + +key 6 { + label: '6' + base: '6' + shift: '^' +} + +key 7 { + label: '7' + base: '7' + shift: '&' +} + +key 8 { + label: '8' + base: '8' + shift: '*' +} + +key 9 { + label: '9' + base: '9' + shift: '(' +} + +key 0 { + label: '0' + base: '0' + shift: ')' +} + +key MINUS { + label: '-' + base: '-' + shift: '_' +} + +key EQUALS { + label: '=' + base: '=' + shift: '+' +} + +### ROW 2 + +key Q { + label: 'Q' + base: 'q' + shift, capslock: 'Q' +} + +key W { + label: 'W' + base: 'w' + shift, capslock: 'W' +} + +key F { + label: 'F' + base: 'f' + shift, capslock: 'F' +} + +key P { + label: 'P' + base: 'p' + shift, capslock: 'P' +} + +key G { + label: 'G' + base: 'g' + shift, capslock: 'G' +} + +key J { + label: 'J' + base: 'j' + shift, capslock: 'J' +} + +key L { + label: 'L' + base: 'l' + shift, capslock: 'L' +} + +key U { + label: 'U' + base: 'u' + shift, capslock: 'U' +} + +key Y { + label: 'Y' + base: 'y' + shift, capslock: 'Y' +} + +key SEMICOLON { + label: ';' + base: ';' + shift, capslock: ':' +} + +key LEFT_BRACKET { + label: '[' + base: '[' + shift: '{' +} + +key RIGHT_BRACKET { + label: ']' + base: ']' + shift: '}' +} + +key BACKSLASH { + label: '\\' + base: '\\' + shift: '|' +} + +### ROW 3 + +key A { + label: 'A' + base: 'a' + shift, capslock: 'A' +} + +key R { + label: 'R' + base: 'r' + shift, capslock: 'R' +} + +key S { + label: 'S' + base: 's' + shift, capslock: 'S' +} + +key T { + label: 'T' + base: 't' + shift, capslock: 'T' +} + +key D { + label: 'D' + base: 'd' + shift, capslock: 'D' +} + +key H { + label: 'H' + base: 'h' + shift, capslock: 'H' +} + +key N { + label: 'N' + base: 'n' + shift, capslock: 'N' +} + +key E { + label: 'E' + base: 'e' + shift, capslock: 'E' +} + +key I { + label: 'I' + base: 'i' + shift, capslock: 'I' +} + +key O { + label: 'O' + base: 'o' + shift: 'O' +} + +key APOSTROPHE { + label: '\'' + base: '\'' + shift: '"' +} + +### ROW 4 + +key Z { + label: 'Z' + base: 'z' + shift, capslock: 'Z' +} + +key X { + label: 'X' + base: 'x' + shift, capslock: 'X' +} + +key C { + label: 'C' + base: 'c' + shift, capslock: 'C' +} + +key V { + label: 'V' + base: 'v' + shift, capslock: 'V' +} + +key B { + label: 'B' + base: 'b' + shift, capslock: 'B' +} + +key K { + label: 'K' + base: 'k' + shift, capslock: 'K' +} + +key M { + label: 'M' + base: 'm' + shift, capslock: 'M' +} + +key COMMA { + label: ',' + base: ',' + shift: '<' +} + +key PERIOD { + label: '.' + base: '.' + shift: '>' +} + +key SLASH { + label: '/' + base: '/' + shift: '?' +} diff --git a/packages/InputDevices/res/raw/keyboard_layout_english_us_intl.kcm b/packages/InputDevices/res/raw/keyboard_layout_english_us_intl.kcm new file mode 100644 index 0000000..0fabf02 --- /dev/null +++ b/packages/InputDevices/res/raw/keyboard_layout_english_us_intl.kcm @@ -0,0 +1,379 @@ +# Copyright (C) 2013 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# English (US) International keyboard layout. +# + +type OVERLAY + +map key 86 PLUS + +### ROW 1 + +key GRAVE { + label: '\u0300' + base: '\u0300' + shift: '\u0303' +} + +key 1 { + label: '1' + base: '1' + shift: '!' + ralt: '\u00a1' + ralt+shift: '\u00b9' +} + +key 2 { + label: '2' + base: '2' + shift: '@' + ralt: '\u00b2' +} + +key 3 { + label: '3' + base: '3' + shift: '#' + ralt: '\u00b3' +} + +key 4 { + label: '4' + base: '4' + shift: '$' + ralt: '\u00a4' + ralt+shift: '\u00a3' +} + +key 5 { + label: '5' + base: '5' + shift: '%' + ralt: '\u20ac' +} + +key 6 { + label: '6' + base: '6' + shift: '\u0302' + ralt: '\u00bc' +} + +key 7 { + label: '7' + base: '7' + shift: '&' + ralt: '\u00bd' +} + +key 8 { + label: '8' + base: '8' + shift: '*' + ralt: '\u00be' +} + +key 9 { + label: '9' + base: '9' + shift: '(' + ralt: '\u2018' +} + +key 0 { + label: '0' + base: '0' + shift: ')' + ralt: '\u2019' +} + +key MINUS { + label: '-' + base: '-' + shift: '_' + ralt: '\u00a5' +} + +key EQUALS { + label: '=' + base: '=' + shift: '+' + ralt: '\u00d7' + shift+ralt: '\u00f7' +} + +### ROW 2 + +key Q { + label: 'Q' + base: 'q' + shift, capslock: 'Q' + ralt: '\u00e4' + shift+ralt: '\u00c4' +} + +key W { + label: 'W' + base: 'w' + shift, capslock: 'W' + ralt: '\u00e5' + shift+ralt: '\u00c5' +} + +key E { + label: 'E' + base: 'e' + shift, capslock: 'E' + ralt: '\u00e9' + shift+ralt: '\u00c9' +} + +key R { + label: 'R' + base: 'r' + shift, capslock: 'R' + ralt: '\u00ae' +} + +key T { + label: 'T' + base: 't' + shift, capslock: 'T' + ralt: '\u00fe' + shift+ralt: '\u00de' +} + +key Y { + label: 'Y' + base: 'y' + shift, capslock: 'Y' + ralt: '\u00fc' + shift+ralt: '\u00dc' +} + +key U { + label: 'U' + base: 'u' + shift, capslock: 'U' + ralt: '\u00fa' + shift+ralt: '\u00da' +} + +key I { + label: 'I' + base: 'i' + shift, capslock: 'I' + ralt: '\u00ed' + shift+ralt: '\u00cd' +} + +key O { + label: 'O' + base: 'o' + shift, capslock: 'O' + ralt: '\u00f3' + shift+ralt: '\u00d3' +} + +key P { + label: 'P' + base: 'p' + shift, capslock: 'P' + ralt: '\u00f6' + shift+ralt: '\u00d6' +} + +key LEFT_BRACKET { + label: '[' + base: '[' + shift: '{' + ralt: '\u00ab' +} + +key RIGHT_BRACKET { + label: ']' + base: ']' + shift: '}' + ralt: '\u00bb' +} + +key BACKSLASH { + label: '\\' + base: '\\' + shift: '|' + ralt: '\u00ac' + shift+ralt: '\u00a6' +} + +### ROW 3 + +key A { + label: 'A' + base: 'a' + shift, capslock: 'A' + ralt: '\u00e1' + shift+ralt: '\u00c1' +} + +key S { + label: 'S' + base: 's' + shift, capslock: 'S' + ralt: '\u00df' + shift+ralt: '\u00a7' +} + +key D { + label: 'D' + base: 'd' + shift, capslock: 'D' + ralt: '\u00f0' + shift+ralt: '\u00d0' +} + +key F { + label: 'F' + base: 'f' + shift, capslock: 'F' +} + +key G { + label: 'G' + base: 'g' + shift, capslock: 'G' +} + +key H { + label: 'H' + base: 'h' + shift, capslock: 'H' +} + +key J { + label: 'J' + base: 'j' + shift, capslock: 'J' +} + +key K { + label: 'K' + base: 'k' + shift, capslock: 'K' +} + +key L { + label: 'L' + base: 'l' + shift, capslock: 'L' + ralt: '\u00f8' + shift+ralt: '\u00d8' +} + +key SEMICOLON { + label: ';' + base: ';' + shift: ':' + ralt: '\u00b6' + shift+ralt: '\u00b0' +} + +key APOSTROPHE { + label: '\'' + base: '\'' + shift: '"' + ralt: '\u0301' + shift+ralt: '\u0308' +} + +### ROW 4 + +key PLUS { + label: '\\' + base: '\\' + shift: '|' + ralt: '\u00ac' + shift+ralt: '\u00a6' +} + +key Z { + label: 'Z' + base: 'z' + shift, capslock: 'Z' + ralt: '\u00e6' + shift+ralt: '\u00c6' +} + +key X { + label: 'X' + base: 'x' + shift, capslock: 'X' +} + +key C { + label: 'C' + base: 'c' + shift, capslock: 'C' + ralt: '\u00a9' + shift+ralt: '\u00a2' +} + +key V { + label: 'V' + base: 'v' + shift, capslock: 'V' +} + +key B { + label: 'B' + base: 'b' + shift, capslock: 'B' +} + +key N { + label: 'N' + base: 'n' + shift, capslock: 'N' + ralt: '\u00f1' + shift+ralt: '\u00d1' +} + +key M { + label: 'M' + base: 'm' + shift, capslock: 'M' + ralt: '\u00b5' +} + +key COMMA { + label: ',' + base: ',' + shift: '<' + ralt: '\u00e7' + shift+ralt: '\u00c7' +} + +key PERIOD { + label: '.' + base: '.' + shift: '>' +} + +key SLASH { + label: '/' + base: '/' + shift: '?' + ralt: '\u00bf' +} diff --git a/packages/InputDevices/res/values/strings.xml b/packages/InputDevices/res/values/strings.xml index 65d3304..54c18f1 100644 --- a/packages/InputDevices/res/values/strings.xml +++ b/packages/InputDevices/res/values/strings.xml @@ -12,6 +12,12 @@ <!-- US English keyboard layout label. [CHAR LIMIT=35] --> <string name="keyboard_layout_english_us_label">English (US)</string> + <!-- US English (International style) keyboard layout label. [CHAR LIMIT=35] --> + <string name="keyboard_layout_english_us_intl">English (US), International style</string> + + <!-- US English (Colemak style) keyboard layout label. [CHAR LIMIT=35] --> + <string name="keyboard_layout_english_us_colemak_label">English (US), Colemak style</string> + <!-- US English (Dvorak style) keyboard layout label. [CHAR LIMIT=35] --> <string name="keyboard_layout_english_us_dvorak_label">English (US), Dvorak style</string> @@ -75,6 +81,9 @@ <!-- Icelandic keyboard layout label. [CHAR LIMIT=35] --> <string name="keyboard_layout_icelandic">Icelandic</string> + <!-- Brazilian keyboard layout label. [CHAR LIMIT=35] --> + <string name="keyboard_layout_brazilian">Brazilian</string> + <!-- Portuguese keyboard layout label. [CHAR LIMIT=35] --> <string name="keyboard_layout_portuguese">Portuguese</string> diff --git a/packages/InputDevices/res/xml/keyboard_layouts.xml b/packages/InputDevices/res/xml/keyboard_layouts.xml index 3cfa170..1f48a36 100644 --- a/packages/InputDevices/res/xml/keyboard_layouts.xml +++ b/packages/InputDevices/res/xml/keyboard_layouts.xml @@ -8,6 +8,14 @@ android:label="@string/keyboard_layout_english_us_label" android:keyboardLayout="@raw/keyboard_layout_english_us" /> + <keyboard-layout android:name="keyboard_layout_english_us_intl" + android:label="@string/keyboard_layout_english_us_intl" + android:keyboardLayout="@raw/keyboard_layout_english_us_intl" /> + + <keyboard-layout android:name="keyboard_layout_english_us_colemak" + android:label="@string/keyboard_layout_english_us_colemak_label" + android:keyboardLayout="@raw/keyboard_layout_english_us_colemak" /> + <keyboard-layout android:name="keyboard_layout_english_us_dvorak" android:label="@string/keyboard_layout_english_us_dvorak_label" android:keyboardLayout="@raw/keyboard_layout_english_us_dvorak" /> @@ -92,6 +100,10 @@ android:label="@string/keyboard_layout_icelandic" android:keyboardLayout="@raw/keyboard_layout_icelandic" /> + <keyboard-layout android:name="keyboard_layout_brazilian" + android:label="@string/keyboard_layout_brazilian" + android:keyboardLayout="@raw/keyboard_layout_brazilian" /> + <keyboard-layout android:name="keyboard_layout_portuguese" android:label="@string/keyboard_layout_portuguese" android:keyboardLayout="@raw/keyboard_layout_portuguese" /> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 5838526..120b28f 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -47,6 +47,7 @@ import com.android.internal.content.PackageHelper; import com.android.internal.telephony.Phone; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.RILConstants; +import com.android.internal.telephony.cdma.CdmaSubscriptionSourceManager; import com.android.internal.util.XmlUtils; import com.android.internal.widget.LockPatternUtils; import com.android.internal.widget.LockPatternView; @@ -1429,7 +1430,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { }; String[] secureToGlobal = { Settings.Global.PREFERRED_NETWORK_MODE, - Settings.Global.PREFERRED_CDMA_SUBSCRIPTION, + Settings.Global.CDMA_SUBSCRIPTION_MODE, }; moveSettingsToNewTable(db, TABLE_SYSTEM, TABLE_GLOBAL, systemToGlobal, true); @@ -2239,16 +2240,19 @@ public class DatabaseHelper extends SQLiteOpenHelper { // Set default cdma call auto retry loadSetting(stmt, Settings.Global.CALL_AUTO_RETRY, 0); - // Set the preferred network mode to 0 = Global, CDMA default + // Set the preferred network mode to target desired value or Default + // value defined in RILConstants int type; - if (TelephonyManager.getLteOnCdmaModeStatic() == PhoneConstants.LTE_ON_CDMA_TRUE) { - type = Phone.NT_MODE_GLOBAL; - } else { - type = SystemProperties.getInt("ro.telephony.default_network", + type = SystemProperties.getInt("ro.telephony.default_network", RILConstants.PREFERRED_NETWORK_MODE); - } loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, type); + // Set the preferred cdma subscription source to target desired value or default + // value defined in CdmaSubscriptionSourceManager + type = SystemProperties.getInt("ro.telephony.default_cdma_sub", + CdmaSubscriptionSourceManager.PREFERRED_CDMA_SUBSCRIPTION); + loadSetting(stmt, Settings.Global.CDMA_SUBSCRIPTION_MODE, type); + // --- New global settings start here } finally { if (stmt != null) stmt.close(); |