Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-IM: Commit

packages/apps/IM


Commit MetaInfo

Revisionb15e8849f978b19856ead6d57e99006f6c52b490 (tree)
Time2009-08-24 15:39:37
AuthorScott Su <scott.su@myri...>
CommiterWei Huang

Log Message

Fix bug that Google Talk is shown on IM's landing page
Copy consts defined in framework/base/im to IM app

Change Summary

Incremental Difference

--- a/plugin/com/android/im/plugin/BrandingResourceIDs.java
+++ b/plugin/com/android/im/plugin/BrandingResourceIDs.java
@@ -20,7 +20,37 @@ package com.android.im.plugin;
2020 * Defines the IDs of branding resources.
2121 *
2222 */
23-public interface BrandingResourceIDs extends android.im.BrandingResourceIDs {
23+public interface BrandingResourceIDs {
24+
25+ /**
26+ * The logo icon of the provider which is displayed in the landing page.
27+ */
28+ public static final int DRAWABLE_LOGO = 100;
29+ /**
30+ * The icon of online presence status.
31+ */
32+ public static final int DRAWABLE_PRESENCE_ONLINE = 102;
33+ /**
34+ * The icon of busy presence status.
35+ */
36+ public static final int DRAWABLE_PRESENCE_BUSY = 103;
37+ /**
38+ * The icon of away presence status.
39+ */
40+ public static final int DRAWABLE_PRESENCE_AWAY = 104;
41+ /**
42+ * The icon of invisible presence status.
43+ */
44+ public static final int DRAWABLE_PRESENCE_INVISIBLE = 105;
45+ /**
46+ * The icon of offline presence status.
47+ */
48+ public static final int DRAWABLE_PRESENCE_OFFLINE = 106;
49+ /**
50+ * The label of the menu to go to the contact list screen.
51+ */
52+ public static final int STRING_MENU_CONTACT_LIST = 107;
53+
2454 /**
2555 * The image displayed on the splash screen while logging in.
2656 */
--- a/src/com/android/im/app/ImApp.java
+++ b/src/com/android/im/app/ImApp.java
@@ -17,6 +17,12 @@
1717
1818 package com.android.im.app;
1919
20+import java.util.ArrayList;
21+import java.util.HashMap;
22+import java.util.Iterator;
23+import java.util.List;
24+import java.util.Map;
25+
2026 import android.app.Activity;
2127 import android.app.Application;
2228 import android.content.ComponentName;
@@ -27,21 +33,17 @@ import android.content.Context;
2733 import android.content.Intent;
2834 import android.content.ServiceConnection;
2935 import android.content.pm.PackageManager;
30-import android.content.pm.ResolveInfo;
31-import android.content.pm.ServiceInfo;
3236 import android.content.pm.PackageManager.NameNotFoundException;
3337 import android.content.res.Resources;
3438 import android.database.Cursor;
3539 import android.net.ConnectivityManager;
3640 import android.net.Uri;
3741 import android.os.Broadcaster;
38-import android.os.Bundle;
3942 import android.os.Handler;
4043 import android.os.IBinder;
4144 import android.os.Message;
4245 import android.os.RemoteException;
4346 import android.provider.Im;
44-import android.text.TextUtils;
4547 import android.util.Log;
4648
4749 import com.android.im.IConnectionCreationListener;
@@ -53,16 +55,9 @@ import com.android.im.engine.ImConnection;
5355 import com.android.im.engine.ImErrorInfo;
5456 import com.android.im.plugin.BrandingResourceIDs;
5557 import com.android.im.plugin.ImPlugin;
56-import com.android.im.plugin.ImPluginConstants;
5758 import com.android.im.plugin.ImPluginInfo;
5859 import com.android.im.service.ImServiceConstants;
5960
60-import java.util.ArrayList;
61-import java.util.HashMap;
62-import java.util.Iterator;
63-import java.util.List;
64-import java.util.Map;
65-
6661 public class ImApp extends Application {
6762 public static final String LOG_TAG = "ImApp";
6863
--- a/src/com/android/im/app/ImPluginHelper.java
+++ b/src/com/android/im/app/ImPluginHelper.java
@@ -251,7 +251,6 @@ public class ImPluginHelper {
251251 return providerId;
252252 }
253253
254- @SuppressWarnings("unchecked")
255254 private Map<String, String> loadConfiguration(ImPlugin plugin,
256255 ImPluginInfo info) {
257256 Map<String, String> config = null;
--- a/src/com/android/im/app/LandingPage.java
+++ b/src/com/android/im/app/LandingPage.java
@@ -102,8 +102,8 @@ public class LandingPage extends ListActivity implements View.OnCreateContextMen
102102
103103 mProviderCursor = managedQuery(Im.Provider.CONTENT_URI_WITH_ACCOUNT,
104104 PROVIDER_PROJECTION,
105- null /* selection */,
106- null /* selection args */,
105+ Im.Provider.CATEGORY + "=?" /* selection */,
106+ new String[]{ ImApp.IMPS_CATEGORY } /* selection args */,
107107 Im.Provider.DEFAULT_SORT_ORDER);
108108 mAdapter = new ProviderAdapter(this, mProviderCursor);
109109 setListAdapter(mAdapter);
--- a/src/com/android/im/app/ProviderListItem.java
+++ b/src/com/android/im/app/ProviderListItem.java
@@ -18,6 +18,7 @@
1818 package com.android.im.app;
1919
2020 import com.android.im.R;
21+import com.android.im.plugin.BrandingResourceIDs;
2122
2223 import android.graphics.drawable.Drawable;
2324 import android.widget.LinearLayout;
@@ -27,7 +28,6 @@ import android.content.Context;
2728 import android.content.ContentResolver;
2829 import android.content.res.Resources;
2930 import android.database.Cursor;
30-import android.im.BrandingResourceIDs;
3131 import android.content.res.ColorStateList;
3232 import android.view.View;
3333 import android.provider.Im;
Show on old repository browser