How to verify additional CarUxRestrictions?

33 views Asked by At

I have app which is distraction optimized, so it can run while driving whereas other apps can't even start, so in general CarUxRestrictions are in place. I also printed carUxRestrictions.activeRestrictions and it gives me 255, so since those are flags it means that e.g. UX_RESTRICTIONS_LIMIT_STRING_LENGTH should apply. Furthermore I've printed carUxRestrictions.maxRestrictedStringLength which gives me 120, so my expectation was that I should not be able to display string longer than 120 in my activity. However, I can do that without any issue or even log warning with this ugly but functional Composable displaying 140 characters string:

Text("123456789a123456789b123456789c123456789d123456789e123456789f123456789g123456789h123456789i123456789j123456789k123456789l123456789m123456789n")

Do I misunderstand this restriction or maybe those restrictions are not working with composables yet?

0

There are 0 answers