for (int i = 0; i < bundles.length; i++) { if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
for (int i = 0; i < bundles.length; i++) if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0)
	public static Bundle getBundle(String symbolicName) {		PackageAdmin packageAdmin = (PackageAdmin) pkgAdminTracker.getService();		if (packageAdmin == null)			return null;		Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);		if (bundles == null)			return null;		//Return the first bundle that is not installed or uninstalled		for (int i = 0; i < bundles.length; i++) {			if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {				return bundles[i];			}		}		return null;	}