Use null as default argument
This improves mocking it, as the Java code that results in creating the overloads doesn't need to call context.getMainExecutor or context.getUser. As an example, with a mock mDispatcher, calls to `mDispatcher(receiver, filter)` with some configurations of Mockito would fail, as the actual Java method would create the default parameters calling `context.getMainExecutor()` and `context.getUser()`, but `context` is null in the mock. Test: atest SystemUITests Change-Id: Ia97b62134532c60525d1df33023cc2dd99c1f6a8
Loading
Please register or sign in to comment