OSDN Git Service

auto import from //depot/cupcake/@132589
authorThe Android Open Source Project <initial-contribution@android.com>
Tue, 3 Mar 2009 22:04:32 +0000 (14:04 -0800)
committerThe Android Open Source Project <initial-contribution@android.com>
Tue, 3 Mar 2009 22:04:32 +0000 (14:04 -0800)
28 files changed:
AndroidManifest.xml
plugin/com/android/im/plugin/ImpsConfigNames.java
res/drawable/bubble.xml [deleted file]
res/drawable/list_item_im_bubble.9.png [new file with mode: 0644]
res/drawable/list_item_im_bubble_default.9.png [deleted file]
res/drawable/list_item_im_bubble_pressed.9.png [deleted file]
res/drawable/list_item_im_bubble_selected.9.png [deleted file]
res/layout/chat_view.xml
res/layout/contact_list_view.xml
res/layout/contact_view.xml
res/layout/group_view.xml
res/values-es/strings.xml
res/values-fr/strings.xml
res/values-it/strings.xml
res/values-nb/strings.xml
res/values-nl/strings.xml
res/values-pl/strings.xml
samples/PluginDemo/res/values-es/strings.xml
samples/PluginDemo/res/values-fr/strings.xml
samples/PluginDemo/res/values-it/strings.xml
samples/PluginDemo/res/values-nb/strings.xml
samples/PluginDemo/res/values-nl/strings.xml
samples/PluginDemo/res/values-pl/strings.xml
src/com/android/im/app/ChatView.java
src/com/android/im/app/ContactView.java
src/com/android/im/app/FrontDoorPlugin.java
src/com/android/im/app/Ticker.java [new file with mode: 0644]
src/com/android/im/app/UserPresenceView.java

index c0b26aa..09038af 100644 (file)
 
         <activity android:name=".app.NewChatActivity"
                 android:configChanges="orientation|keyboardHidden"
-                android:windowSoftInputMode="stateUnchanged">
+                android:windowSoftInputMode="stateHidden">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
                 <category android:name="android.intent.category.DEFAULT" />
index 15e82b7..de64cd4 100644 (file)
@@ -119,9 +119,4 @@ public interface ImpsConfigNames extends ImConfigNames {
      * set, the default one will be used.
      */
     public static final String CUSTOM_PASSWORD_DIGEST = "imps.custom-password-digest";
-
-    /**
-     * Determines whether the provider support user-defined presence text.
-     */
-    public static final String SUPPORT_USER_DEFINED_PRESENCE = "imps.support-user-defined-presence";
 }
diff --git a/res/drawable/bubble.xml b/res/drawable/bubble.xml
deleted file mode 100644 (file)
index c9a7bc7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_pressed="true" android:drawable="@drawable/list_item_im_bubble_pressed" />
-    <item android:state_selected="true" android:drawable="@drawable/list_item_im_bubble_selected" />
-    <item android:state_enabled="false" android:drawable="@drawable/list_item_im_bubble_default" />
-    <item android:drawable="@drawable/list_item_im_bubble_default" />
-</selector>
diff --git a/res/drawable/list_item_im_bubble.9.png b/res/drawable/list_item_im_bubble.9.png
new file mode 100644 (file)
index 0000000..0c539cf
Binary files /dev/null and b/res/drawable/list_item_im_bubble.9.png differ
diff --git a/res/drawable/list_item_im_bubble_default.9.png b/res/drawable/list_item_im_bubble_default.9.png
deleted file mode 100644 (file)
index 92f7058..0000000
Binary files a/res/drawable/list_item_im_bubble_default.9.png and /dev/null differ
diff --git a/res/drawable/list_item_im_bubble_pressed.9.png b/res/drawable/list_item_im_bubble_pressed.9.png
deleted file mode 100644 (file)
index 2032bc0..0000000
Binary files a/res/drawable/list_item_im_bubble_pressed.9.png and /dev/null differ
diff --git a/res/drawable/list_item_im_bubble_selected.9.png b/res/drawable/list_item_im_bubble_selected.9.png
deleted file mode 100644 (file)
index bd0a1e2..0000000
Binary files a/res/drawable/list_item_im_bubble_selected.9.png and /dev/null differ
index 0b76029..3a4363d 100644 (file)
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine|textImeMultiLine"
-            android:imeOptions="actionSend|flagNoEnterAction"
             android:maxLines="4"
             android:maxLength="2000"
             android:hint="@string/compose_hint"/>
index 01e3b50..0bc4018 100644 (file)
         android:id="@+id/userPresence"
         android:orientation="horizontal"
         android:layout_width="fill_parent"
-        android:layout_height="64dip"
-        android:layout_centerVertical="true"
-        android:paddingTop="9dip"
-        android:paddingLeft="5dip"
-        android:paddingBottom="5dip"
+        android:layout_height="wrap_content"
+        android:paddingLeft="9dip"
+        android:paddingTop="5dip"
         android:paddingRight="5dip"
-        android:background="#ffa9a9a9">
+        android:paddingBottom="5dip"            
+        android:layout_centerVertical="true"
+        android:background="#ffff">
 
         <LinearLayout
             android:layout_width="wrap_content"
             android:layout_gravity="center_vertical"
             android:layout_weight="1"
             android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:singleLine="true"
-            android:textAppearance="?android:attr/textAppearanceMediumInverse"
-            android:visibility="gone"/>
-
-        <TextView android:id="@+id/statusView"
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:gravity="center_vertical"
-            android:paddingTop="5dip"
-            android:paddingLeft="3dip"
-            android:singleLine="true"
-            android:visibility="gone"
-            android:textAppearance="?android:attr/textAppearanceLargeInverse"/>
+            android:layout_height="wrap_content"/>
 
     </com.android.im.app.UserPresenceView>
 
index b64d990..daad1ca 100644 (file)
     android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
     android:paddingRight="9dip">
 
-    <RelativeLayout
-        android:id="@+id/contactInfo"
-        android:layout_width="0dip"
-        android:layout_height="fill_parent"
-        android:layout_weight="1"
-        android:layout_marginRight="5dip"
-        android:paddingLeft="6dip">
+    <LinearLayout android:id="@+id/contactInfo"
+        android:orientation="vertical"
+        android:paddingLeft="6dip"
+        android:layout_width="fill_parent"
+        android:layout_gravity="center_vertical"
+        android:layout_height="wrap_content">
 
-        <ImageView
-            android:id="@+id/presence"
-            android:scaleType="fitXY"
-            android:layout_centerVertical="true"
-            android:layout_alignParentRight="true"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingRight="6dip">
-        </ImageView>
-
-        <LinearLayout
-            android:orientation="vertical"
+        <LinearLayout android:orientation="horizontal"
             android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:layout_toLeftOf="@id/presence"
-            android:layout_centerVertical="true">
+            android:layout_height="wrap_content">
 
-            <LinearLayout android:orientation="horizontal"
-                android:layout_width="fill_parent"
-                android:layout_height="wrap_content">
+            <TextView android:id="@+id/line1"
+                android:maxLines="1"
+                android:layout_width="0dip"
+                android:layout_weight="1"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge" />
 
-                <TextView android:id="@+id/line1"
-                    android:maxLines="1"
-                    android:layout_width="0dip"
-                    android:layout_weight="1"
-                    android:layout_height="wrap_content"
-                    android:textStyle="bold"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:ellipsize="marquee" />
+            <TextView android:id="@+id/timestamp"
+                android:singleLine="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:visibility="gone"
+                android:textAppearance="?android:attr/textAppearanceSmall"/>
+        </LinearLayout>
 
