Skip to content
Snippets Groups Projects
Commit caa341ae authored by Nikhil Kumar's avatar Nikhil Kumar
Browse files

Remove getUserId mock method from Mock Context.

getUserId is a widely used context method and mocking it with an exception can cause many failures if not overridden with a valid value.

Removed the getUserId() method from mock context to use actual invocation, Text classes can still override the method in the Test class implementation if it's needed for any specific case.

Test: atest EabControllerTest -c
Test: atest TelephonyProviderTest -c

Bug: 319931444
Bug: 319437162
Bug: 320426061

Change-Id: Ibf9a2efc22a3bdbc8403dfbc25be07485f4336b4
parent 3c87a01e
No related branches found
No related tags found
No related merge requests found
......@@ -822,12 +822,6 @@ public class MockContext extends Context {
throw new UnsupportedOperationException();
}
/** {@hide} */
@Override
public int getUserId() {
throw new UnsupportedOperationException();
}
@Override
public Context createConfigurationContext(Configuration overrideConfiguration) {
throw new UnsupportedOperationException();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment