diff options
| author | Mathew Inwood <mathewi@google.com> | 2014-03-21 18:25:36 +0000 |
|---|---|---|
| committer | Mathew Inwood <mathewi@google.com> | 2014-03-21 18:37:53 +0000 |
| commit | d15990aa501b683c143700e246b390c8bb79b210 (patch) | |
| tree | 9805dc041109c2e1ec4d75b6b323dea286c196c7 | |
| parent | ac6e97a5a69738a1d32794fc76ca639201639501 (diff) | |
| download | frameworks_base-d15990aa501b683c143700e246b390c8bb79b210.zip frameworks_base-d15990aa501b683c143700e246b390c8bb79b210.tar.gz frameworks_base-d15990aa501b683c143700e246b390c8bb79b210.tar.bz2 | |
Fix log spam from View.toString().
If a view has a non-zero ID that is not defined in resources (i.e. has been
set pragmatically), the calls to Resources.getResourcePackageName() and
Resources.getResourceEntryName() result in a log warning:
No package identifier when getting name for resource number 0x00000001
Fix this by not attempting to resolve the package & name when there is
none.
Change-Id: Id88a61539fffb36187da7911f8e8a42d5a1bb951
| -rw-r--r-- | core/java/android/view/View.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index a8ccd49..c5835da 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -4210,7 +4210,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, out.append(" #"); out.append(Integer.toHexString(id)); final Resources r = mResources; - if (id != 0 && r != null) { + if (Resources.resourceHasPackage(id) && r != null) { try { String pkgname; switch (id&0xff000000) { |