-                <TextView android:id="@+id/timestamp"
-                    android:singleLine="true"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:paddingRight="8dip"
-                    android:visibility="gone"
-                    android:textAppearance="?android:attr/textAppearanceSmall"/>
-            </LinearLayout>
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content">
+            <!--
+            <ImageView
+                android:id="@+id/presence"
+                android:layout_width="18dip"
+                android:layout_height="18dip" />
+            -->
+            
+            <com.android.im.app.Ticker
+               android:layout_width="fill_parent"
+               android:layout_height="wrap_content"
+               android:layout_marginLeft="4dip">
 
-            <TextView android:id="@+id/line2"
-                android:maxLines="1"
-                android:layout_width="fill_parent"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:ellipsize="marquee"/>
+               <TextView android:id="@+id/line2"
+                   android:maxLines="1"
+                   android:layout_width="wrap_content"
+                   android:layout_height="wrap_content"
+                   android:textAppearance="?android:attr/textAppearanceSmall"/>
+           </com.android.im.app.Ticker>
         </LinearLayout>
-    </RelativeLayout>
+
+    </LinearLayout>
+
 </view>
index a8bfad1..2ab2e12 100644 (file)
@@ -37,7 +37,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
-        android:paddingRight="10dip"
+        android:paddingRight="4dip"
         android:textAppearance="?android:attr/textAppearanceSmall"/>
 
 </LinearLayout>
index 3d4b63d..304975d 100644 (file)
     <string name="not_signed_in">"No has accedido a tu cuenta."</string>
     <string name="general_error">"Código de error <xliff:g id="CODE">%1$d</xliff:g>"</string>
   <string-array name="default_smiley_names">
-    <item>"Contento"</item>
+    <item>"Feliz"</item>
     <item>"Triste"</item>
-    <item>"Guiño"</item>
+    <item>"Guiñando"</item>
     <item>"Sacando la lengua"</item>
     <item>"Sorprendido"</item>
     <item>"Besando"</item>
index 8fbf37b..4838cf9 100644 (file)
 -->
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="im_label">"Chat"</string>
+    <string name="im_label">"MI"</string>
     <string name="menu_cancel_signin">"Annuler la connexion"</string>
     <string name="menu_add_contact">"Ajouter un contact"</string>
     <string name="menu_remove_contact">"Supprimer le contact"</string>
     <string name="menu_block_contact">"Bloquer le contact"</string>
-    <string name="menu_view_blocked">"Bloqués"</string>
+    <string name="menu_view_blocked">"Bloqué"</string>
     <string name="menu_view_accounts">"Liste des comptes"</string>
     <string name="menu_settings">"Paramètres"</string>
     <string name="menu_start_chat">"Lancer un chat"</string>
     <string name="add_account">"Ajouter un compte <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
     <string name="label_username">"Nom d\'utilisateur :"</string>
     <string name="label_password">"Mot de passe :"</string>
-    <string name="remember_password">"Mémoriser mon mot de passe"</string>
-    <string name="keep_me_signed_in">"Me connecter automatiquement"</string>
+    <string name="remember_password">"Mémoriser mon mot de passe."</string>
+    <string name="keep_me_signed_in">"Me connecter automatiquement."</string>
     <string name="sign_up">"Vous ne possédez pas de compte ?"</string>
     <string name="check_auto_sign_in">"Cette option vous connecte automatiquement à chaque fois que vous ouvrez cette application. Pour désactiver l\'option, déconnectez-vous, puis décochez la case \"Connexion automatique\"."</string>
     <string name="sign_in">"Se connecter"</string>
-    <string name="signing_in_to">"Connexion à <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
+    <string name="signing_in_to">"Se connecter à <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
     <string name="signing_in_wait">"Connexion..."</string>
     <!-- no translation found for bg_data_prompt_title (4861800723853178111) -->
     <skip />
     <string name="setting_title">"Paramètres généraux"</string>
     <string name="hide_offline_contacts">"Masquer les contacts hors ligne"</string>
     <string name="notification_group_title">"Paramètres des notifications"</string>
-    <string name="notification_enabled_title">"Notifications de chat"</string>
-    <string name="notification_enabled_summary">"Signaler la réception d\'un chat dans la barre d\'état"</string>
-    <string name="notification_vibrate_title">"Vibreur"</string>
-    <string name="notification_vibrate_summary">"Vibre également à la réception d\'un chat"</string>
+    <string name="notification_enabled_title">"Notifications de MI"</string>
+    <string name="notification_enabled_summary">"Signaler la réception d\'un MI dans la barre d\'état"</string>
+    <string name="notification_vibrate_title">"Vibrer"</string>
+    <string name="notification_vibrate_summary">"Vibre également à la réception d\'un MI"</string>
     <string name="notification_sound_title">"Son"</string>
-    <string name="notification_sound_summary">"Déclencher la sonnerie lors de la réception d\'un chat"</string>
+    <string name="notification_sound_summary">"Déclencher la sonnerie lors de la réception d\'un MI"</string>
     <string name="notification_ringtone_title">"Sélectionner une sonnerie"</string>
     <string name="invitation_prompt">"<xliff:g id="USER">%1$s</xliff:g> vous a invité à rejoindre un chat en groupe."</string>
     <string name="invitation_sent_prompt">"L\'invitation a été envoyé à <xliff:g id="USER">%1$s</xliff:g>."</string>
     <string name="delete_contact_success">"Contact \"<xliff:g id="USER">%1$s</xliff:g>\" supprimé."</string>
     <string name="block_contact_success">"Contact \"<xliff:g id="USER">%1$s</xliff:g>\" bloqué."</string>
     <string name="unblock_contact_success">"Contact \"<xliff:g id="USER">%1$s</xliff:g>\" débloqué."</string>
-    <string name="perm_label">"démarrer le service de chat"</string>
-    <string name="perm_desc">"Permet aux applications de lancer le service de chat via Intent."</string>
+    <string name="perm_label">"démarrer le service de MI"</string>
+    <string name="perm_desc">"Permet aux applications de lancer le service de MI via Intent."</string>
     <string name="error">"Avertissement"</string>
     <string name="login_service_failed">"Connexion au service <xliff:g id="SERVICE">%1$s</xliff:g> impossible. Veuillez réessayer ultérieurement."\n"(Détails : <xliff:g id="DESCRIPTION">%2$s</xliff:g>)"</string>
     <string name="add_list_failed">"La liste n\'a pas été ajoutée."</string>
     <string name="session_expired">"La session a expiré. Veuillez vous reconnecter."</string>
     <string name="forced_logout">"vous vous êtes connecté depuis un autre client."</string>
     <string name="already_logged_in">"vous êtes déjà connecté depuis un autre client."</string>
-    <string name="msisdn_error">"Impossible de lire le numéro de téléphone de votre carte SIM. Veuillez contacter votre opérateur pour obtenir de l\'aide."</string>
+    <string name="msisdn_error">"Désolé, impossible de lire le numéro de téléphone de votre carte SIM. Veuillez contacter votre opérateur pour obtenir de l\'aide."</string>
     <string name="not_signed_in">"Vous n\'êtes pas connecté actuellement."</string>
     <string name="general_error">"Code d\'erreur <xliff:g id="CODE">%1$d</xliff:g>"</string>
   <string-array name="default_smiley_names">
     <item>"Clin d\'oeil"</item>
     <item>"Tire la langue"</item>
     <item>"Surpris"</item>
