activity onResume 事件回调
@param activity 发生 onResume 事件的activity
197888
@Override
    public void onActivityResume(Activity activity) {
        HMSAgentLog.d("autoShowFloatWindow:" + isShowFloatWindowCalled);
        if (isShowFloatWindowCalled) {
            showFinal(true, null, ApiClientMgr.INST.getApiClient());
        }
    }
739250
public static void restartActivity(final Activity activity) {
        Intent intent = activity.getIntent();
        activity.overridePendingTransition(0, 0);
        intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
        activity.finish();
        activity.overridePendingTransition(0, 0);
        activity.startActivity(intent);
    }
425348
public void endActivity(HttpClientNIORequestActivityImpl activity) {

        final HttpClientNIORequestActivityHandle ah = new HttpClientNIORequestActivityHandle(activity.getId());

        if (activities.containsKey(ah)) {
            resourceAdaptorContext.getSleeEndpoint().endActivity(ah);
        }
    }
90138
public synchronized void decrementActivityCount()
    {
        _activityCount--;
        if(_activityCount == 0)
        {
            this.notifyAll();
        }
        if (tc.isDebugEnabled()) Tr.debug(tc, "decrementActivityCount", new Object[]{this, new Integer(_activityCount)});
    }
222035
protected void addActivityHandlers(ActivityImpl activity) {
    if (historyLevel.isHistoryEventProduced(HistoryEventTypes.ACTIVITY_INSTANCE_START, null)) {
      activity.addBuiltInListener(PvmEvent.EVENTNAME_START, ACTIVITY_INSTANCE_START_LISTENER, 0);
    }
    if (historyLevel.isHistoryEventProduced(HistoryEventTypes.ACTIVITY_INSTANCE_END, null)) {
      activity.addBuiltInListener(PvmEvent.EVENTNAME_END, ACTIVITY_INSTANCE_END_LISTENER);
    }
  }
1355235
public void onActivityResult(int requestCode, int resultCode, Intent data) {
        onActivityResult(requestCode, resultCode, data, null);
    }
289722
@Override
    public void onActivityDestroyed(Activity activity) {
        HMSAgentLog.d("onDestroyed:" + StrUtils.objDesc(activity));
        removeActivity(activity);

        // activity onDestroyed 事件回调 | Activity Ondestroyed Event Callback
        List<IActivityDestroyedCallback> tmdCallbacks = new ArrayList<IActivityDestroyedCallback>(destroyedCallbacks);
        for (IActivityDestroyedCallback callback : tmdCallbacks) {
            callback.onActivityDestroyed(activity, getLastActivityInner());
        }
    }
402670
@CheckResult public static boolean onNewIntent(@NonNull Intent intent,
      @NonNull Activity activity) {
    //noinspection ConstantConditions
    checkArgument(intent != null, "intent may not be null");
    if (intent.hasExtra(InternalLifecycleIntegration.INTENT_KEY)) {
      InternalLifecycleIntegration.require(activity).onNewIntent(intent);
      return true;
    }
    return false;
  }
787764
function startActivity (activityId) {
  var timestamp = new Date().getTime()
  var body = 'activityId=' + activityId + ':timestamp=' + timestamp

  return this.request('startactivity', body, 'encoded', function (stanza) {
    // This canHandleStanzaFn waits for a stanza that confirms starting the activity.
    var event = stanza.getChild('event')
    var canHandleStanza = false

    if (event && event.attr('type') === 'connect.stateDigest?notify') {
      var digest = JSON.parse(event.getText())
      if (activityId === '-1' && digest.activityId === activityId && digest.activityStatus === 0) {
        canHandleStanza = true
      } else if (activityId !== '-1' && digest.activityId === activityId && digest.activityStatus === 2) {
        canHandleStanza = true
      }
    }
    return canHandleStanza
  })
}
566693
public void processResponseEvent(ResponseEvent event, HttpClientActivity activity) throws ActivityIsEndingException {

        HttpClientActivityHandle ah = new HttpClientActivityHandle(activity.getSessionId());

        if (tracer.isFineEnabled())
            tracer.fine("==== FIRING ResponseEvent EVENT TO LOCAL SLEE, Event: " + event + " ====");

        try {
            resourceAdaptorContext.getSleeEndpoint().fireEvent(ah, fireableEventType, event, null, null, EVENT_FLAGS);
        } catch (Throwable e) {
            throw new ActivityIsEndingException();
        }
    }
845722
public void addWindow(Activity activity) {
        String name = activity.getTitle().toString();
        if (TextUtils.isEmpty(name)) {
            name = activity.getClass().getCanonicalName() +
                    "/0x" + System.identityHashCode(activity);
        } else {
            name += "(" + activity.getClass().getCanonicalName() + ")";
        }
        addWindow(activity.getWindow().getDecorView(), name);
    }
706389
public void start(Intent intent) {
        intent = setupIntent(intent);

        if (application != null) {
            // Extra flag is required when starting from application:
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            application.startActivity(intent);
            return; // No transitions, so just return
        }

        if (activity != null) {
            if (requestCode == NO_RESULT_CODE) {
                activity.startActivity(intent);
            } else {
                activity.startActivityForResult(intent, requestCode);
            }
        } else if (fragment != null) {
            if (requestCode == NO_RESULT_CODE) {
                fragment.startActivity(intent);
            } else {
                fragment.startActivityForResult(intent, requestCode);
            }
        } else if (fragmentSupport != null) {
            if (requestCode == NO_RESULT_CODE) {
                fragmentSupport.startActivity(intent);
            } else {
                fragmentSupport.startActivityForResult(intent, requestCode);
            }
        }

        setTransition(false);
    }
571348
public void eventProcessingSuccessful(ActivityHandle activityHandle, FireableEventType fireableEventType,
            Object object, Address address, ReceivableService receivableService, int integer) {
        // not used
    }
623561
void clearCroutonsForActivity(Activity activity) {
    Iterator<Crouton> croutonIterator = croutonQueue.iterator();
    while (croutonIterator.hasNext()) {
      Crouton crouton = croutonIterator.next();
      if ((null != crouton.getActivity()) && crouton.getActivity().equals(activity)) {
        // remove the crouton from the content view
        removeCroutonFromViewParent(crouton);

        removeAllMessagesForCrouton(crouton);

        // remove the crouton from the queue
        croutonIterator.remove();
      }
    }
  }
797413
public void registerActivitResumeEvent(IActivityResumeCallback callback) {
        HMSAgentLog.d("registerOnResume:" + StrUtils.objDesc(callback));
        resumeCallbacks.add(callback);
    }
696043
public  void  execute() throws ActivityException{
        isSynchronized = checkIfSynchronized();
        if (!isSynchronized) {
            EventWaitInstance received = registerWaitEvents(false, true);
            if (received!=null)
                resume(getExternalEventInstanceDetails(received.getMessageDocumentId()), received.getCompletionCode());
        }
    }
1215431
@Override
    @SuppressWarnings("deprecation")
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        binderHelper.bindIfNecessary();
        lifeCycleDispatcher.onAttach(host(), activity);
    }