diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e50dacd3520..9e39c9f07c9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -28,6 +28,8 @@
+
+
@@ -150,6 +152,14 @@
+
+
+
+
+
+
+
diff --git a/res/drawable/ic_menu_add.png b/res/drawable/ic_menu_add.png
new file mode 100755
index 00000000000..6752bfd1007
Binary files /dev/null and b/res/drawable/ic_menu_add.png differ
diff --git a/res/layout/dialog_edittext.xml b/res/layout/dialog_edittext.xml
new file mode 100644
index 00000000000..9ef1205a8aa
--- /dev/null
+++ b/res/layout/dialog_edittext.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/list_content_with_empty_view.xml b/res/layout/list_content_with_empty_view.xml
new file mode 100644
index 00000000000..324d23f48cc
--- /dev/null
+++ b/res/layout/list_content_with_empty_view.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/values-cs/arrays.xml b/res/values-cs/arrays.xml
index d7a2979025c..57254e1d8e1 100644
--- a/res/values-cs/arrays.xml
+++ b/res/values-cs/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index f692b267cfc..75d54431689 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -1,4 +1,18 @@
+
"Neznámé"
@@ -632,6 +646,22 @@
"Znak „.“ lze vložit dvěma stisky klávesy Mezerník."
"Zobrazování hesel"
"Zadávané heslo je zobrazováno"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Testování"
"Info o telefonu"
"Info o baterii"
diff --git a/res/values-de/arrays.xml b/res/values-de/arrays.xml
index 8152f6e6cec..85252eb12a3 100644
--- a/res/values-de/arrays.xml
+++ b/res/values-de/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 414e1ec8a12..563924bc891 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -1,4 +1,18 @@
+
"Unbekannt"
@@ -632,6 +646,22 @@
"Leertaste zweimal drücken, um \".\" hinzuzufügen"
"Sichtbare Passwörter"
"Passwort bei der Eingabe anzeigen"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Test"
"Telefoninformation"
"Akkuinformationen"
diff --git a/res/values-es/arrays.xml b/res/values-es/arrays.xml
index 6bfcb22287e..2dfbae1fe3a 100644
--- a/res/values-es/arrays.xml
+++ b/res/values-es/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 2507bbcf2ef..877a3c34ee1 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -1,4 +1,18 @@
+
"Desconocido"
@@ -632,6 +646,22 @@
"Pulse la tecla Espacio dos veces para insertar el carácter \".\"."
"Contraseñas visibles"
"Mostrar contraseña mientras se escribe"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Prueba"
"Información sobre el teléfono"
"Información sobre la batería"
diff --git a/res/values-fr/arrays.xml b/res/values-fr/arrays.xml
index be70632141e..3ed45565144 100644
--- a/res/values-fr/arrays.xml
+++ b/res/values-fr/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 0d88d852c68..9178b7db31a 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -1,4 +1,18 @@
+
"Inconnu"
@@ -632,6 +646,22 @@
"Appuyez deux fois sur la touche Espace pour insérer \".\""
"Mots de passe visibles"
"Afficher le mot de passe lors de la saisie"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Test"
"Informations sur le téléphone"
"Informations sur la batterie"
diff --git a/res/values-it/arrays.xml b/res/values-it/arrays.xml
index 7d50af23789..5f7e1aec92e 100644
--- a/res/values-it/arrays.xml
+++ b/res/values-it/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 3d079ae1d6d..20d1e2c86ec 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -1,4 +1,18 @@
+
"Sconosciuto"
@@ -632,6 +646,22 @@
"Premi due volte la barra spaziatrice per inserire \".\""
"Password visibili"
"Mostra la password durante la digitazione"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Verifica in corso"
"Informazioni telefono"
"Informazioni batteria"
diff --git a/res/values-ja/arrays.xml b/res/values-ja/arrays.xml
index 1cc08ca6c24..018a97246e0 100644
--- a/res/values-ja/arrays.xml
+++ b/res/values-ja/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index bbc10a59536..06acceaf55d 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -1,4 +1,18 @@
+
"不明"
@@ -632,6 +646,22 @@
"Spaceキーを2回押して「。」を挿入"
"パスワードを表示"
"入力中のパスワードを表示"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"テスト中"
"携帯電話情報"
"バッテリ情報"
diff --git a/res/values-nl/arrays.xml b/res/values-nl/arrays.xml
index 94cbe3d8a94..dadf564f73d 100644
--- a/res/values-nl/arrays.xml
+++ b/res/values-nl/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 3266f59c1a3..9ed771f3796 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -1,4 +1,18 @@
+
"Onbekend"
@@ -632,6 +646,22 @@
"Druk twee keer op de spatiebalk om \'.\' in te voegen"
"Zichtbare wachtwoorden"
"Wachtwoord weergeven tijdens het typen"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Testen"
"Telefooninformatie"
"Accu-informatie"
diff --git a/res/values-pl/arrays.xml b/res/values-pl/arrays.xml
index e964079c438..eea35d9c6b9 100644
--- a/res/values-pl/arrays.xml
+++ b/res/values-pl/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index b677423c14b..1723c9278bd 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -1,4 +1,18 @@
+
"Nieznany"
@@ -632,6 +646,22 @@
"Naciśnij klawisz spacji dwukrotnie, aby wstawić „.”"
"Widoczne hasła"
"Pokazuj hasło podczas wpisywania"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Testowanie"
"Informacje o telefonie"
"Informacje o baterii"
diff --git a/res/values-ru/arrays.xml b/res/values-ru/arrays.xml
index dff3e58e58c..304802e8b53 100644
--- a/res/values-ru/arrays.xml
+++ b/res/values-ru/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 6c86c122d4d..011519aba76 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -1,4 +1,18 @@
+
"Неизвестно"
@@ -632,6 +646,22 @@
"Чтобы вставить символ \".\", дважды нажмите пробел."
"Показывать пароли"
"Показывать пароль при вводе"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Тестирование"
"Сведения о телефоне"
"Сведения о батарее"
diff --git a/res/values-zh-rCN/arrays.xml b/res/values-zh-rCN/arrays.xml
index 3f40b45b597..6e152878d52 100644
--- a/res/values-zh-rCN/arrays.xml
+++ b/res/values-zh-rCN/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 50dc8ba3ec4..56745bd57a9 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -1,4 +1,18 @@
+
"未知"
@@ -632,6 +646,22 @@
"按两次空格键来插入“。”"
"可见的密码"
"键入时显示密码"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"测试"
"手机信息"
"电池信息"
diff --git a/res/values-zh-rTW/arrays.xml b/res/values-zh-rTW/arrays.xml
index aaa7bfe56f1..8c498b88586 100644
--- a/res/values-zh-rTW/arrays.xml
+++ b/res/values-zh-rTW/arrays.xml
@@ -1,4 +1,18 @@
+
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 2e075b98fb9..95d6c73329c 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -1,4 +1,18 @@
+
"未知的"
@@ -632,6 +646,22 @@
"按空白鍵兩次可插入「.」"
"密碼可見"
"顯示輸入的密碼"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"測試中"
"手機資訊"
"電池資訊"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8e50ced9f88..7daa1658b8a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1524,6 +1524,24 @@ found in the list of installed applications.
Visible passwords
Show password as you type
+
+
+
+ User dictionary
+
+ User dictionary
+
+ Add & remove words from user dictionary
+
+ Add
+
+ Add to dictionary
+
+ Edit
+
+ Delete
+
+ You do not have any words in the user dictionary. You can add a word through the menu.
Testing
diff --git a/res/xml/language_settings.xml b/res/xml/language_settings.xml
index 78b61aacc6e..ff123ed0df6 100644
--- a/res/xml/language_settings.xml
+++ b/res/xml/language_settings.xml
@@ -42,6 +42,13 @@
android:targetPackage="com.android.settings"
android:targetClass="com.android.settings.InputMethodsSettings" />
+
+
+
{
private boolean mVisible;
- private int mPairingStatus;
+ private int mBondState;
private final LocalBluetoothManager mLocalManager;
@@ -85,13 +85,13 @@ public class LocalBluetoothDevice implements Comparable {
}
public void onClicked() {
- int pairingStatus = getPairingStatus();
+ int bondState = getBondState();
if (isConnected()) {
askDisconnect();
- } else if (pairingStatus == SettingsBtStatus.PAIRING_STATUS_PAIRED) {
+ } else if (bondState == BluetoothDevice.BOND_BONDED) {
connect();
- } else if (pairingStatus == SettingsBtStatus.PAIRING_STATUS_UNPAIRED) {
+ } else if (bondState == BluetoothDevice.BOND_NOT_BONDED) {
pair();
}
}
@@ -195,55 +195,54 @@ public class LocalBluetoothDevice implements Comparable {
}
private boolean ensurePaired() {
- if (getPairingStatus() == SettingsBtStatus.PAIRING_STATUS_UNPAIRED) {
+ if (getBondState() == BluetoothDevice.BOND_NOT_BONDED) {
pair();
return false;
} else {
return true;
}
}
-
+
public void pair() {
BluetoothDevice manager = mLocalManager.getBluetoothManager();
-
- // Pairing doesn't work if scanning, so cancel
+
+ // Pairing is unreliable while scanning, so cancel discovery
if (manager.isDiscovering()) {
manager.cancelDiscovery();
}
-
+
if (mLocalManager.createBonding(mAddress)) {
- setPairingStatus(SettingsBtStatus.PAIRING_STATUS_PAIRING);
+ //TODO: consider removing this line - UI will update through Intent
+ setBondState(BluetoothDevice.BOND_BONDING);
}
}
-
+
public void unpair() {
BluetoothDevice manager = mLocalManager.getBluetoothManager();
-
- switch (getPairingStatus()) {
- case SettingsBtStatus.PAIRING_STATUS_PAIRED:
- manager.removeBonding(mAddress);
- break;
-
- case SettingsBtStatus.PAIRING_STATUS_PAIRING:
- manager.cancelBondingProcess(mAddress);
- break;
+
+ switch (getBondState()) {
+ case BluetoothDevice.BOND_BONDED:
+ manager.removeBond(mAddress);
+ break;
+
+ case BluetoothDevice.BOND_BONDING:
+ manager.cancelBondProcess(mAddress);
+ break;
}
}
-
+
private void fillData() {
BluetoothDevice manager = mLocalManager.getBluetoothManager();
-
- fetchName();
+
+ fetchName();
mBtClass = manager.getRemoteClass(mAddress);
LocalBluetoothProfileManager.fill(mBtClass, mProfiles);
-
- mPairingStatus = manager.hasBonding(mAddress)
- ? SettingsBtStatus.PAIRING_STATUS_PAIRED
- : SettingsBtStatus.PAIRING_STATUS_UNPAIRED;
-
+
+ mBondState = manager.getBondState(mAddress);
+
mVisible = false;
-
+
dispatchAttributesChanged();
}
@@ -283,17 +282,17 @@ public class LocalBluetoothDevice implements Comparable {
}
}
- public int getPairingStatus() {
- return mPairingStatus;
+ public int getBondState() {
+ return mBondState;
}
- void setPairingStatus(int pairingStatus) {
- if (mPairingStatus != pairingStatus) {
- mPairingStatus = pairingStatus;
+ void setBondState(int bondState) {
+ if (mBondState != bondState) {
+ mBondState = bondState;
dispatchAttributesChanged();
}
}
-
+
void setRssi(short rssi) {
if (mRssi != rssi) {
mRssi = rssi;
@@ -327,7 +326,7 @@ public class LocalBluetoothDevice implements Comparable {
}
}
- if (getPairingStatus() == SettingsBtStatus.PAIRING_STATUS_PAIRING) {
+ if (getBondState() == BluetoothDevice.BOND_BONDING) {
return true;
}
@@ -374,9 +373,8 @@ public class LocalBluetoothDevice implements Comparable {
return SettingsBtStatus.getConnectionStatusSummary(connectionStatus);
}
}
-
- int pairingStatus = getPairingStatus();
- return SettingsBtStatus.getPairingStatusSummary(pairingStatus);
+
+ return SettingsBtStatus.getPairingStatusSummary(getBondState());
}
/**
@@ -430,7 +428,7 @@ public class LocalBluetoothDevice implements Comparable {
// No context menu if there are no profiles
if (mProfiles.size() == 0) return;
- int pairingStatus = getPairingStatus();
+ int bondState = getBondState();
boolean isConnected = isConnected();
menu.setHeaderTitle(getName());
@@ -439,13 +437,13 @@ public class LocalBluetoothDevice implements Comparable {
menu.add(0, CONTEXT_ITEM_DISCONNECT, 0, R.string.bluetooth_device_context_disconnect);
} else {
// For connection action, show either "Connect" or "Pair & connect"
- int connectString = pairingStatus == SettingsBtStatus.PAIRING_STATUS_UNPAIRED
+ int connectString = (bondState == BluetoothDevice.BOND_NOT_BONDED)
? R.string.bluetooth_device_context_pair_connect
: R.string.bluetooth_device_context_connect;
menu.add(0, CONTEXT_ITEM_CONNECT, 0, connectString);
}
- if (pairingStatus == SettingsBtStatus.PAIRING_STATUS_PAIRED) {
+ if (bondState == BluetoothDevice.BOND_BONDED) {
// For unpair action, show either "Unpair" or "Disconnect & unpair"
int unpairString = isConnected
? R.string.bluetooth_device_context_disconnect_unpair
@@ -540,8 +538,8 @@ public class LocalBluetoothDevice implements Comparable {
if (comparison != 0) return comparison;
// Paired above not paired
- comparison = (another.mPairingStatus == SettingsBtStatus.PAIRING_STATUS_PAIRED ? 1 : 0) -
- (mPairingStatus == SettingsBtStatus.PAIRING_STATUS_PAIRED ? 1 : 0);
+ comparison = (another.mBondState == BluetoothDevice.BOND_BONDED ? 1 : 0) -
+ (mBondState == BluetoothDevice.BOND_BONDED ? 1 : 0);
if (comparison != 0) return comparison;
// Visible above not visible
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothDeviceManager.java b/src/com/android/settings/bluetooth/LocalBluetoothDeviceManager.java
index 48a41f1a655..a751656df72 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothDeviceManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothDeviceManager.java
@@ -47,7 +47,7 @@ public class LocalBluetoothDeviceManager {
private synchronized void readPairedDevices() {
BluetoothDevice manager = mLocalManager.getBluetoothManager();
- String[] bondedAddresses = manager.listBondings();
+ String[] bondedAddresses = manager.listBonds();
if (bondedAddresses == null) return;
for (String address : bondedAddresses) {
@@ -97,7 +97,7 @@ public class LocalBluetoothDeviceManager {
}
private void checkForDeviceRemoval(LocalBluetoothDevice device) {
- if (device.getPairingStatus() == SettingsBtStatus.PAIRING_STATUS_UNPAIRED &&
+ if (device.getBondState() == BluetoothDevice.BOND_NOT_BONDED &&
!device.isVisible()) {
// If device isn't paired, remove it altogether
mDevices.remove(device);
@@ -154,19 +154,18 @@ public class LocalBluetoothDeviceManager {
}
}
- public synchronized void onBondingStateChanged(String address, boolean created) {
+ public synchronized void onBondingStateChanged(String address, int bondState) {
LocalBluetoothDevice device = findDevice(address);
if (device == null) {
Log.e(TAG, "Got bonding state changed for " + address +
", but we have no record of that device.");
return;
}
-
- device.setPairingStatus(created ? SettingsBtStatus.PAIRING_STATUS_PAIRED
- : SettingsBtStatus.PAIRING_STATUS_UNPAIRED);
+
+ device.setBondState(bondState); //TODO: might be unecessary
checkForDeviceRemoval(device);
- if (created) {
+ if (bondState == BluetoothDevice.BOND_BONDED) {
// Auto-connect after pairing
device.connect();
}
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothManager.java b/src/com/android/settings/bluetooth/LocalBluetoothManager.java
index 9db9e775015..f8275b50d60 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothManager.java
@@ -227,7 +227,7 @@ public class LocalBluetoothManager {
}
public boolean createBonding(String address) {
- return mManager.createBonding(address, mEventRedirector.getBluetoothDeviceCallback());
+ return mManager.createBond(address);
}
public void showError(String address, int titleResId, int messageResId) {
diff --git a/src/com/android/settings/bluetooth/SettingsBtStatus.java b/src/com/android/settings/bluetooth/SettingsBtStatus.java
index 051d6667780..d2cbef5c53e 100644
--- a/src/com/android/settings/bluetooth/SettingsBtStatus.java
+++ b/src/com/android/settings/bluetooth/SettingsBtStatus.java
@@ -16,6 +16,8 @@
package com.android.settings.bluetooth;
+import android.bluetooth.BluetoothDevice;
+
import com.android.settings.R;
/**
@@ -64,19 +66,13 @@ public class SettingsBtStatus {
|| connectionStatus == CONNECTION_STATUS_DISCONNECTING;
}
- // Pairing status
-
- public static final int PAIRING_STATUS_UNPAIRED = 0;
- public static final int PAIRING_STATUS_PAIRED = 1;
- public static final int PAIRING_STATUS_PAIRING = 2;
-
- public static final int getPairingStatusSummary(int pairingStatus) {
- switch (pairingStatus) {
- case PAIRING_STATUS_PAIRED:
+ public static final int getPairingStatusSummary(int bondState) {
+ switch (bondState) {
+ case BluetoothDevice.BOND_BONDED:
return R.string.bluetooth_paired;
- case PAIRING_STATUS_PAIRING:
+ case BluetoothDevice.BOND_BONDING:
return R.string.bluetooth_pairing;
- case PAIRING_STATUS_UNPAIRED:
+ case BluetoothDevice.BOND_NOT_BONDED:
return R.string.bluetooth_not_connected;
default:
return 0;