-    <item>"Bisou"</item>
-    <item>"Hurle"</item>
+    <item>"Bisous"</item>
+    <item>"Crier"</item>
     <item>"Cool"</item>
     <item>"Argent"</item>
     <item>"Embarrassé"</item>
     <item>"Indécis"</item>
     <item>"Pleure"</item>
     <item>"Motus et bouche cousue"</item>
-    <item>"Rigole"</item>
+    <item>"Rire"</item>
     <item>"Confus"</item>
   </string-array>
   <string-array name="default_smiley_texts">
index ec1e57d..e3b801f 100644 (file)
 -->
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="im_label">"Chat"</string>
+    <string name="im_label">"IM"</string>
     <string name="menu_cancel_signin">"Annulla accesso"</string>
     <string name="menu_add_contact">"Aggiungi contatto"</string>
     <string name="menu_remove_contact">"Elimina contatto"</string>
     <string name="menu_block_contact">"Blocca contatto"</string>
-    <string name="menu_view_blocked">"Bloccati"</string>
+    <string name="menu_view_blocked">"Bloccato"</string>
     <string name="menu_view_accounts">"Elenco account"</string>
     <string name="menu_settings">"Impostazioni"</string>
     <string name="menu_start_chat">"Inizia conversazione"</string>
     <string name="setting_title">"Impostazioni generali"</string>
     <string name="hide_offline_contacts">"Nascondi contatti offline"</string>
     <string name="notification_group_title">"Impostazioni notifiche"</string>
-    <string name="notification_enabled_title">"Notifiche chat"</string>
-    <string name="notification_enabled_summary">"Notifica in barra di stato all\'arrivo di un messaggio"</string>
+    <string name="notification_enabled_title">"Notifiche IM"</string>
+    <string name="notification_enabled_summary">"Notifica in barra di stato quando arriva msg IM"</string>
     <string name="notification_vibrate_title">"Vibrazione"</string>
-    <string name="notification_vibrate_summary">"Vibra anche all\'arrivo di msg chat"</string>
+    <string name="notification_vibrate_summary">"Vibra anche quando arriva msg IM"</string>
     <string name="notification_sound_title">"Allarme"</string>
-    <string name="notification_sound_summary">"Usa anche suoneria all\'arrivo di msg chat"</string>
+    <string name="notification_sound_summary">"Usa suoneria anche quando arriva msg IM"</string>
     <string name="notification_ringtone_title">"Seleziona suoneria"</string>
     <string name="invitation_prompt">"<xliff:g id="USER">%1$s</xliff:g> ti ha invitato a unirti a una conversazione di gruppo."</string>
     <string name="invitation_sent_prompt">"L\'invito è stato inviato a <xliff:g id="USER">%1$s</xliff:g>."</string>
   <string-array name="default_smiley_names">
     <item>"Felice"</item>
     <item>"Triste"</item>
-    <item>"Occhiolino"</item>
-    <item>"Linguaccia"</item>
+    <item>"Fare l\'occhiolino"</item>
+    <item>"Lingua fuori"</item>
     <item>"Sorpreso"</item>
-    <item>"Bacio"</item>
-    <item>"Urlo"</item>
-    <item>"Fico"</item>
-    <item>"Fatti, non parole"</item>
+    <item>"Baciare"</item>
+    <item>"Urlare"</item>
+    <item>"Favoloso"</item>
+    <item>"Bocca a forma di dollaro"</item>
     <item>"Gaffe"</item>
     <item>"Imbarazzato"</item>
     <item>"Angelo"</item>
     <item>"Indeciso"</item>
-    <item>"Piango"</item>
+    <item>"Piangere"</item>
     <item>"Labbra cucite"</item>
-    <item>"Risata"</item>
+    <item>"Sorridere"</item>
     <item>"Confuso"</item>
   </string-array>
   <string-array name="default_smiley_texts">
index dffe5ef..9d6b208 100644 (file)
@@ -34,9 +34,9 @@
     <string name="menu_plus">"Meny+"</string>
     <string name="default_input_title">"Inndata"</string>
     <string name="confirm">"Bekreft"</string>
-    <string name="confirm_delete_contact">"Kontakten \"<xliff:g id="USER">%1$s</xliff:g>\" vil bli slettet."</string>
-    <string name="confirm_block_contact">"Kontakten \"<xliff:g id="USER">%1$s</xliff:g>\" vil bli blokkert."</string>
-    <string name="confirm_unblock_contact">"Kontakten \"<xliff:g id="USER">%1$s</xliff:g>\" vil bli avblokkert."</string>
+    <string name="confirm_delete_contact">"Kontakten \\\\\\\"<xliff:g id="USER">%1$s</xliff:g>\\\\\\\" vil bli slettet."</string>
+    <string name="confirm_block_contact">"Kontakten \\\\\\\"<xliff:g id="USER">%1$s</xliff:g>\\\\\\\" vil bli blokkert."</string>
+    <string name="confirm_unblock_contact">"Kontakten \\\\\\\"<xliff:g id="USER">%1$s</xliff:g>\\\\\\\" vil bli avblokkert."</string>
     <string name="ok">"OK"</string>
     <string name="cancel">"Avbryt"</string>
     <string name="yes">"OK"</string>
@@ -49,7 +49,7 @@
     <string name="remember_password">"Husk passord."</string>
     <string name="keep_me_signed_in">"Logg inn automatisk."</string>
     <string name="sign_up">"Mangler du konto?"</string>
-    <string name="check_auto_sign_in">"Dette valget logger deg automatisk inn hver gang du åpner applikasjonen. For å avmerke valget, logg ut og fjern så haken ved \"Logg inn automatis\"."</string>
+    <string name="check_auto_sign_in">"Dette valget logger deg automatisk inn hver gang du åpner applikasjonen. For å avmerke valget, logg ut og fjern så haken ved \\\\\\\"Logg inn automatis\\\\\\\"."</string>
     <string name="sign_in">"Logg inn"</string>
     <string name="signing_in_to">"Logger inn på <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
     <string name="signing_in_wait">"Logger inn…"</string>
     <string name="subscription_notify_text">"Ny venneinvitasjon fra <xliff:g id="USER">%s</xliff:g>"</string>
     <string name="notify_groupchat_label">"Invitasjon til gruppesamtale"</string>
     <string name="group_chat_invite_notify_text">"Ny invitasjon til gruppesamtale fra <xliff:g id="USER">%s</xliff:g>"</string>
-    <string name="add_contact_success">"Kontakten \"<xliff:g id="USER">%1$s</xliff:g>\" ble lagt til."</string>
-    <string name="delete_contact_success">"Kontakten \"<xliff:g id="USER">%1$s</xliff:g>\" ble slettet."</string>
-    <string name="block_contact_success">"Kontakten \"<xliff:g id="USER">%1$s</xliff:g>\" ble blokkert."</string>
-    <string name="unblock_contact_success">"Kontakten \"<xliff:g id="USER">%1$s</xliff:g>\" ble avblokkert."</string>
+    <string name="add_contact_success">"Kontakten \\\\\\\"<xliff:g id="USER">%1$s</xliff:g>\\\\\\\" ble lagt til."</string>
+    <string name="delete_contact_success">"Kontakten \\\\\\\"<xliff:g id="USER">%1$s</xliff:g>\\\\\\\" ble slettet."</string>
+    <string name="block_contact_success">"Kontakten \\\\\\\"<xliff:g id="USER">%1$s</xliff:g>\\\\\\\" ble blokkert."</string>
+    <string name="unblock_contact_success">"Kontakten \\\\\\\"<xliff:g id="USER">%1$s</xliff:g>\\\\\\\" ble avblokkert."</string>
     <string name="perm_label">"start lynmeldingstjeneste"</string>
     <string name="perm_desc">"Tillater applikasjoner å starte lynmeldingstjenesten."</string>
     <string name="error">"NB"</string>
     <string name="load_contact_list_failed">"Kontaktlisten ble ikke lastet."</string>
     <string name="cant_connect_to_server">"Kan ikke koble til tjeneren. Sjekk tilkoblingen."</string>
     <string name="contact_already_exist">"<xliff:g id="USER">%1$s</xliff:g> finnes allerede i kontaktlisten."</string>
