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

Commit 7c744bdb authored by Jon Miranda's avatar Jon Miranda
Browse files

Tries to resolve reference resource names instead of its data.

Example: @16974751 can be resolved to android:style/TextApperance.Material.

Bug: 17446752
Change-Id: I3ffede3ecc8689badd646a27d50a7a73ce45cf86
parent 042ad633
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -875,6 +875,11 @@ public class ViewDebug {
                data[i + 1] = theme.resolveAttribute(attributeId, outValue, true) ?
                        outValue.coerceToString().toString() :  nullString;
                i += 2;

                // attempt to replace reference data with its name
                if (outValue.type == TypedValue.TYPE_REFERENCE) {
                    data[i - 1] = resources.getResourceName(outValue.resourceId);
                }
            } catch (Resources.NotFoundException e) {
                // ignore resources we can't resolve
            }