ground-android
ground-android copied to clipboard
[Code health] Clean up `ApplicationErrorManager`
Some quick wins:
- Inject and use EphemeralPopups directly instead of binding to Activity.
- How errors are handled depends on the use case; expose finer-grained handlers, e.g.
handlePermissionDeniedErrors. - Permission denied may also occur due other Firebase rules besides passlist, e.g. to lack of ACLs in project. Error message should be more general (e.g., "Permission denied").
- Consider letting
handlePermissionDeniedErrorsreturns a lambda to simplify Rx syntax or use Rxcompose(), removeshouldInterceptException(). - Tests currently look for specific strings copy & pasted from resources. We should avoid change detector tests - motivation: https://testing.googleblog.com/2015/01/testing-on-toilet-change-detector-tests.html
@shobhitagarwal1612 Would you like to look into these?