[DocsUI M3] Fix "failed to resolve attribute" crash on SDK 30
On SDK 30 and also some other devices, DocsUI crashes when it's open because it can't resolve "@color/primary" resource, whose value points to a material color attribute. To fix it, this CL stops using the color attribute as the value: * It uses a static color for SDK 30 (this static color is from the same color attribute when dynamic color is OFF). * It uses the mapped system tokens from the color attribute for SDK 31+. Check the attached bug for the demo. Bug: 398973028 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: I139d623f3c36f63abef9e7421c38691dfc50265f
Loading
Please register or sign in to comment