设置最新的activity | Set up the latest activity
@param curActivity 最新的activity | Latest activity
191132
private void setCurActivity(Activity curActivity) {
        synchronized (LOCK_LASTACTIVITIES) {
            int idxCurActivity = curActivities.indexOf(curActivity);
            if (idxCurActivity == -1) {
                curActivities.add(curActivity);
            } else if (idxCurActivity < curActivities.size()-1){
                curActivities.remove(curActivity);
                curActivities.add(curActivity);
            }
        }
    }
681464
@Override
  public void recordActivityStart(ExecutionEntity executionEntity) {
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
      if (executionEntity.getActivityId() != null && executionEntity.getCurrentFlowElement() != null) {
        
        HistoricActivityInstanceEntity historicActivityInstanceEntity = null;
        
        // Historic activity instance could have been created (but only in cache, never persisted)
        // for example when submitting form properties
        HistoricActivityInstanceEntity historicActivityInstanceEntityFromCache = 
            getHistoricActivityInstanceFromCache(executionEntity.getId(), executionEntity.getActivityId(), true);
        if (historicActivityInstanceEntityFromCache != null) {
          historicActivityInstanceEntity = historicActivityInstanceEntityFromCache;
        } else {
          historicActivityInstanceEntity = createHistoricActivityInstanceEntity(executionEntity);
        }
        
        // Fire event
        ActivitiEventDispatcher activitiEventDispatcher = getEventDispatcher();
        if (activitiEventDispatcher != null && activitiEventDispatcher.isEnabled()) {
          activitiEventDispatcher.dispatchEvent(
              ActivitiEventBuilder.createEntityEvent(ActivitiEventType.HISTORIC_ACTIVITY_INSTANCE_CREATED, historicActivityInstanceEntity));
        }
        
      }
    }
  }
614772
protected void claBumpActivity(final MSClause c) {
    c.incrementActivity(claInc);
    if (c.activity() > 1e20) {
      for (final MSClause clause : learnts)
        clause.rescaleActivity();
      claInc *= 1e-20;
    }
  }
437121
protected void setCurrentPage(WizardPage<DATA> newPage) {
		currentPage = newPage;
		updateState();
		wizardView.setCurrentPage(currentPage);
		currentPage.show();
	}
60539
@Override
    public void onActivityResume(Activity activity) {
        // 通知hmssdk activity onResume了
        HuaweiApiClient client = getApiClient();
        if (client != null) {
            HMSAgentLog.d("tell hmssdk: onResume");
            client.onResume(activity);
        }

        // 如果正在解决错误，则处理被覆盖的场景
        HMSAgentLog.d("is resolving:" + isResolving);
        if (isResolving && !PACKAGE_NAME_HIAPP.equals(curAppPackageName)) {
            if (activity instanceof BridgeActivity) {
                resolveActivity = (BridgeActivity)activity;
                hasOverActivity = false;
                HMSAgentLog.d("received bridgeActivity:" + StrUtils.objDesc(resolveActivity));
            } else if (resolveActivity != null && !resolveActivity.isFinishing()){
                hasOverActivity = true;
                HMSAgentLog.d("received other Activity:" + StrUtils.objDesc(resolveActivity));
            }
            timeoutHandler.removeMessages(UPDATE_OVER_ACTIVITY_CHECK_TIMEOUT_HANDLE_MSG);
            timeoutHandler.sendEmptyMessageDelayed(UPDATE_OVER_ACTIVITY_CHECK_TIMEOUT_HANDLE_MSG, UPDATE_OVER_ACTIVITY_CHECK_TIMEOUT);
        }
    }
220087
private void updateAppearance() {
        // Expand overflow button.
        if (mAdapter.getCount() > 0) {
            mExpandActivityOverflowButton.setEnabled(true);
        } else {
            mExpandActivityOverflowButton.setEnabled(false);
        }
        // Default activity button.
        final int activityCount = mAdapter.getActivityCount();
        final int historySize = mAdapter.getHistorySize();
        if (activityCount > 0 && historySize > 0) {
            mDefaultActivityButton.setVisibility(VISIBLE);
            ResolveInfo activity = mAdapter.getDefaultActivity();
            PackageManager packageManager = mContext.getPackageManager();
            mDefaultActivityButtonImage.setImageDrawable(activity.loadIcon(packageManager));
            if (mDefaultActionButtonContentDescription != 0) {
                CharSequence label = activity.loadLabel(packageManager);
                String contentDescription = mContext.getString(
                        mDefaultActionButtonContentDescription, label);
                mDefaultActivityButton.setContentDescription(contentDescription);
            }

            // Work-around for #415.
            mAdapter.setShowDefaultActivity(false, false);
        } else {
            mDefaultActivityButton.setVisibility(View.GONE);
        }
        // Activity chooser content.
        if (mDefaultActivityButton.getVisibility() == VISIBLE) {
            mActivityChooserContent.setBackgroundDrawable(mActivityChooserContentBackground);
        } else {
            mActivityChooserContent.setBackgroundDrawable(null);
            mActivityChooserContent.setPadding(0, 0, 0, 0);
        }
    }