-    <string name="contact_blocked">"Kontakten \"<xliff:g id="USER">%1$s</xliff:g>\" er nå blokkert."</string>
+    <string name="contact_blocked">"Kontakten \\\\\\\"<xliff:g id="USER">%1$s</xliff:g>\\\\\\\" er nå blokkert."</string>
     <string name="contact_not_loaded">"Vent mens kontaktlisten lastes."</string>
     <string name="network_error">"Det oppsto en nettfeil."</string>
     <string name="service_not_support">"Tjeneren støtter ikke denne funksjonen."</string>
     <item>":-!"</item>
     <item>":-["</item>
     <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\\\\\'("</item>
+    <item>":-\\\\\\\\"</item>
+    <item>":\\\\\\\'("</item>
     <item>":-X"</item>
     <item>":-D"</item>
     <item>"o_O"</item>
index 01c1ee4..d437686 100644 (file)
@@ -27,7 +27,7 @@
     <string name="menu_sign_out">"Afmelden"</string>
     <string name="menu_view_profile">"Profiel weergeven"</string>
     <string name="menu_end_conversation">"Chat beëindigen"</string>
-    <string name="menu_view_contact_list">"Lijst met contacten"</string>
+    <string name="menu_view_contact_list">"Lijst met contactpersonen"</string>
     <string name="menu_invite_contact">"Uitnodigen..."</string>
     <string name="menu_switch_chats">"Schakelen tussen chats"</string>
     <string name="menu_insert_smiley">"Smiley invoegen"</string>
     <string name="unknown_contact">"("<i>"Onbekend"</i>")"</string>
     <string name="empty_contact_group">"Leeg"</string>
     <string name="empty_conversation_group">"Geen gesprekken"</string>
-    <string name="contacts_picker_title">"Contacten selecteren om uit te nodigen"</string>
+    <string name="contacts_picker_title">"Contactpersonen selecteren om uit te nodigen"</string>
     <string name="contact_filter_hint">"Typ om een contactpersoon te vinden"</string>
-    <string name="empty_contact_list">"Kan geen contacten vinden."</string>
-    <string name="blocked_list_title">"Geblokkeerde contacten - <xliff:g id="USER">%1$s</xliff:g>"</string>
-    <string name="no_blocked_contact">"Geen geblokkeerde contacten."</string>
+    <string name="empty_contact_list">"Kan geen contactpersonen vinden."</string>
+    <string name="blocked_list_title">"Geblokkeerde contactpersonen - <xliff:g id="USER">%1$s</xliff:g>"</string>
+    <string name="no_blocked_contact">"Geen geblokkeerde contactpersonen."</string>
     <string name="contact_profile_title">"Profiel van contactpersoon"</string>
     <string name="label_status">"Status:"</string>
     <string name="label_client_type">"Type client:"</string>
     <string name="msg_sent_failed">"Dit bericht kan niet worden verzonden."</string>
     <string name="disconnected_warning">"Verbinding met de server is verbroken. Berichten worden verzonden wanneer u online bent."</string>
     <string name="contact_offline_warning">"<xliff:g id="USER_0">%1$s</xliff:g> is offline. Berichten die u verzendt, worden afgeleverd wanneer <xliff:g id="USER_1">%1$s</xliff:g> online komt."</string>
-    <string name="contact_not_in_list_warning">"<xliff:g id="USER">%1$s</xliff:g> staat niet in uw lijst met contacten"</string>
+    <string name="contact_not_in_list_warning">"<xliff:g id="USER">%1$s</xliff:g> staat niet in uw lijst met contactpersonen"</string>
     <string name="select_link_title">"Link selecteren"</string>
     <string name="empty_chat_list">"Geen actieve chats."</string>
     <string name="add_contact_title">"Contactpersoon toevoegen"</string>
     <string name="input_contact_label">"E-mailadres van persoon die u wilt uitnodigen:"</string>
     <string name="choose_list_label">"Een lijst kiezen:"</string>
-    <string name="invite_instruction">"Typ een naam om toe te voegen vanuit \'Contacten\'."</string>
+    <string name="invite_instruction">"Typ een naam om toe te voegen vanuit \'Contactpersonen\'."</string>
     <string name="invite_label">"Uitnodiging verzenden"</string>
     <string name="setting_title">"Algemene instellingen"</string>
-    <string name="hide_offline_contacts">"Offline contacten verbergen"</string>
+    <string name="hide_offline_contacts">"Offline contactpersonen verbergen"</string>
     <string name="notification_group_title">"Instellingen voor meldingen"</string>
     <string name="notification_enabled_title">"Meldingen voor chatberichten"</string>
     <string name="notification_enabled_summary">"Melding op statusbalk weergeven wanneer een chatbericht wordt ontvangen"</string>
     <string name="invitation_sent_prompt">"Er is een uitnodiging verzonden naar <xliff:g id="USER">%1$s</xliff:g>."</string>
     <string name="accept_invitation">"Accepteren"</string>
     <string name="decline_invitation">"Afwijzen"</string>
-    <string name="subscription_prompt">"<xliff:g id="USER">%1$s</xliff:g> heeft u uitgenodigd voor zijn/haar lijst met contacten."</string>
+    <string name="subscription_prompt">"<xliff:g id="USER">%1$s</xliff:g> heeft u uitgenodigd voor zijn/haar lijst met contactpersonen."</string>
     <string name="approve_subscription">"Accepteren"</string>
     <string name="decline_subscription">"Afwijzen"</string>
     <string name="approve_subscription_error">"Kan het abonnement van <xliff:g id="USER">%1$s</xliff:g> niet goedkeuren. Probeer het later opnieuw."</string>
     <string name="select_contact">"Selecteer eerst een contactpersoon."</string>
     <string name="disconnected">"Verbinding verbroken!"\n</string>
     <string name="service_error">"Servicefout."</string>
-    <string name="load_contact_list_failed">"De lijst met contacten is niet geladen."</string>
+    <string name="load_contact_list_failed">"De lijst met contactpersonen is niet geladen."</string>
     <string name="cant_connect_to_server">"Kan geen verbinding maken met de server. Controleer uw verbinding."</string>
-    <string name="contact_already_exist">"<xliff:g id="USER">%1$s</xliff:g> staat al in uw lijst met contacten."</string>
+    <string name="contact_already_exist">"<xliff:g id="USER">%1$s</xliff:g> staat al in uw lijst met contactpersonen."</string>
     <string name="contact_blocked">"Contactpersoon \'<xliff:g id="USER">%1$s</xliff:g>\' is geblokkeerd."</string>
