summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-02 01:32:34 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-06-02 01:32:34 -0700
commit8eff8420667aefc282ac07ffff5f52378066b106 (patch)
treec8c8d4678ae412065f07a1f45a280aa7760521f9
parent385a4894d0bd4f98e3991c3850afc5bae47e10ea (diff)
parentb3c3778edbc26affed9dc694f80412a85fe58d7b (diff)
downloadframeworks_base-8eff8420667aefc282ac07ffff5f52378066b106.zip
frameworks_base-8eff8420667aefc282ac07ffff5f52378066b106.tar.gz
frameworks_base-8eff8420667aefc282ac07ffff5f52378066b106.tar.bz2
am b3c3778e: Merge change 2844 into donut
Merge commit 'b3c3778edbc26affed9dc694f80412a85fe58d7b' * commit 'b3c3778edbc26affed9dc694f80412a85fe58d7b': Added some icon debug logging to SuggestionsAdapter.
-rw-r--r--core/java/android/app/SuggestionsAdapter.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/app/SuggestionsAdapter.java b/core/java/android/app/SuggestionsAdapter.java
index 4406f8e..33c4769 100644
--- a/core/java/android/app/SuggestionsAdapter.java
+++ b/core/java/android/app/SuggestionsAdapter.java
@@ -361,12 +361,16 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
// First, check the cache.
Drawable drawable = mOutsideDrawablesCache.get(drawableId);
- if (drawable != null) return drawable;
+ if (drawable != null) {
+ if (DBG) Log.d(LOG_TAG, "Found icon in cache: " + drawableId);
+ return drawable;
+ }
try {
// Not cached, try using it as a plain resource ID in the provider's context.
int resourceId = Integer.parseInt(drawableId);
drawable = mProviderContext.getResources().getDrawable(resourceId);
+ if (DBG) Log.d(LOG_TAG, "Found icon by resource ID: " + drawableId);
} catch (NumberFormatException nfe) {
// The id was not an integer resource id.
// Let the ContentResolver handle content, android.resource and file URIs.
@@ -375,7 +379,9 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
drawable = Drawable.createFromStream(
mProviderContext.getContentResolver().openInputStream(uri),
null);
+ if (DBG) Log.d(LOG_TAG, "Opened icon input stream: " + drawableId);
} catch (FileNotFoundException fnfe) {
+ if (DBG) Log.d(LOG_TAG, "Icon stream not found: " + drawableId);
// drawable = null;
}
@@ -385,7 +391,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
mOutsideDrawablesCache.put(drawableId, drawable);
}
} catch (NotFoundException nfe) {
- // Resource could not be found
+ if (DBG) Log.d(LOG_TAG, "Icon resource not found: " + drawableId);
// drawable = null;
}