summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 14:04:38 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 14:04:38 -0800
commit8811082a7522341e7a3f1467f581a2a7e03812a1 (patch)
tree4e836499bcc4aca553d20ee0d71aad5aaed901aa
parent117b33c8a0bbf5d193efee437e14637d397133ec (diff)
downloadImProvider-8811082a7522341e7a3f1467f581a2a7e03812a1.tar.gz
auto import from //depot/cupcake/@132589
-rw-r--r--res/color/landing_page_text.xml3
-rw-r--r--res/color/landing_page_text_secondary.xml22
-rw-r--r--res/layout/account_view.xml2
-rw-r--r--res/values-fr/strings.xml4
-rw-r--r--res/values-it/strings.xml2
-rw-r--r--res/values-nb/strings.xml47
-rw-r--r--src/com/android/providers/im/ImProvider.java47
-rw-r--r--src/com/android/providers/im/ProviderListItem.java17
8 files changed, 6 insertions, 138 deletions
diff --git a/res/color/landing_page_text.xml b/res/color/landing_page_text.xml
index 6e967d9..3737def 100644
--- a/res/color/landing_page_text.xml
+++ b/res/color/landing_page_text.xml
@@ -17,6 +17,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:color="#ff000000"/>
<item android:state_selected="true" android:color="#ff000000"/>
- <item android:state_pressed="true" android:color="#ff000000"/>
- <item android:color="#ffffffff"/>
+ <item android:color="#ff808080"/>
</selector>
diff --git a/res/color/landing_page_text_secondary.xml b/res/color/landing_page_text_secondary.xml
deleted file mode 100644
index 78cc390..0000000
--- a/res/color/landing_page_text_secondary.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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_focused="true" android:color="#ff000000"/>
- <item android:state_selected="true" android:color="#ff000000"/>
- <item android:state_pressed="true" android:color="#ff000000"/>
- <item android:color="#ffbebebe"/>
-</selector>
diff --git a/res/layout/account_view.xml b/res/layout/account_view.xml
index 46bdecf..9ec8c77 100644
--- a/res/layout/account_view.xml
+++ b/res/layout/account_view.xml
@@ -62,7 +62,7 @@
android:layout_height="wrap_content" />
<TextView android:id="@+id/conversations"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/landing_page_text_secondary"
+ android:textColor="@color/landing_page_text"
android:maxLines="1"
android:layout_weight="1"
android:paddingRight="3dip"
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 3da7c82..c3f2712 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -15,11 +15,11 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="ro_perm_label">"Lecture des messages instantanés"</string>
+ <string name="ro_perm_label">"lire les messages instantanés"</string>
<string name="ro_perm_desc">"Permet aux applications de lire les données du prestataire de contenu de messagerie instantanée."</string>
<string name="wo_perm_label">"écrire des messages instantanées"</string>
<string name="wo_perm_desc">"Permet aux applications d\'écrire les données pour le prestataire de contenu de messagerie instantanée."</string>
- <string name="im_label">"Chat"</string>
+ <string name="im_label">"Messagerie instantanée"</string>
<string name="landing_page_title">"Chat : sélectionner un compte"</string>
<string name="menu_add_account">"Ajouter un compte"</string>
<string name="menu_edit_account">"Modifier un compte"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 70065fb..336af3a 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -19,7 +19,7 @@
<string name="ro_perm_desc">"Consente alle applicazioni di leggere dati del provider di contenuti IM."</string>
<string name="wo_perm_label">"scrivere messaggi immediati"</string>
<string name="wo_perm_desc">"Consente alle applicazioni di scrivere dati per il provider di contenuti IM."</string>
- <string name="im_label">"Chat"</string>
+ <string name="im_label">"IM"</string>
<string name="landing_page_title">"Chat - Seleziona un account"</string>
<string name="menu_add_account">"Aggiungi account"</string>
<string name="menu_edit_account">"Modifica account"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
deleted file mode 100644
index 1f22b81..0000000
--- a/res/values-nb/strings.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- no translation found for ro_perm_label (8923213594676670163) -->
- <skip />
- <!-- no translation found for ro_perm_desc (6154703403388711809) -->
- <skip />
- <!-- no translation found for wo_perm_label (4771652386754813294) -->
- <skip />
- <!-- no translation found for wo_perm_desc (470416777693330370) -->
- <skip />
- <string name="im_label">"Nettprat"</string>
- <!-- no translation found for landing_page_title (2177721703095999384) -->
- <skip />
- <!-- no translation found for menu_add_account (4184762314855405486) -->
- <skip />
- <!-- no translation found for menu_edit_account (6585077522972888350) -->
- <skip />
- <!-- no translation found for menu_remove_account (8013513817623405880) -->
- <skip />
- <string name="sign_in">"Logg inn"</string>
- <string name="menu_sign_out">"Logg ut"</string>
- <string name="menu_settings">"Innstillinger"</string>
- <!-- no translation found for menu_sign_out_all (945106187701517280) -->
- <skip />
- <!-- no translation found for choose_account_title (3179220583433723296) -->
- <skip />
- <!-- no translation found for conversations (6809253595345281731) -->
- <skip />
- <string name="add_account">"Legg til <xliff:g id="ACCOUNT">%1$s</xliff:g>-konto"</string>
- <string name="menu_view_contact_list">"Kontaktliste"</string>
- <string name="signing_in_wait">"Logger inn…"</string>
-</resources>
diff --git a/src/com/android/providers/im/ImProvider.java b/src/com/android/providers/im/ImProvider.java
index 9a23cc8..f77a2e2 100644
--- a/src/com/android/providers/im/ImProvider.java
+++ b/src/com/android/providers/im/ImProvider.java
@@ -71,10 +71,9 @@ public class ImProvider extends ContentProvider {
private static final String TABLE_OUTGOING_RMQ_MESSAGES = "outgoingRmqMessages";
private static final String TABLE_LAST_RMQ_ID = "lastrmqid";
private static final String TABLE_ACCOUNT_STATUS = "accountStatus";
- private static final String TABLE_BRANDING_RESOURCE_MAP_CACHE = "brandingResMapCache";
private static final String DATABASE_NAME = "im.db";
- private static final int DATABASE_VERSION = 47;
+ private static final int DATABASE_VERSION = 46;
protected static final int MATCH_PROVIDERS = 1;
protected static final int MATCH_PROVIDERS_BY_ID = 2;
@@ -133,7 +132,6 @@ public class ImProvider extends ContentProvider {
protected static final int MATCH_LAST_RMQ_ID = 113;
protected static final int MATCH_ACCOUNTS_STATUS = 114;
protected static final int MATCH_ACCOUNT_STATUS = 115;
- protected static final int MATCH_BRANDING_RESOURCE_MAP_CACHE = 120;
protected final UriMatcher mUrlMatcher = new UriMatcher(UriMatcher.NO_MATCH);
@@ -258,13 +256,6 @@ public class ImProvider extends ContentProvider {
"rmq_id INTEGER" +
");");
- db.execSQL("create TABLE " + TABLE_BRANDING_RESOURCE_MAP_CACHE + " (" +
- "_id INTEGER PRIMARY KEY," +
- "provider_id INTEGER," +
- "app_res_id INTEGER," +
- "plugin_res_id INTEGER" +
- ");");
-
// clean up account specific data when an account is deleted.
db.execSQL("CREATE TRIGGER account_cleanup " +
"DELETE ON " + TABLE_ACCOUNTS +
@@ -330,28 +321,6 @@ public class ImProvider extends ContentProvider {
db.endTransaction();
}
- case 46:
- if (newVersion <= 46) {
- return;
- }
-
- db.beginTransaction();
- try {
- // add branding resource map cache table
- db.execSQL("create TABLE " + TABLE_BRANDING_RESOURCE_MAP_CACHE + " (" +
- "_id INTEGER PRIMARY KEY," +
- "provider_id INTEGER," +
- "app_res_id INTEGER," +
- "plugin_res_id INTEGER" +
- ");");
- db.setTransactionSuccessful();
- } catch (Throwable ex) {
- Log.e(LOG_TAG, ex.getMessage(), ex);
- break; // force to destroy all old data;
- } finally {
- db.endTransaction();
- }
-
return;
}
@@ -370,7 +339,6 @@ public class ImProvider extends ContentProvider {
db.execSQL("DROP TABLE IF EXISTS " + TABLE_PROVIDER_SETTINGS);
db.execSQL("DROP TABLE IF EXISTS " + TABLE_OUTGOING_RMQ_MESSAGES);
db.execSQL("DROP TABLE IF EXISTS " + TABLE_LAST_RMQ_ID);
- db.execSQL("DROP TABLE IF EXISTS " + TABLE_BRANDING_RESOURCE_MAP_CACHE);
}
private void createContactsTables(SQLiteDatabase db) {
@@ -771,8 +739,6 @@ public class ImProvider extends ContentProvider {
mUrlMatcher.addURI(authority, "accountStatus", MATCH_ACCOUNTS_STATUS);
mUrlMatcher.addURI(authority, "accountStatus/#", MATCH_ACCOUNT_STATUS);
-
- mUrlMatcher.addURI(authority, "brandingResMapCache", MATCH_BRANDING_RESOURCE_MAP_CACHE);
}
@Override
@@ -1120,10 +1086,6 @@ public class ImProvider extends ContentProvider {
url.getPathSegments().get(1));
break;
- case MATCH_BRANDING_RESOURCE_MAP_CACHE:
- qb.setTables(TABLE_BRANDING_RESOURCE_MAP_CACHE);
- break;
-
default:
throw new IllegalArgumentException("Unknown URL " + url);
}
@@ -1964,13 +1926,6 @@ public class ImProvider extends ContentProvider {
notifyProviderAccountContentUri = true;
break;
- case MATCH_BRANDING_RESOURCE_MAP_CACHE:
- rowID = db.insert(TABLE_BRANDING_RESOURCE_MAP_CACHE, null, initialValues);
- if (rowID > 0) {
- resultUri = Uri.parse(Im.BrandingResourceMapCache.CONTENT_URI + "/" + rowID);
- }
- break;
-
default:
throw new UnsupportedOperationException("Cannot insert into URL: " + url);
}
diff --git a/src/com/android/providers/im/ProviderListItem.java b/src/com/android/providers/im/ProviderListItem.java
index f2f0da8..69c0d0d 100644
--- a/src/com/android/providers/im/ProviderListItem.java
+++ b/src/com/android/providers/im/ProviderListItem.java
@@ -26,7 +26,6 @@ import android.content.res.Resources;
import android.database.Cursor;
import android.im.BrandingResourceIDs;
import android.provider.Im;
-import android.content.res.ColorStateList;
import android.view.View;
import android.util.Log;
import com.android.providers.im.R;
@@ -50,10 +49,6 @@ public class ProviderListItem extends LinearLayout {
private int mActiveAccountUserNameColumn;
private int mAccountPresenceStatusColumn;
private int mAccountConnectionStatusColumn;
-
- private ColorStateList mProviderNameColors;
- private ColorStateList mLoginNameColors;
- private ColorStateList mChatViewColors;
public ProviderListItem(Context context, LandingPage activity) {
super(context);
@@ -80,10 +75,6 @@ public class ProviderListItem extends LinearLayout {
Im.Provider.ACCOUNT_PRESENCE_STATUS);
mAccountConnectionStatusColumn = c.getColumnIndexOrThrow(
Im.Provider.ACCOUNT_CONNECTION_STATUS);
-
- mProviderNameColors = mProviderName.getTextColors();
- mLoginNameColors = mLoginName.getTextColors();
- mChatViewColors = mChatView.getTextColors();
}
public void bindView(Cursor cursor) {
@@ -104,10 +95,6 @@ public class ProviderListItem extends LinearLayout {
mUnderBubble.setBackgroundDrawable(mDefaultBackground);
statusIcon.setVisibility(View.GONE);
- providerName.setTextColor(mProviderNameColors);
- loginName.setTextColor(mLoginNameColors);
- chatView.setTextColor(mChatViewColors);
-
if (!cursor.isNull(mActiveAccountIdColumn)) {
mLoginName.setVisibility(View.VISIBLE);
providerName.setVisibility(View.VISIBLE);
@@ -137,10 +124,6 @@ public class ProviderListItem extends LinearLayout {
mUnderBubble.setBackgroundDrawable(mBubbleDrawable);
chatView.setVisibility(View.VISIBLE);
chatView.setText(r.getString(R.string.conversations, count));
-
- providerName.setTextColor(0xff000000);
- loginName.setTextColor(0xff000000);
- chatView.setTextColor(0xff000000);
}
secondRowText = cursor.getString(mActiveAccountUserNameColumn);