1272462
func (t *trackingConn) UpdateClientActivity() {
	t.Lock()
	defer t.Unlock()
	t.lastActive = t.clock.Now().UTC()
}
1115467
public void setInactivity(int inactivity) { // CPF-Inactivity
      if (lock == SET) {
         throw new IllegalStateException("EntryInfo is locked");
      }
      inactivityFlag = SET;
      this.inactivity = inactivity; // Seconds
      if (com.ibm.ws.cache.TimeLimitDaemon.UNIT_TEST_INACTIVITY) {
        System.out.println("EntryInfo.setInactivity() "+inactivity);
      }
   }
930977
public synchronized void setActivityInstanceStatus(ActivityInstance actInst,
            Integer status, String statusMessage)
            throws SQLException {
        if (cache_activity_transition==CACHE_ONLY) {
            actInst.setStatusCode(status);
            actInst.setMessage(statusMessage);
        } else {
            edadb.setActivityInstanceStatus(actInst, status, statusMessage);
        }
    }
242527
public void activate() {
        // Notify ActivationListeners
    	SipApplicationSessionEvent event = null;
    	if(sipApplicationSessionAttributeMap != null) {
	        Set<String> keySet = sipApplicationSessionAttributeMap.keySet();
	        for (String key : keySet) {
	        	Object attribute = sipApplicationSessionAttributeMap.get(key);
	            if (attribute instanceof SipApplicationSessionActivationListener) {
	                if (event == null)
	                	event = new SipApplicationSessionActivationEvent(this, SessionActivationNotificationCause.ACTIVATION);
	                try {
	                    ((SipApplicationSessionActivationListener)attribute)
	                        .sessionDidActivate(event);
	                } catch (Throwable t) {
	                    logger.error("SipApplicationSessionActivationListener threw exception", t);
	                }
	            }
			}
	    }
    }
156061
public void setAttributeUpdates(java.util.Collection<TypedLinkFacetAttributeUpdate> attributeUpdates) {
        if (attributeUpdates == null) {
            this.attributeUpdates = null;
            return;
        }

        this.attributeUpdates = new java.util.ArrayList<TypedLinkFacetAttributeUpdate>(attributeUpdates);
    }
685958
private final void setPersNew() {
		status = ObjectState.PERSISTENT_NEW;
		stateFlags = PS_PERSISTENT | PS_TRANSACTIONAL | PS_DIRTY | PS_NEW;
		context.getSession().internalGetCache().notifyDirty(this);
	}
145493
public static void setRoundingMode (@Nullable final ECurrency eCurrency, @Nullable final RoundingMode eRoundingMode)
  {
    getSettings (eCurrency).setRoundingMode (eRoundingMode);
  }
1193286
protected void createOrUpdateFunctionApp() throws Exception {
        final FunctionApp app = getFunctionApp();
        if (app == null) {
            createFunctionApp();
        } else {
            updateFunctionApp(app);
        }
    }
388904
public void setPendingMaintenanceActionDetails(java.util.Collection<PendingMaintenanceAction> pendingMaintenanceActionDetails) {
        if (pendingMaintenanceActionDetails == null) {
            this.pendingMaintenanceActionDetails = null;
            return;
        }

        this.pendingMaintenanceActionDetails = new java.util.ArrayList<PendingMaintenanceAction>(pendingMaintenanceActionDetails);
    }
860400
public void setupUpIndicator(Activity activity) {
        if (mActionBarHelper == null) {
            mActionBarHelper = new ActionBarHelper(activity);
            mThemeUpIndicator = mActionBarHelper.getThemeUpIndicator();

            if (mDrawerIndicatorEnabled) {
                mActionBarHelper.setActionBarUpIndicator(mSlideDrawable,
                        isMenuVisible() ? mDrawerOpenContentDesc : mDrawerClosedContentDesc);
            }
        }
    }
942635
public void setMaxProgress(int newMaxProgress) {
        if (getProgress() <= newMaxProgress) {
            maxProgress = newMaxProgress;
        }
        else {
            throw new IllegalArgumentException(
                    String.format("MaxProgress cant be smaller than the current progress %d<%d", getProgress(), newMaxProgress));
        }
        invalidate();
        BootstrapProgressBarGroup parent = (BootstrapProgressBarGroup) getParent();
    }