-    <string name="contact_not_loaded">"Uw lijst met contacten wordt geladen."</string>
+    <string name="contact_not_loaded">"Uw lijst met contactpersonen wordt geladen."</string>
     <string name="network_error">"Er is een netwerkfout opgetreden."</string>
     <string name="service_not_support">"Deze functionaliteit wordt niet ondersteund door de server."</string>
     <string name="invalid_password">"Het opgegeven wachtwoord is ongeldig."</string>
     <item>":-("</item>
     <item>";-)"</item>
     <item>":-P"</item>
-    <item>"Err:502"</item>
+    <item>"=-O"</item>
     <item>":-*"</item>
     <item>":O"</item>
     <item>"B-)"</item>
index 837d030..8cf3cd9 100644 (file)
@@ -30,7 +30,7 @@
     <string name="menu_view_contact_list">"Lista kontaktów"</string>
     <string name="menu_invite_contact">"Zaproś…"</string>
     <string name="menu_switch_chats">"Przełącz czaty"</string>
-    <string name="menu_insert_smiley">"Wstaw buźkę"</string>
+    <string name="menu_insert_smiley">"Wstaw emotikon"</string>
     <string name="menu_plus">"Menu+"</string>
     <string name="default_input_title">"Katalog wejściowy"</string>
     <string name="confirm">"Potwierdź"</string>
@@ -73,7 +73,7 @@
     <string name="blocked_list_title">"Zablokowane kontakty - <xliff:g id="USER">%1$s</xliff:g>"</string>
     <string name="no_blocked_contact">"Brak zablokowanych kontaktów."</string>
     <string name="contact_profile_title">"Profil kontaktu"</string>
-    <string name="label_status">"Status:"</string>
+    <string name="label_status">"Stan:"</string>
     <string name="label_client_type">"Typ klienta:"</string>
     <string name="client_type_computer">"Komputer"</string>
     <string name="client_type_mobile">"Przenośny"</string>
     <string name="setting_title">"Ustawienia ogólne"</string>
     <string name="hide_offline_contacts">"Ukryj kontakty offline"</string>
     <string name="notification_group_title">"Ustawienia powiadomień"</string>
-    <string name="notification_enabled_title">"Powiadamiaj o czacie"</string>
-    <string name="notification_enabled_summary">"Sygnalizuj nową wiadomość na czacie na pasku stanu"</string>
+    <string name="notification_enabled_title">"Powiadomienia wiadomości błyskawicznych"</string>
+    <string name="notification_enabled_summary">"Sygnalizuj nadejście wiadomości błyskawicznej na pasku stanu"</string>
     <string name="notification_vibrate_title">"Wibracje"</string>
-    <string name="notification_vibrate_summary">"Sygnalizuj wiadomość na czacie wibracją"</string>
+    <string name="notification_vibrate_summary">"Sygnalizuj nadejście wiadomości błyskawicznej wibracją"</string>
     <string name="notification_sound_title">"Dźwięk"</string>
-    <string name="notification_sound_summary">"Sygnalizuj wiadomość na czacie dzwonkiem"</string>
+    <string name="notification_sound_summary">"Sygnalizuj nadejście wiadomości błyskawicznej dzwonkiem"</string>
     <string name="notification_ringtone_title">"Wybierz dzwonek"</string>
     <string name="invitation_prompt">"<xliff:g id="USER">%1$s</xliff:g> przesyła zaproszenie do czatu grupowego."</string>
     <string name="invitation_sent_prompt">"Wysłano zaproszenie do użytkownika <xliff:g id="USER">%1$s</xliff:g>."</string>
     <string name="block_contact_success">"Zablokowano kontakt „<xliff:g id="USER">%1$s</xliff:g>”."</string>
     <string name="unblock_contact_success">"Odblokowano kontakt „<xliff:g id="USER">%1$s</xliff:g>”."</string>
     <string name="perm_label">"uruchom usługę wiadomości błyskawicznych"</string>
-    <string name="perm_desc">"Umożliwia aplikacjom uruchamianie czatu na żądanie."</string>
+    <string name="perm_desc">"Umożliwia aplikacjom uruchamianie usługi wiadomości błyskawicznych przez zamierzenie."</string>
     <string name="error">"Uwaga"</string>
     <string name="login_service_failed">"Nie można zalogować do usługi <xliff:g id="SERVICE">%1$s</xliff:g>. Spróbuj ponownie później."\n"(Szczegóły: <xliff:g id="DESCRIPTION">%2$s</xliff:g>)"</string>
     <string name="add_list_failed">"Nie dodano listy."</string>
index 5f0338d..8fde664 100644 (file)
@@ -35,9 +35,9 @@
     <string name="input_contact_label">"Nombre de pantalla de la persona que quieres añadir:"</string>
     <string name="invite_label">"Añadir amigo"</string>
   <string-array name="smiley_names">
-    <item>"Contento"</item>
+    <item>"Feliz"</item>
     <item>"Triste"</item>
-    <item>"Guiño"</item>
+    <item>"Guiñando"</item>
     <item>"Sacando la lengua"</item>
     <item>"Sorprendido"</item>
     <item>"Besando"</item>
index 7d6af6f..8d490e3 100644 (file)
@@ -40,8 +40,8 @@
     <item>"Clin d\'œil"</item>
     <item>"Tire la langue"</item>
     <item>"Surpris"</item>
-    <item>"Bisou"</item>
-    <item>"Hurle"</item>
+    <item>"Bisous"</item>
+    <item>"Crier"</item>
     <item>"Cool"</item>
     <item>"Argent"</item>
     <item>"Embarrassé"</item>
@@ -50,7 +50,7 @@
     <item>"Indécis"</item>
     <item>"Pleure"</item>
     <item>"Motus et bouche cousue"</item>
-    <item>"Rigole"</item>
+    <item>"Rire"</item>
     <item>"Confus"</item>
   </string-array>
   <string-array name="smiley_texts">
index 622b5ef..19dbc78 100644 (file)
@@ -19,7 +19,7 @@
     <string name="menu_remove_contact">"Elimina contatto"</string>
     <string name="menu_block_contact">"Blocca"</string>
     <string name="menu_contact_list">"Elenco contatti"</string>
-    <string name="menu_start_chat">"Invia msg chat"</string>
+    <string name="menu_start_chat">"Invia IM"</string>
     <string name="menu_view_profile">"Info amico"</string>
     <string name="menu_end_conversation">"Termina conversazione"</string>
     <string name="menu_switch_chats">"Cambia conversazione"</string>
   <string-array name="smiley_names">
     <item>"Felice"</item>
     <item>"Triste"</item>
-    <item>"Occhiolino"</item>
-    <item>"Linguaccia"</item>
+    <item>"Fare l\'occhiolino"</item>
+    <item>"Lingua fuori"</item>
     <item>"Sorpreso"</item>
-    <item>"Bacio"</item>
-    <item>"Urlo"</item>
-    <item>"Fico"</item>
-    <item>"Fatti, non parole"</item>
+    <item>"Baciare"</item>
+    <item>"Urlare"</item>
+    <item>"Favoloso"</item>
+    <item>"Bocca a forma di dollaro"</item>
     <item>"Gaffe"</item>
     <item>"Imbarazzato"</item>
     <item>"Angelo"</item>
     <item>"Indeciso"</item>
-    <item>"Piango"</item>
+    <item>"Piangere"</item>
     <item>"Labbra cucite"</item>
-    <item>"Risata"</item>
+    <item>"Sorridere"</item>
     <item>"Confuso"</item>
   </string-array>
   <string-array name="smiley_texts">
index 57056b6..6a92d62 100644 (file)
@@ -67,7 +67,7 @@
     <item>":-["</item>
     <item>"O:-)"</item>
     <item>":-\\\\"</item>
