public static BundleService getBundleService(Context context) {
BundleServiceRunner runner = BundleServiceRunner.getBundleServiceRunner(context);
if (runner == null) {
throw new IllegalStateException(
"You forgot to set up a " + BundleServiceRunner.class.getName() + " in your activity");
}
return runner.requireBundleService(MortarScope.getScope(context));
}
runner can never be null. BundleServiceRunner.getBundleServiceRunner will throw is there is no BundleServiceRunner in the scope.
The code does this:
runner can never be null. BundleServiceRunner.getBundleServiceRunner will throw is there is no BundleServiceRunner in the scope.