Merge "Cache the result of the ContactLoader across instances."
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 06a21c6..9f60412 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -46,8 +46,7 @@
<string name="menu_removeStar" msgid="5844227078364227030">"Verwyder van gunstelinge"</string>
<string name="menu_editContact" msgid="9042415603857662633">"Redigeer"</string>
<string name="menu_deleteContact" msgid="6788644058868189393">"Vee uit"</string>
- <!-- no translation found for menu_create_contact_shortcut (1217971915748509640) -->
- <skip />
+ <string name="menu_create_contact_shortcut" msgid="1217971915748509640">"Plaas op tuisskerm"</string>
<string name="menu_call" msgid="3992595586042260618">"Bel kontak"</string>
<string name="menu_sendSMS" msgid="5535886767547006515">"Teks - kontak"</string>
<string name="menu_splitAggregate" msgid="8368636463748691868">"Skei"</string>
@@ -78,8 +77,7 @@
<string name="ghostData_company" msgid="5414421120553765775">"Maatskappy"</string>
<string name="ghostData_title" msgid="7496735200318496110">"Titel"</string>
<string name="invalidContactMessage" msgid="8215051456181842274">"Die kontak bestaan nie."</string>
- <!-- no translation found for createContactShortcutSuccessful (7874133287558150877) -->
- <skip />
+ <string name="createContactShortcutSuccessful" msgid="7874133287558150877">"Kontak-legstuk by tuisskerm gevoeg."</string>
<string name="pickerNewContactHeader" msgid="7750705279843568147">"Skep nuwe kontak"</string>
<string name="pickerNewContactText" msgid="6166997164401048211">"Skep nuwe kontak"</string>
<string name="phoneLabelsGroup" msgid="6468091477851199285">"Foon"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 44e6567..76628ea 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -46,8 +46,7 @@
<string name="menu_removeStar" msgid="5844227078364227030">"ከተወዳጆች አስወግድ"</string>
<string name="menu_editContact" msgid="9042415603857662633">"አርትዕ"</string>
<string name="menu_deleteContact" msgid="6788644058868189393">"ሰርዝ"</string>
- <!-- no translation found for menu_create_contact_shortcut (1217971915748509640) -->
- <skip />
+ <string name="menu_create_contact_shortcut" msgid="1217971915748509640">"መነሻ የማያ ገጽ ላይ አስቀምጥ"</string>
<string name="menu_call" msgid="3992595586042260618">"የጥሪ ዕውቂያ"</string>
<string name="menu_sendSMS" msgid="5535886767547006515">"ዕውቂያ ፃፍ"</string>
<string name="menu_splitAggregate" msgid="8368636463748691868">"ለይ"</string>
@@ -78,8 +77,7 @@
<string name="ghostData_company" msgid="5414421120553765775">"ኩባንያ"</string>
<string name="ghostData_title" msgid="7496735200318496110">"አርዕስት"</string>
<string name="invalidContactMessage" msgid="8215051456181842274">"ዕውቅያው የለም።"</string>
- <!-- no translation found for createContactShortcutSuccessful (7874133287558150877) -->
- <skip />
+ <string name="createContactShortcutSuccessful" msgid="7874133287558150877">"የእውቂያ ንዑስ ፕሮግራም መነሻ ማያ ገጽ ላይ ታክሏል።"</string>
<string name="pickerNewContactHeader" msgid="7750705279843568147">"አዲስ ዕውቂያ ፍጠር"</string>
<string name="pickerNewContactText" msgid="6166997164401048211">"አዲስ እውቂያ ፍጠር"</string>
<string name="phoneLabelsGroup" msgid="6468091477851199285">"ስልክ"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 45cad3f..35c530b 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -46,8 +46,7 @@
<string name="menu_removeStar" msgid="5844227078364227030">"Elimina dels preferits"</string>
<string name="menu_editContact" msgid="9042415603857662633">"Edita"</string>
<string name="menu_deleteContact" msgid="6788644058868189393">"Suprimeix"</string>
- <!-- no translation found for menu_create_contact_shortcut (1217971915748509640) -->
- <skip />
+ <string name="menu_create_contact_shortcut" msgid="1217971915748509640">"Posa-ho a la pantalla d\'inici"</string>
<string name="menu_call" msgid="3992595586042260618">"Truca al contacte"</string>
<string name="menu_sendSMS" msgid="5535886767547006515">"Envia un SMS al contacte"</string>
<string name="menu_splitAggregate" msgid="8368636463748691868">"Separa"</string>
@@ -78,8 +77,7 @@
<string name="ghostData_company" msgid="5414421120553765775">"Empresa"</string>
<string name="ghostData_title" msgid="7496735200318496110">"Títol"</string>
<string name="invalidContactMessage" msgid="8215051456181842274">"El contacte no existeix."</string>
- <!-- no translation found for createContactShortcutSuccessful (7874133287558150877) -->
- <skip />
+ <string name="createContactShortcutSuccessful" msgid="7874133287558150877">"El widget de contacte s\'ha afegit a la pantalla d\'inici."</string>
<string name="pickerNewContactHeader" msgid="7750705279843568147">"Crea un contacte nou"</string>
<string name="pickerNewContactText" msgid="6166997164401048211">"Crea un contacte nou"</string>
<string name="phoneLabelsGroup" msgid="6468091477851199285">"Telèfon"</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index e17c37a..8a19b77 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -46,8 +46,7 @@
<string name="menu_removeStar" msgid="5844227078364227030">"Remove from favourites"</string>
<string name="menu_editContact" msgid="9042415603857662633">"Edit"</string>
<string name="menu_deleteContact" msgid="6788644058868189393">"Delete"</string>
- <!-- no translation found for menu_create_contact_shortcut (1217971915748509640) -->
- <skip />
+ <string name="menu_create_contact_shortcut" msgid="1217971915748509640">"Place on Home screen"</string>
<string name="menu_call" msgid="3992595586042260618">"Call contact"</string>
<string name="menu_sendSMS" msgid="5535886767547006515">"Text contact"</string>
<string name="menu_splitAggregate" msgid="8368636463748691868">"Separate"</string>
@@ -78,8 +77,7 @@
<string name="ghostData_company" msgid="5414421120553765775">"Company"</string>
<string name="ghostData_title" msgid="7496735200318496110">"Title"</string>
<string name="invalidContactMessage" msgid="8215051456181842274">"The contact doesn\'t exist."</string>
- <!-- no translation found for createContactShortcutSuccessful (7874133287558150877) -->
- <skip />
+ <string name="createContactShortcutSuccessful" msgid="7874133287558150877">"Contact widget added to Home screen."</string>
<string name="pickerNewContactHeader" msgid="7750705279843568147">"Create new contact"</string>
<string name="pickerNewContactText" msgid="6166997164401048211">"Create new contact"</string>
<string name="phoneLabelsGroup" msgid="6468091477851199285">"Phone"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 0963c4f..b0a512b 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -46,8 +46,7 @@
<string name="menu_removeStar" msgid="5844227078364227030">"Eliminar de \"Favoritos\""</string>
<string name="menu_editContact" msgid="9042415603857662633">"Editar"</string>
<string name="menu_deleteContact" msgid="6788644058868189393">"Eliminar"</string>
- <!-- no translation found for menu_create_contact_shortcut (1217971915748509640) -->
- <skip />
+ <string name="menu_create_contact_shortcut" msgid="1217971915748509640">"Añadir al escritorio"</string>
<string name="menu_call" msgid="3992595586042260618">"Llamar al contacto"</string>
<string name="menu_sendSMS" msgid="5535886767547006515">"Enviar SMS al contacto"</string>
<string name="menu_splitAggregate" msgid="8368636463748691868">"Dividir"</string>
@@ -78,8 +77,7 @@
<string name="ghostData_company" msgid="5414421120553765775">"Empresa"</string>
<string name="ghostData_title" msgid="7496735200318496110">"Título"</string>
<string name="invalidContactMessage" msgid="8215051456181842274">"Este contacto no existe."</string>
- <!-- no translation found for createContactShortcutSuccessful (7874133287558150877) -->
- <skip />
+ <string name="createContactShortcutSuccessful" msgid="7874133287558150877">"El widget de contactos se ha añadido al escritorio."</string>
<string name="pickerNewContactHeader" msgid="7750705279843568147">"Crear contacto nuevo"</string>
<string name="pickerNewContactText" msgid="6166997164401048211">"Crear contacto nuevo"</string>
<string name="phoneLabelsGroup" msgid="6468091477851199285">"Teléfono"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 8d04b96..830333e 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -456,7 +456,7 @@
<string name="menu_settings" msgid="377929915873428211">"Paramètres"</string>
<string name="preference_displayOptions" msgid="1341720270148252393">"Options d\'affichage"</string>
<string name="organization_company_and_title" msgid="6718207751363732025">"<xliff:g id="COMPANY_0">%2$s</xliff:g>, <xliff:g id="COMPANY_1">%1$s</xliff:g>"</string>
- <string name="hint_findContacts" msgid="1808681193458772072">"Rechercher des contacts"</string>
+ <string name="hint_findContacts" msgid="1808681193458772072">"Rechercher contacts"</string>
<string name="non_phone_caption" msgid="1541655052330027380">"Numéro de téléphone"</string>
<string name="non_phone_add_to_contacts" msgid="6590985286250471169">"Ajouter aux contacts"</string>
<string name="activity_title_confirm_add_detail" msgid="4065089866210730616">"Ajouter au contact"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index d288f6c..3cabf85 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -46,8 +46,7 @@
<string name="menu_removeStar" msgid="5844227078364227030">"Susa ezintandokazini"</string>
<string name="menu_editContact" msgid="9042415603857662633">"Hlela"</string>
<string name="menu_deleteContact" msgid="6788644058868189393">"Susa"</string>
- <!-- no translation found for menu_create_contact_shortcut (1217971915748509640) -->
- <skip />
+ <string name="menu_create_contact_shortcut" msgid="1217971915748509640">"Indawo esikrinini sekhaya"</string>
<string name="menu_call" msgid="3992595586042260618">"Shayela othintana naye"</string>
<string name="menu_sendSMS" msgid="5535886767547006515">"Bhalela othintana naye"</string>
<string name="menu_splitAggregate" msgid="8368636463748691868">"Hlukanisa"</string>
@@ -78,8 +77,7 @@
<string name="ghostData_company" msgid="5414421120553765775">"Inkampani"</string>
<string name="ghostData_title" msgid="7496735200318496110">"Isihloko"</string>
<string name="invalidContactMessage" msgid="8215051456181842274">"Oxhumana naye akekho."</string>
- <!-- no translation found for createContactShortcutSuccessful (7874133287558150877) -->
- <skip />
+ <string name="createContactShortcutSuccessful" msgid="7874133287558150877">"isinqunjwana soxhumana nabo singeziwe esikrinini sekhaya."</string>
<string name="pickerNewContactHeader" msgid="7750705279843568147">"Dala othintana naye omusha"</string>
<string name="pickerNewContactText" msgid="6166997164401048211">"Dala othintana naye omusha"</string>
<string name="phoneLabelsGroup" msgid="6468091477851199285">"Ifoni"</string>
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index 3024418..8bd9bf9 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -383,7 +383,7 @@
}
}
- private void setFocusOnSearchView() {
+ public void setFocusOnSearchView() {
mSearchView.requestFocus();
mSearchView.setIconified(false); // Workaround for the "IME not popping up" issue.
}
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 04daa9a..5915a7a 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -1689,6 +1689,17 @@
}
@Override
+ protected void onRestoreInstanceState(Bundle savedInstanceState) {
+ super.onRestoreInstanceState(savedInstanceState);
+ // In our own lifecycle, the focus is saved and restore but later taken away by the
+ // ViewPager. As a hack, we force focus on the SearchView if we know that we are searching.
+ // This fixes the keyboard going away on screen rotation
+ if (mActionBarAdapter.isSearchMode()) {
+ mActionBarAdapter.setFocusOnSearchView();
+ }
+ }
+
+ @Override
public DialogManager getDialogManager() {
return mDialogManager;
}
diff --git a/src/com/android/contacts/detail/ContactDetailTabCarousel.java b/src/com/android/contacts/detail/ContactDetailTabCarousel.java
index 38dcfee..9e3a352 100644
--- a/src/com/android/contacts/detail/ContactDetailTabCarousel.java
+++ b/src/com/android/contacts/detail/ContactDetailTabCarousel.java
@@ -33,6 +33,8 @@
import android.widget.ImageView;
import android.widget.TextView;
+import android.util.Log;
+
/**
* This is a horizontally scrolling carousel with 2 tabs: one to see info about the contact and
* one to see updates from the contact.
@@ -161,7 +163,16 @@
// Scrolling by mAllowedHorizontalScrollLength causes listeners to
// scroll by the entire screen amount; compute the scale-factor
// necessary to make this so.
- mScrollScaleFactor = screenWidth / mAllowedHorizontalScrollLength;
+ if (mAllowedHorizontalScrollLength == 0) {
+ // Guard against divide-by-zero.
+ // Note: this hard-coded value prevents a crash, but won't result in the
+ // desired scrolling behavior. We rely on the framework calling onMeasure()
+ // again with a non-zero screen width.
+ mScrollScaleFactor = 1.0f;
+ Log.w(TAG, "set scale-factor to 1.0 to avoid divide-by-zero");
+ } else {
+ mScrollScaleFactor = screenWidth / mAllowedHorizontalScrollLength;
+ }
int tabHeight = Math.round(screenWidth * mTabHeightScreenWidthFraction) + mTabShadowHeight;
// Set the child {@link LinearLayout} to be TAB_COUNT * the computed tab width so that the