Open Bug 1362561 Opened 4 years ago Updated 2 years ago

[lint] Write custom lint check to enfore SafeIntent usage


(Firefox Build System :: Android Studio and Gradle Integration, enhancement, P5)



(Not tracked)


(Reporter: ahunt, Unassigned)



Other apps can put garbage in Intents, causing crashes. This usually gets discovered when apps like Facebook start crashing us:
Bug 1147992
Bug 1299939
Bug 1077645 (this might be the "original", has some dupes)

We occasionally notice and fix this before the crashes flood in:
Bug 1152873

A lint check would be nice to make sure we catch these issues early.

It would be nice to add this to Focus too (of course we hit that there too, fortunately discovered during beta: ). Even nicer would be a shared lint-suite for all Mozilla products, so perhaps it would be worth writing these customs lint checks as a project on github or similar, which we can then perhaps include using gradle (is that even feasible? I don't know).

And we should probably share our SafeIntent implementation (and other Browser Utils) in a library somewhere. That will be easier once we only need to support gradle builds.
IIRC maliu originally suggested doing this!
Re-triaging per

Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
Product: Firefox for Android → Firefox Build System
You need to log in before you can comment on or make changes to this bug.