-    <item>":\'("</item>
+    <item>":\\\'("</item>
     <item>":-X"</item>
     <item>":-D"</item>
     <item>"o_O"</item>
index 38b96fe..f719753 100644 (file)
@@ -18,7 +18,7 @@
     <string name="menu_add_contact">"Contactpersoon toevoegen"</string>
     <string name="menu_remove_contact">"Contactpersoon verwijderen"</string>
     <string name="menu_block_contact">"Blokkeren"</string>
-    <string name="menu_contact_list">"Lijst met contacten"</string>
+    <string name="menu_contact_list">"Lijst met contactpersonen"</string>
     <string name="menu_start_chat">"Chat verzenden"</string>
     <string name="menu_view_profile">"Buddygegevens"</string>
     <string name="menu_end_conversation">"Conversatie beëindigen"</string>
@@ -26,7 +26,7 @@
     <string name="menu_insert_smiley">"Emoticons invoegen"</string>
     <string name="sign_up">"Een nieuw account verkrijgen"</string>
     <string name="check_save_password">"Als u uw telefoon verliest of als deze wordt gestolen, moet u voor uw veiligheid naar de website gaan op uw computer en uw wachtwoord wijzigen."</string>
-    <string name="buddy_list_title">"Lijst met contacten - <xliff:g id="USERNAME">%1$s</xliff:g>"</string>
+    <string name="buddy_list_title">"Lijst met contactpersonen - <xliff:g id="USERNAME">%1$s</xliff:g>"</string>
     <string name="label_username">"Gebruikersnaam:"</string>
     <string name="ongoing_conversation">"Conversaties (<xliff:g id="NUMBER">%1$d</xliff:g>)"</string>
     <string name="contact_profile_title">"Contactgegevens"</string>
@@ -58,7 +58,7 @@
     <item>":-("</item>
     <item>";-)"</item>
     <item>":-P"</item>
-    <item>"Err:502"</item>
+    <item>"=-O"</item>
     <item>":-*"</item>
     <item>":O"</item>
     <item>"B-)"</item>
index 4b57b8a..8a088d2 100644 (file)
     <string name="menu_remove_contact">"Usuń kontakt"</string>
     <string name="menu_block_contact">"Zablokuj"</string>
     <string name="menu_contact_list">"Lista kontaktów"</string>
-    <string name="menu_start_chat">"Wyślij wiadomość przez czat"</string>
+    <string name="menu_start_chat">"Wyślij wiadomość"</string>
     <string name="menu_view_profile">"Informacje o znajomym"</string>
     <string name="menu_end_conversation">"Zakończ rozmowę"</string>
     <string name="menu_switch_chats">"Przełącz czaty"</string>
-    <string name="menu_insert_smiley">"Wstaw buźkę"</string>
+    <string name="menu_insert_smiley">"Wstaw emotikony"</string>
     <string name="sign_up">"Utwórz nowe konto"</string>
     <string name="check_save_password">"Ze względów bezpieczeństwa w przypadku zgubienia lub kradzieży telefonu odwiedź witrynę internetową ze swojego komputera i zmień hasło."</string>
-    <string name="buddy_list_title">"Lista kontaktów â\80\93 <xliff:g id="USERNAME">%1$s</xliff:g>"</string>
+    <string name="buddy_list_title">"Lista kontaktów â\80\94 <xliff:g id="USERNAME">%1$s</xliff:g>"</string>
     <string name="label_username">"Nazwa użytkownika:"</string>
-    <string name="ongoing_conversation">"Rozmowy: <xliff:g id="NUMBER">%1$d</xliff:g>"</string>
+    <string name="ongoing_conversation">"Rozmowy <xliff:g id="NUMBER">%1$d</xliff:g>"</string>
     <string name="contact_profile_title">"Informacje kontaktowe"</string>
     <string name="presence_available">"Dostępny"</string>
     <string name="add_contact_title">"Dodaj kontakt"</string>
index f3d0d34..bc1da91 100644 (file)
@@ -348,27 +348,15 @@ public class ChatView extends LinearLayout {
                         case KeyEvent.KEYCODE_ENTER:
                             if (event.isAltPressed()) {
                                 mEdtInput.append("\n");
-                                return true;
+                            } else {
+                                handleEnterKey();
                             }
+                            return true;
                     }
                 }
                 return false;
             }
         });
