Loads the activities for the current intent if needed which is
if they are not already loaded for the current intent.

@return Whether loading was performed.
428382
private boolean loadActivitiesIfNeeded() {
        if (mReloadActivities && mIntent != null) {
            mReloadActivities = false;
            mActivities.clear();
            List<ResolveInfo> resolveInfos = mContext.getPackageManager()
                    .queryIntentActivities(mIntent, 0);
            final int resolveInfoCount = resolveInfos.size();
            for (int i = 0; i < resolveInfoCount; i++) {
                ResolveInfo resolveInfo = resolveInfos.get(i);
                mActivities.add(new ActivityResolveInfo(resolveInfo));
            }
            return true;
        }
        return false;
    }
444955
def get_main_activities(self):
        
        x = set()
        y = set()

        for i in self.xml:
            if self.xml[i] is None:
                continue
            activities_and_aliases = self.xml[i].findall(".//activity") + \
                                     self.xml[i].findall(".//activity-alias")

            for item in activities_and_aliases:
                # Some applications have more than one MAIN activity.
                # For example: paid and free content
                activityEnabled = item.get(self._ns("enabled"))
                if activityEnabled == "false":
                    continue

                for sitem in item.findall(".//action"):
                    val = sitem.get(self._ns("name"))
                    if val == "android.intent.action.MAIN":
                        activity = item.get(self._ns("name"))
                        if activity is not None:
                            x.add(item.get(self._ns("name")))
                        else:
                            log.warning('Main activity without name')

                for sitem in item.findall(".//category"):
                    val = sitem.get(self._ns("name"))
                    if val == "android.intent.category.LAUNCHER":
                        activity = item.get(self._ns("name"))
                        if activity is not None:
                            y.add(item.get(self._ns("name")))
                        else:
                            log.warning('Launcher activity without name')

        return x.intersection(y)
462464
public Activity getActivity() {
        Context context = getContext();
        while (!(context instanceof Activity) && context instanceof ContextWrapper)
            context = ((ContextWrapper) context).getBaseContext();
        if (!(context instanceof Activity))
            throw new IllegalStateException("Expected an activity context, got " + context.getClass().getSimpleName());
        return (Activity) context;
    }
841262
public boolean isUnloadedAtDestination() {
		for (HandlingEvent event : deliveryHistory().eventsOrderedByCompletionTime()) {
			if (Type.UNLOAD.equals(event.getType()) && getDestination().equals(event.getLocation())) {
				return true;
			}
		}
		return false;
	}
448556
protected static function load()
    {
        if (!static::isOn()) {
            return false;
        } elseif (!array_has($_SESSION, static::$register_name)) {
            $_SESSION[static::$register_name] = [];
        }

        static::$register = $_SESSION[static::$register_name];

        return true;
    }
287006
public final boolean isLoading() {
        if (mDatas.isEmpty()) {
            return false;
        }
        for (int i = 0; i < mDatas.size(); i++) {
            if (mDatas.get(i).isLoading()) {
                return true;
            }
        }
        return false;
    }
91298
@Override
    public void onBackPressed() {
    	// Verify if the activity must be finished or if the parent folder must be opened.
   	    File current = this.core.getCurrentFolder();
   	    if(!this.useBackButton || current == null || current.getParent() == null || current.getPath().compareTo(this.startFolder.getPath()) == 0) {
   	    	// Close activity.
   	    	super.onBackPressed();
   	    }else{
   	    	// Open parent.
   	        this.core.loadFolder(current.getParent());
   	    }
  	}
902140
public boolean isLoadedDataSuccessfullyRecently() {
        final Integer timeSinceLastError = getSecondsSinceLastFailedLoad();
        final Integer timeSinceLastSuccess = getSecondsSinceLastLoad();
        if (timeSinceLastSuccess == null) {
            return false; // never loaded data, so must be FAIL
        }
        if (timeSinceLastError == null) {
            return true; // no errors ever, so must be OKAY
        }
        return lastLoadWasSuccessful;
    }
620480
private static boolean isSigarAlreadyLoaded() throws Exception {
        final String libraryName = new SigarLoader(Sigar.class).getLibraryName();
        final Field loadedLibraryNames = ClassLoader.class.getDeclaredField("loadedLibraryNames");
		loadedLibraryNames.setAccessible(true);
        final Collection<String> libraries = (Collection<String>) loadedLibraryNames.get(SigarProvisioner.class.getClassLoader());

        for (String library: libraries) {
            if(library.contains(libraryName)) return true;
        }
        return false;
    }
842376
def get_activities(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.ActivityList(self._results, runtime=self._runtime)
1081637
@Override
    public void onModuleLoad() {
        //start from the requested URL
        jcrService.getRequestedURI(new BaseCallback<String>() {

            @SuppressWarnings( "synthetic-access" )
            @Override
            public void onSuccess( String result ) {
                //parse requested url to determine navigation
                jcrURL.parse(result);
  
                //before navigate to the requested URL we need to
                //check is this user already logged in or not yet.
                getCredentials();
            }
        });
    }
1359670
protected function _findActivityActor()
    {
        $user = $this->getObject('user.provider')->fetch($this->created_by);

        return is_null($user) ? false : true;
    }
767218
public boolean shouldDoInitialLoad() {
        if (role.is(Role.SENDER_BACKUP)) {
            // was backup. become primary sender
            role.next(Role.SENDER);

            if (state.is(State.LOADING)) {
                // previous loading was in progress. cancel and start from scratch
                state.next(State.NOT_LOADED);
                keyLoadFinished.setResult(false);
            }
        }

        return state.is(State.NOT_LOADED);
    }
720256
def run_activity(self):
        
        activity = self.current.activity
        if activity:
            if activity not in self.wf_activities:
                self._load_activity(activity)
            self.current.log.debug(
                "Calling Activity %s from %s" % (activity, self.wf_activities[activity]))
            self.wf_activities[self.current.activity](self.current)
1017834
public boolean invoke() {
        if (mClickListener != null &&
            mClickListener.onMenuItemClick(this)) {
            return true;
        }

        if (mMenu.dispatchMenuItemSelected(mMenu.getRootMenu(), this)) {
            return true;
        }

        if (mItemCallback != null) {
            mItemCallback.run();
            return true;
        }

        if (mIntent != null) {
            try {
                mMenu.getContext().startActivity(mIntent);
                return true;
            } catch (ActivityNotFoundException e) {
                Log.e(TAG, "Can't find activity to handle intent; ignoring", e);
            }
        }

        if (mActionProvider != null && mActionProvider.onPerformDefaultAction()) {
            return true;
        }

        return false;
    }
1295856
function() {
			if (this.lazy) {
				if (this.children == null) {
					// null or undefined: Not yet loaded
					return undefined;
				} else if (this.children.length === 0) {
					// Loaded, but response was empty
					return false;
				} else if (
					this.children.length === 1 &&
					this.children[0].isStatusNode()
				) {
					// Currently loading or load error
					return undefined;
				}
				return true;
			}
			return !!(this.children && this.children.length);
		}
1008362
@Override
    public synchronized boolean load() {
        Either<Void, T> oldData = data;
        String oldKey = versionedKey;
        try {
            if (isOutOfDate()) {
                String newVersionedKey = (String) connection.get(key)
                                                            .get();
                data = Either.right((T) nonAtomicload(newVersionedKey));
                versionedKey = newVersionedKey;
            } else {
                return false;
            }
        } catch (Throwable e) {
            data = oldData;
            versionedKey = oldKey;
            logger.debug(e.getMessage(), e);
            throw ExceptionSoftener.throwSoftenedException(e);
        }
        return true;
    }