Add unit test init method.
When trying to write some connectionservice unit tests, it became clear that the mAreAccountsInitialized precondition adds a LOT of overhead and test scaffolding. It was easier to just be able to bypass that in the unit tests. Test: Added as part of unit test. Bug: 178649879 Change-Id: Ibed3e69215dad59b252193f701508c18f43b59a2
This commit is contained in:
@@ -3448,4 +3448,13 @@ public abstract class ConnectionService extends Service {
|
||||
public Handler getHandler() {
|
||||
return mHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets this {@link ConnectionService} ready for testing purposes.
|
||||
* @hide
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public void setReadyForTest() {
|
||||
mAreAccountsInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user