-
-        mEdtInput.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (event != null) {
-                    if (event.isAltPressed()) {
-                        return false;
-                    }
-                }
-
-                sendMessage();
-                return true;
-            }
-        });
-
         // TODO: this is a hack to implement BUG #1611278, when dispatchKeyEvent() works with
         // the soft keyboard, we should remove this hack.
         mEdtInput.addTextChangedListener(new TextWatcher() {
@@ -423,6 +411,26 @@ public class ChatView extends LinearLayout {
         unregisterChatSessionListener();
     }
 
+    private void handleEnterKey() {
+        Configuration config = getResources().getConfiguration();
+        if (config.orientation == config.ORIENTATION_LANDSCAPE) {
+            // in the landscape mode, we'll send the message if the user is using a physical
+            // keyboard. However, on the soft keyboard, we'll close the keyboard and put the
+            // focus on the Send button, in order to prevent accidental sending the message.
+            if (config.hardKeyboardHidden == config.HARDKEYBOARDHIDDEN_NO) {
+                sendMessage();
+            } else {
+                closeSoftKeyboard();
+                mSendButton.requestFocus();
+            }
+        } else {
+            // in the portrait mode, the user would always be using the soft keyboard, so pressing
+            // the Enter key would close the keyboard and puts the focus on the Send button.
+            closeSoftKeyboard();
+            mSendButton.requestFocus();
+        }
+    }
+
     private void closeSoftKeyboard() {
         InputMethodManager inputMethodManager =
             (InputMethodManager)mApp.getSystemService(Context.INPUT_METHOD_SERVICE);
index 38ee6cf..c5d807d 100644 (file)
@@ -24,6 +24,7 @@ import android.content.Context;
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.net.Uri;
+import android.os.Handler;
 import android.provider.Im;
 import android.text.Spannable;
 import android.text.SpannableString;
@@ -33,6 +34,8 @@ import android.text.style.RelativeSizeSpan;
 import android.text.style.UnderlineSpan;
 import android.util.AttributeSet;
 import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.TranslateAnimation;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
@@ -78,8 +81,12 @@ public class ContactView extends LinearLayout {
     private TextView mLine2;
     private TextView mTimeStamp;
 
+    private Handler mHandler;
+    private boolean mLayoutDirty;
+
     public ContactView(Context context, AttributeSet attrs) {
         super(context, attrs);
+        mLayoutDirty = true;
     }
 
     @Override
@@ -91,6 +98,58 @@ public class ContactView extends LinearLayout {
         mLine2 = (TextView) findViewById(R.id.line2);
         mLine2.setCompoundDrawablePadding(5);
         mTimeStamp = (TextView)findViewById(R.id.timestamp);
+
+        mHandler = new Handler();
+    }
+
+    @Override
+    public void setSelected(boolean selected) {
+        super.setSelected(selected);
+        if(selected) {
+            // While layout, the width of children is unknown, we have to start
+            // animation when layout is done.
+            if (mLayoutDirty) {
+                mHandler.post(new Runnable() {
+                    public void run() {
+                        startAnimationNow();
+                    }
+                });
+            } else {
+                startAnimationNow();
+            }
+        } else {
+            mLine2.clearAnimation();
+        }
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int l, int t, int r, int b) {
+        mLayoutDirty = false;
+        super.onLayout(changed, l, t, r, b);
+    }
+
+    @Override
+    public void requestLayout() {
+        super.requestLayout();
+        mLayoutDirty = true;
+    }
+
+    /*package*/ void startAnimationNow() {
+        View parent = (View)mLine2.getParent();
+        int width = mLine2.getWidth();
+
+        int parentWidth = parent.getWidth() - parent.getPaddingLeft()
+                - parent.getPaddingRight();
+        if(width > parentWidth) {
+            int fromXDelta = parentWidth;
+            int toXDelta = - width;
+            int duration = (fromXDelta - toXDelta) * 32;
+            Animation animation = new TranslateAnimation(fromXDelta, toXDelta, 0, 0);
+            animation.setDuration(duration);
+            animation.setRepeatMode(Animation.RESTART);
+            animation.setRepeatCount(Animation.INFINITE);
+            mLine2.startAnimation(animation);
+        }
     }
 
     public void bind(Cursor cursor, String underLineText, boolean scrolling) {
@@ -204,7 +263,7 @@ public class ContactView extends LinearLayout {
 
         View contactInfoPanel = findViewById(R.id.contactInfo);
         if (hasChat && showChatMsg) {
-            contactInfoPanel.setBackgroundResource(R.drawable.bubble);
+            contactInfoPanel.setBackgroundResource(R.drawable.list_item_im_bubble);
             mLine1.setTextColor(r.getColor(R.color.chat_contact));
         } else {
             contactInfoPanel.setBackgroundDrawable(null);
index 51e686c..4ef7041 100644 (file)
@@ -50,16 +50,6 @@ public class FrontDoorPlugin extends Service {
     private final static String TAG = ImApp.LOG_TAG;
     private final static boolean LOCAL_DEBUG = false;
 
-    // database access constants for branding resource map cache table
-    private final static String[] BRANDING_RESOURCE_MAP_CACHE_PROJECTION = {
-        Im.BrandingResourceMapCache.PROVIDER_ID,
-        Im.BrandingResourceMapCache.APP_RES_ID,
-        Im.BrandingResourceMapCache.PLUGIN_RES_ID
-    };
-    private final static int BRANDING_RESOURCE_MAP_CACHE_PROVIDER_ID_COLUMN = 0;
-    private final static int BRANDING_RESOURCE_MAP_CACHE_APP_RES_ID_COLUMN = 1;
-    private final static int BRANDING_RESOURCE_MAP_CACHE_PLUGIN_RES_ID_COLUMN = 2;
-
     private ArrayList<String> mProviderNames;
     private HashMap<String, String> mPackageNames;
     private HashMap<String, String> mClassNames;
@@ -68,18 +58,12 @@ public class FrontDoorPlugin extends Service {
 
     @Override
     public IBinder onBind(Intent intent) {
-        // temporary provider ID<->Name mappings
-        HashMap<String, Long> providerNameToId = new HashMap<String, Long>();
-        HashMap<Long, String> providerIdToName = new HashMap<Long, String>();
-
-        loadThirdPartyPlugins(providerNameToId, providerIdToName);
-        loadBrandingResources(providerNameToId, providerIdToName);
-
+        loadThirdPartyPlugins();
+        loadBrandingResources();
         return mBinder;
     }
 
-    private void loadThirdPartyPlugins(HashMap<String, Long> providerNameToId,
-            HashMap<Long, String> providerIdToName) {
+    private void loadThirdPartyPlugins() {
         mProviderNames = new ArrayList<String>();
         mPackageNames = new HashMap<String, String>();
         mClassNames = new HashMap<String, String>();
@@ -116,9 +100,7 @@ public class FrontDoorPlugin extends Service {
             mClassNames.put(providerName, serviceInfo.name);
             mSrcPaths.put(providerName, serviceInfo.applicationInfo.sourceDir);
 
-            long providerId = updateProviderDb(providerName, providerFullName, signUpUrl);
-            providerNameToId.put(providerName, providerId);
-            providerIdToName.put(providerId, providerName);
+            updateProviderDb(providerName, providerFullName, signUpUrl);
         }
     }
 
@@ -169,102 +151,9 @@ public class FrontDoorPlugin extends Service {
         return providerId;
     }
 
-    private void loadBrandingResources(HashMap<String, Long> providerNameToId,
-            HashMap<Long, String> providerIdToName) {
+    private void loadBrandingResources() {
         mBrandingResources = new HashMap<String, Map<Integer, Integer>>();
 
-        if (loadBrandingResourcesFromCache(providerIdToName) <= 0) {
-            Log.w(TAG, "Can't load from cache. Load from plugins...");
-            loadBrandingResourcesFromPlugins();
-            saveBrandingResourcesToCache(providerNameToId);
-        }
-    }
-
-    /**
-     * Try loading the branding resources from the database.
-     * @param providerIdToName a map between provider ID and name.
-     * @return 0 if the resources are not cached yet; otherwise the total count of res id
-     * pairs.
-     */
-    private int loadBrandingResourcesFromCache(HashMap<Long, String> providerIdToName) {
-        ContentResolver cr = getContentResolver();
-        Cursor c = cr.query(
-                Im.BrandingResourceMapCache.CONTENT_URI, /* URI */
-                BRANDING_RESOURCE_MAP_CACHE_PROJECTION,  /* projection */
-                null,                                    /* where */
-                null,                                    /* where args */
-                null                                     /* sort */);
-
-        int count = 0;
-        if (c != null) {
-            try {
-                while (c.moveToNext()) {
-                    long providerId = c.getLong(BRANDING_RESOURCE_MAP_CACHE_PROVIDER_ID_COLUMN);
-                    String provider = providerIdToName.get(providerId);
-                    if (TextUtils.isEmpty(provider)) {
-                        Log.e(TAG, "Empty provider name in branding resource map cache table.");
-                        continue;
-                    }
-                    int appResId = c.getInt(BRANDING_RESOURCE_MAP_CACHE_APP_RES_ID_COLUMN);
-                    int pluginResId = c.getInt(BRANDING_RESOURCE_MAP_CACHE_PLUGIN_RES_ID_COLUMN);
-
-                    Map<Integer, Integer> resMap = mBrandingResources.get(provider);
-                    if (resMap == null) {
-                        resMap = new HashMap<Integer, Integer>();
-                        mBrandingResources.put(provider, resMap);
-                    }
-
-                    resMap.put(appResId, pluginResId);
-
-                    count++;
-                }
-            } finally {
-                c.close();
-            }
-        } else {
-            Log.e(TAG, "Query of branding resource map cache table returns empty cursor"); 
-        }
-
-        return count;
-    }
-
-    /**
-     * Cache the loaded branding resources in IM database table, so that we can use it
-     * directly and save loading time.
-     * @param providerNameToId a map between provider name and ID.
-     */
-    private void saveBrandingResourcesToCache(HashMap<String, Long> providerNameToId) {
-        ContentResolver cr = getContentResolver();
-
-        ArrayList<ContentValues> valuesList = new ArrayList<ContentValues>();
-        for (String provider : mBrandingResources.keySet()) {
-            long providerId = providerNameToId.get(provider);
-
-            Map<Integer, Integer> resMap = mBrandingResources.get(provider);
-            for (int appResId : resMap.keySet()) {
-                int pluginResId = resMap.get(appResId);
-
-                ContentValues values = new ContentValues();
-                values.put(Im.BrandingResourceMapCache.PROVIDER_ID, providerId);
-                values.put(Im.BrandingResourceMapCache.APP_RES_ID, appResId);
-                values.put(Im.BrandingResourceMapCache.PLUGIN_RES_ID, pluginResId);
-
-                valuesList.add(values);
-            }
-        }
-
-        int size = valuesList.size();
-        if (size > 0) {
-            cr.bulkInsert(
-                    Im.BrandingResourceMapCache.CONTENT_URI,
-                    valuesList.toArray(new ContentValues[size]));
-        }
-    }
-
-    /**
-     * Load the branding resources from all plugin packages.
-     */
-    private void loadBrandingResourcesFromPlugins() {
         for (String provider : mProviderNames) {
             if (!mBrandingResources.containsKey(provider)) {
                 if (LOCAL_DEBUG) log("loadBrandingResources: load resource map for " + provider);
@@ -277,9 +166,6 @@ public class FrontDoorPlugin extends Service {
         }
     }
 
-    /**
-     * Load branding resources from one plugin package.
-     */
     private Map<Integer, Integer> loadBrandingResource(String className, String srcPath) {
         Map retVal = null;
 
diff --git a/src/com/android/im/app/Ticker.java b/src/com/android/im/app/Ticker.java
new file mode 100644 (file)
index 0000000..53d1ae1
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2007-2008 Esmertec AG.
+ * Copyright (C) 2007-2008 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.
+ */
+
+package com.android.im.app;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.FrameLayout;
+
+public class Ticker extends FrameLayout {
+
+    public Ticker(Context context) {
+        super(context);
+    }
+
+    public Ticker(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public Ticker(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+    
+    @Override
+    protected void measureChild(View child, int parentWidthMeasureSpec, 
+            int parentHeightMeasureSpec) {
+        LayoutParams lp = (LayoutParams) child.getLayoutParams();
+
+        int childWidthMeasureSpec;
+        int childHeightMeasureSpec;
+
+        // Let the child be as wide as it wants, regardless of our bounds
+        childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+        childHeightMeasureSpec = getChildMeasureSpec(parentHeightMeasureSpec, mPaddingLeft
+                + mPaddingRight, lp.width);
+
+        child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
+    }
+}
index 1250600..d07a00d 100644 (file)
@@ -20,7 +20,6 @@ import com.android.im.IImConnection;
 import com.android.im.R;
 import com.android.im.engine.ImErrorInfo;
 import com.android.im.engine.Presence;
-import com.android.im.plugin.ImpsConfigNames;
 import com.google.android.collect.Lists;
 
 import android.app.Activity;
@@ -38,7 +37,6 @@ import android.view.ViewGroup;
 import android.widget.EditText;
 import android.widget.ImageButton;
 import android.widget.LinearLayout;
-import android.widget.TextView;
 
 import java.util.List;
 
@@ -47,7 +45,7 @@ public class UserPresenceView extends LinearLayout {
     private ImageButton mStatusDialogButton;
 
     // views of the popup window
-    TextView mStatusBar;
+    EditText mStatusEditor;
 
     private final SimpleAlertHandler mHandler;
 
@@ -55,7 +53,7 @@ public class UserPresenceView extends LinearLayout {
     private long mProviderId;
     Presence mPresence;
 
-    private String mLastStatusText;
+    private String mLastStatusEditText;
     final List<StatusItem> mStatusItems = Lists.newArrayList();
 
     public UserPresenceView(Context context, AttributeSet attrs) {
@@ -68,11 +66,35 @@ public class UserPresenceView extends LinearLayout {
         super.onFinishInflate();
 
         mStatusDialogButton = (ImageButton)findViewById(R.id.statusDropDownButton);
+        mStatusEditor = (EditText)findViewById(R.id.statusEdit);
+
         mStatusDialogButton.setOnClickListener(new OnClickListener() {
             public void onClick(View v) {
                 showStatusListDialog();
             }
         });
+
+        mStatusEditor.setOnKeyListener(new OnKeyListener() {
+            public boolean onKey(View v, int keyCode, KeyEvent event) {
+                if (KeyEvent.ACTION_DOWN == event.getAction()) {
+                    switch (keyCode) {
+                        case KeyEvent.KEYCODE_DPAD_CENTER:
+                        case KeyEvent.KEYCODE_ENTER:
+                            updateStatusText();
+                            return true;
+                    }
+                }
+                return false;
+            }
+        });
+
+        mStatusEditor.setOnFocusChangeListener(new View.OnFocusChangeListener(){
+            public void onFocusChange(View v, boolean hasFocus) {
+                if (!hasFocus) {
+                    updateStatusText();
+                }
+            }
+        });
     }
 
     private void showStatusListDialog() {
@@ -117,11 +139,11 @@ public class UserPresenceView extends LinearLayout {
     }
 
     void updateStatusText() {
-        String newStatusText = mStatusBar.getText().toString();
+        String newStatusText = mStatusEditor.getText().toString();
         if (TextUtils.isEmpty(newStatusText)) {
             newStatusText = "";
         }
-        if (!newStatusText.equals(mLastStatusText)) {
+        if (!newStatusText.equals(mLastStatusEditText)) {
             updatePresence(-1, newStatusText);
         }
     }
@@ -151,12 +173,8 @@ public class UserPresenceView extends LinearLayout {
         if (TextUtils.isEmpty(statusText)) {
             statusText = brandingRes.getString(PresenceUtils.getStatusStringRes(status));
         }
-        mLastStatusText = statusText;
-
-        if (mStatusBar == null) {
-            mStatusBar = initStatusBar(mProviderId);
-        }
-        mStatusBar.setText(statusText);
+        mStatusEditor.setText(statusText);
+        mLastStatusEditText = statusText;
 
         // Disable the user to edit the custom status text because
         // the AIM and MSN server don't support it now.
@@ -164,45 +182,7 @@ public class UserPresenceView extends LinearLayout {
         String providerName = provider == null ? null : provider.mName;
         if (Im.ProviderNames.AIM.equals(providerName)
                 || Im.ProviderNames.MSN.equals(providerName)) {
-            mStatusBar.setFocusable(false);
-        }
-    }
-
-    private TextView initStatusBar(long providerId) {
-        String value = Im.ProviderSettings.getStringValue(
-                            mContext.getContentResolver(), providerId,
-                            ImpsConfigNames.SUPPORT_USER_DEFINED_PRESENCE);
-
-        if ("true".equalsIgnoreCase(value)) {
-            EditText statusEdit = (EditText) findViewById(R.id.statusEdit);
-            statusEdit.setVisibility(View.VISIBLE);
-            statusEdit.setOnKeyListener(new OnKeyListener() {
-                public boolean onKey(View v, int keyCode, KeyEvent event) {
-                    if (KeyEvent.ACTION_DOWN == event.getAction()) {
-                        switch (keyCode) {
-                            case KeyEvent.KEYCODE_DPAD_CENTER:
-                            case KeyEvent.KEYCODE_ENTER:
-                                updateStatusText();
-                                return true;
-                        }
-                    }
-                    return false;
-                }
-            });
-
-            statusEdit.setOnFocusChangeListener(new View.OnFocusChangeListener(){
-                public void onFocusChange(View v, boolean hasFocus) {
-                    if (!hasFocus) {
-                        updateStatusText();
-                    }
-                }
-            });
-
-            return statusEdit;
-        } else {
-            TextView statusView = (TextView) findViewById(R.id.statusView);
-            statusView.setVisibility(View.VISIBLE);
-            return statusView;
+            mStatusEditor.setFocusable(false);
         }
     }