Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ban usage of
Stopwatch.elapsed()
from non-desugared Android code.
While `AndroidJdkLibsChecker` would already issue errors for code like `stopwatch.elapsed().toString()` (since that code includes a call to the banned `Duration.toString()`), it would not issue errors for cases in which callers, e.g., concatenate `stopwatch.elapsed()` into a string or pass `stopwatch.elapsed()` to another method, such as to log it. The best approach here might be for the checker to automatically inspect all called methods for any reference to banned types in their parameter types or return types. However, that sounds like more implementation work, and it sounds like work that could require depot cleanup. (And maybe there are even reasons you've chosen not to take that approach?) So I figured it would be worth starting with this special case. PiperOrigin-RevId: 376048914
- Loading branch information