private void disbandBundleManager(BundleManager bundleManager) { for (String type : bundleManager) { for (ServiceStatus serviceStatus : serviceStatii(type)) { if (serviceStatus != null && serviceStatus.isHosted()) { disbandModuleSpecification(bundleManager, serviceStatus.getModuleSpecification()); } } } bundleManager.close(); }
private Bundle unmanage(long bundleId) { if (isManaged(bundleId)) { BundleManager bundleManager = removeBundleManager(bundleId); if (bundleManager != null) { disbandBundleManager(bundleManager); bundleManager.close(); } return bundleManager.getBundle(); } return null; }