Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d15990aa authored by Mathew Inwood's avatar Mathew Inwood
Browse files

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
parent ac6e97a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {