Here are the examples of the java api android.app.ClientTransactionHandler taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
28 Examples
19
Source : WindowVisibilityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityShowWindow");
client.handleWindowVisibility(token, mShowWindow);
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : TransactionExecutor.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
/**
* Clreplaced that manages transaction execution in the correct order.
* @hide
*/
public clreplaced TransactionExecutor {
private static final boolean DEBUG_RESOLVER = false;
private static final String TAG = "TransactionExecutor";
private ClientTransactionHandler mTransactionHandler;
private PendingTransactionActions mPendingActions = new PendingTransactionActions();
private TransactionExecutorHelper mHelper = new TransactionExecutorHelper();
/**
* Initialize an instance with transaction handler, that will execute all requested actions.
*/
public TransactionExecutor(ClientTransactionHandler clientTransactionHandler) {
mTransactionHandler = clientTransactionHandler;
}
/**
* Resolve transaction.
* First all callbacks will be executed in the order they appear in the list. If a callback
* requires a certain pre- or post-execution state, the client will be transitioned accordingly.
* Then the client will cycle to the final lifecycle state if provided. Otherwise, it will
* either remain in the initial state, or last state needed by a callback.
*/
public void execute(ClientTransaction transaction) {
final IBinder token = transaction.getActivityToken();
log("Start resolving transaction for client: " + mTransactionHandler + ", token: " + token);
// 执行 callBack
executeCallbacks(transaction);
// 执行生命周期状态
executeLifecycleState(transaction);
mPendingActions.clear();
log("End resolving transaction");
}
/**
* Cycle through all states requested by callbacks and execute them at proper times.
*/
@VisibleForTesting
public void executeCallbacks(ClientTransaction transaction) {
final List<ClientTransactionItem> callbacks = transaction.getCallbacks();
if (callbacks == null) {
// No callbacks to execute, return early.
return;
}
log("Resolving callbacks");
final IBinder token = transaction.getActivityToken();
ActivityClientRecord r = mTransactionHandler.getActivityClient(token);
// In case when post-execution state of the last callback matches the final state requested
// for the activity in this transaction, we won't do the last transition here and do it when
// moving to final state instead (because it may contain additional parameters from server).
final ActivityLifecycleItem finalStateRequest = transaction.getLifecycleStateRequest();
final int finalState = finalStateRequest != null ? finalStateRequest.getTargetState() : UNDEFINED;
// Index of the last callback that requests some post-execution state.
final int lastCallbackRequestingState = lastCallbackRequestingState(transaction);
final int size = callbacks.size();
for (int i = 0; i < size; ++i) {
final ClientTransactionItem item = callbacks.get(i);
log("Resolving callback: " + item);
final int postExecutionState = item.getPostExecutionState();
final int closestPreExecutionState = mHelper.getClosestPreExecutionState(r, item.getPostExecutionState());
if (closestPreExecutionState != UNDEFINED) {
cycleToPath(r, closestPreExecutionState);
}
item.execute(mTransactionHandler, token, mPendingActions);
item.postExecute(mTransactionHandler, token, mPendingActions);
if (r == null) {
// Launch activity request will create an activity record.
r = mTransactionHandler.getActivityClient(token);
}
if (postExecutionState != UNDEFINED && r != null) {
// Skip the very last transition and perform it by explicit state request instead.
final boolean shouldExcludeLastTransition = i == lastCallbackRequestingState && finalState == postExecutionState;
cycleToPath(r, postExecutionState, shouldExcludeLastTransition);
}
}
}
/**
* Transition to the final state if requested by the transaction.
*/
private void executeLifecycleState(ClientTransaction transaction) {
final ActivityLifecycleItem lifecycleItem = transaction.getLifecycleStateRequest();
if (lifecycleItem == null) {
// No lifecycle request, return early.
return;
}
log("Resolving lifecycle state: " + lifecycleItem);
final IBinder token = transaction.getActivityToken();
final ActivityClientRecord r = mTransactionHandler.getActivityClient(token);
if (r == null) {
// Ignore requests for non-existent client records for now.
return;
}
// Cycle to the state right before the final requested state.
cycleToPath(r, lifecycleItem.getTargetState(), true);
// Execute the final transition with proper parameters.
lifecycleItem.execute(mTransactionHandler, token, mPendingActions);
lifecycleItem.postExecute(mTransactionHandler, token, mPendingActions);
}
/**
* Transition the client between states.
*/
@VisibleForTesting
public void cycleToPath(ActivityClientRecord r, int finish) {
cycleToPath(r, finish, false);
}
/**
* Transition the client between states with an option not to perform the last hop in the
* sequence. This is used when resolving lifecycle state request, when the last transition must
* be performed with some specific parameters.
*/
private void cycleToPath(ActivityClientRecord r, int finish, boolean excludeLastState) {
final int start = r.getLifecycleState();
log("Cycle from: " + start + " to: " + finish + " excludeLastState:" + excludeLastState);
final IntArray path = mHelper.getLifecyclePath(start, finish, excludeLastState);
performLifecycleSequence(r, path);
}
/**
* Transition the client through previously initialized state sequence.
*/
private void performLifecycleSequence(ActivityClientRecord r, IntArray path) {
final int size = path.size();
for (int i = 0, state; i < size; i++) {
state = path.get(i);
log("Transitioning to state: " + state);
switch(state) {
case ON_CREATE:
mTransactionHandler.handleLaunchActivity(r, mPendingActions, null);
break;
case ON_START:
mTransactionHandler.handleStartActivity(r, mPendingActions);
break;
case ON_RESUME:
mTransactionHandler.handleResumeActivity(r.token, false, /* finalStateRequest */
r.isForward, "LIFECYCLER_RESUME_ACTIVITY");
break;
case ON_PAUSE:
mTransactionHandler.handlePauseActivity(r.token, false, /* finished */
false, /* userLeaving */
0, /* configChanges */
mPendingActions, "LIFECYCLER_PAUSE_ACTIVITY");
break;
case ON_STOP:
mTransactionHandler.handleStopActivity(r.token, false, /* show */
0, /* configChanges */
mPendingActions, false, /* finalStateRequest */
"LIFECYCLER_STOP_ACTIVITY");
break;
case ON_DESTROY:
mTransactionHandler.handleDestroyActivity(r.token, false, /* finishing */
0, /* configChanges */
false, /* getNonConfigInstance */
"performLifecycleSequence. cycling to:" + path.get(size - 1));
break;
case ON_RESTART:
mTransactionHandler.performRestartActivity(r.token, false);
break;
default:
throw new IllegalArgumentException("Unexpected lifecycle state: " + state);
}
}
}
private static void log(String message) {
if (DEBUG_RESOLVER)
Slog.d(TAG, message);
}
}
19
Source : StopActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityStop");
client.handleStopActivity(token, mShowWindow, mConfigChanges, pendingActions, true, /* finalStateRequest */
"STOP_ACTIVITY_ITEM");
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : StopActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void postExecute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
client.reportStop(pendingActions);
}
19
Source : ResumeActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void postExecute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
try {
// TODO(lifecycler): Use interface callback instead of AMS.
ActivityManager.getService().activityResumed(token);
} catch (RemoteException ex) {
throw ex.rethrowFromSystemServer();
}
}
19
Source : ResumeActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityResume");
client.handleResumeActivity(token, true, /* finalStateRequest */
mIsForward, "RESUME_ACTIVITY");
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : ResumeActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void preExecute(ClientTransactionHandler client, IBinder token) {
if (mUpdateProcState) {
client.updateProcessState(mProcState, false);
}
}
19
Source : PipModeChangeItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
client.handlePictureInPictureModeChanged(token, mIsInPipMode, mOverrideConfig);
}
19
Source : PauseActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityPause");
// 调用 ActivityThread.handlePauseActivity()
client.handlePauseActivity(token, mFinished, mUserLeaving, mConfigChanges, pendingActions, "PAUSE_ACTIVITY_ITEM");
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : PauseActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void postExecute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
if (mDontReport) {
return;
}
try {
// TODO(lifecycler): Use interface callback instead of AMS.
ActivityManager.getService().activityPaused(token);
} catch (RemoteException ex) {
throw ex.rethrowFromSystemServer();
}
}
19
Source : NewIntentItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
// TODO(lifecycler): Switch new intent handling to this scheme.
/*@Override
public int getPostExecutionState() {
return ON_RESUME;
}*/
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "activityNewIntent");
client.handleNewIntent(token, mIntents, mPause);
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : MultiWindowModeChangeItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
client.handleMultiWindowModeChanged(token, mIsInMultiWindowMode, mOverrideConfig);
}
19
Source : MoveToDisplayItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityMovedToDisplay");
client.handleActivityConfigurationChanged(token, mConfiguration, mTargetDisplayId);
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : DestroyActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityDestroy");
client.handleDestroyActivity(token, mFinished, mConfigChanges, false, /* getNonConfigInstance */
"DestroyActivityItem");
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : ConfigurationChangeItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void preExecute(android.app.ClientTransactionHandler client, IBinder token) {
client.updatePendingConfiguration(mConfiguration);
}
19
Source : ConfigurationChangeItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
client.handleConfigurationChanged(mConfiguration);
}
19
Source : ActivityResultItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
/* TODO(b/78294732)
@Override
public int getPostExecutionState() {
return ON_RESUME;
}*/
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityDeliverResult");
client.handleSendResult(token, mResultInfoList, "ACTIVITY_RESULT");
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : ActivityConfigurationChangeItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
// TODO(lifecycler): detect if PIP or multi-window mode changed and report it here.
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityConfigChanged");
client.handleActivityConfigurationChanged(token, mConfiguration, INVALID_DISPLAY);
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : TransactionExecutor.java
with MIT License
from BaoBaoJianqiang
with MIT License
from BaoBaoJianqiang
/**
* Clreplaced that manages transaction execution in the correct order.
* @hide
*/
public clreplaced TransactionExecutor {
private static final boolean DEBUG_RESOLVER = false;
private static final String TAG = "TransactionExecutor";
private ClientTransactionHandler mTransactionHandler;
private PendingTransactionActions mPendingActions = new PendingTransactionActions();
private TransactionExecutorHelper mHelper = new TransactionExecutorHelper();
/**
* Initialize an instance with transaction handler, that will execute all requested actions.
*/
public TransactionExecutor(ClientTransactionHandler clientTransactionHandler) {
mTransactionHandler = clientTransactionHandler;
}
/**
* Resolve transaction.
* First all callbacks will be executed in the order they appear in the list. If a callback
* requires a certain pre- or post-execution state, the client will be transitioned accordingly.
* Then the client will cycle to the final lifecycle state if provided. Otherwise, it will
* either remain in the initial state, or last state needed by a callback.
*/
public void execute(ClientTransaction transaction) {
final IBinder token = transaction.getActivityToken();
log("Start resolving transaction for client: " + mTransactionHandler + ", token: " + token);
executeCallbacks(transaction);
executeLifecycleState(transaction);
mPendingActions.clear();
log("End resolving transaction");
}
/**
* Cycle through all states requested by callbacks and execute them at proper times.
*/
@VisibleForTesting
public void executeCallbacks(ClientTransaction transaction) {
final List<ClientTransactionItem> callbacks = transaction.getCallbacks();
if (callbacks == null) {
// No callbacks to execute, return early.
return;
}
log("Resolving callbacks");
final IBinder token = transaction.getActivityToken();
ActivityClientRecord r = mTransactionHandler.getActivityClient(token);
// In case when post-execution state of the last callback matches the final state requested
// for the activity in this transaction, we won't do the last transition here and do it when
// moving to final state instead (because it may contain additional parameters from server).
final ActivityLifecycleItem finalStateRequest = transaction.getLifecycleStateRequest();
final int finalState = finalStateRequest != null ? finalStateRequest.getTargetState() : UNDEFINED;
// Index of the last callback that requests some post-execution state.
final int lastCallbackRequestingState = lastCallbackRequestingState(transaction);
final int size = callbacks.size();
for (int i = 0; i < size; ++i) {
final ClientTransactionItem item = callbacks.get(i);
log("Resolving callback: " + item);
final int postExecutionState = item.getPostExecutionState();
final int closestPreExecutionState = mHelper.getClosestPreExecutionState(r, item.getPostExecutionState());
if (closestPreExecutionState != UNDEFINED) {
cycleToPath(r, closestPreExecutionState);
}
item.execute(mTransactionHandler, token, mPendingActions);
item.postExecute(mTransactionHandler, token, mPendingActions);
if (r == null) {
// Launch activity request will create an activity record.
r = mTransactionHandler.getActivityClient(token);
}
if (postExecutionState != UNDEFINED && r != null) {
// Skip the very last transition and perform it by explicit state request instead.
final boolean shouldExcludeLastTransition = i == lastCallbackRequestingState && finalState == postExecutionState;
cycleToPath(r, postExecutionState, shouldExcludeLastTransition);
}
}
}
/**
* Transition to the final state if requested by the transaction.
*/
private void executeLifecycleState(ClientTransaction transaction) {
final ActivityLifecycleItem lifecycleItem = transaction.getLifecycleStateRequest();
if (lifecycleItem == null) {
// No lifecycle request, return early.
return;
}
log("Resolving lifecycle state: " + lifecycleItem);
final IBinder token = transaction.getActivityToken();
final ActivityClientRecord r = mTransactionHandler.getActivityClient(token);
if (r == null) {
// Ignore requests for non-existent client records for now.
return;
}
// Cycle to the state right before the final requested state.
cycleToPath(r, lifecycleItem.getTargetState(), true);
// Execute the final transition with proper parameters.
lifecycleItem.execute(mTransactionHandler, token, mPendingActions);
lifecycleItem.postExecute(mTransactionHandler, token, mPendingActions);
}
/**
* Transition the client between states.
*/
@VisibleForTesting
public void cycleToPath(ActivityClientRecord r, int finish) {
cycleToPath(r, finish, false);
}
/**
* Transition the client between states with an option not to perform the last hop in the
* sequence. This is used when resolving lifecycle state request, when the last transition must
* be performed with some specific parameters.
*/
private void cycleToPath(ActivityClientRecord r, int finish, boolean excludeLastState) {
final int start = r.getLifecycleState();
log("Cycle from: " + start + " to: " + finish + " excludeLastState:" + excludeLastState);
final IntArray path = mHelper.getLifecyclePath(start, finish, excludeLastState);
performLifecycleSequence(r, path);
}
/**
* Transition the client through previously initialized state sequence.
*/
private void performLifecycleSequence(ActivityClientRecord r, IntArray path) {
final int size = path.size();
for (int i = 0, state; i < size; i++) {
state = path.get(i);
log("Transitioning to state: " + state);
switch(state) {
case ON_CREATE:
mTransactionHandler.handleLaunchActivity(r, mPendingActions, null);
break;
case ON_START:
mTransactionHandler.handleStartActivity(r, mPendingActions);
break;
case ON_RESUME:
mTransactionHandler.handleResumeActivity(r.token, false, /* finalStateRequest */
r.isForward, "LIFECYCLER_RESUME_ACTIVITY");
break;
case ON_PAUSE:
mTransactionHandler.handlePauseActivity(r.token, false, /* finished */
false, /* userLeaving */
0, /* configChanges */
mPendingActions, "LIFECYCLER_PAUSE_ACTIVITY");
break;
case ON_STOP:
mTransactionHandler.handleStopActivity(r.token, false, /* show */
0, /* configChanges */
mPendingActions, false, /* finalStateRequest */
"LIFECYCLER_STOP_ACTIVITY");
break;
case ON_DESTROY:
mTransactionHandler.handleDestroyActivity(r.token, false, /* finishing */
0, /* configChanges */
false, /* getNonConfigInstance */
"performLifecycleSequence. cycling to:" + path.get(size - 1));
break;
case ON_RESTART:
mTransactionHandler.performRestartActivity(r.token, false);
break;
default:
throw new IllegalArgumentException("Unexpected lifecycle state: " + state);
}
}
}
private static void log(String message) {
if (DEBUG_RESOLVER)
Slog.d(TAG, message);
}
}
19
Source : PauseActivityItem.java
with MIT License
from BaoBaoJianqiang
with MIT License
from BaoBaoJianqiang
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityPause");
client.handlePauseActivity(token, mFinished, mUserLeaving, mConfigChanges, pendingActions, "PAUSE_ACTIVITY_ITEM");
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
19
Source : TransactionHandlerStub.java
with GNU General Public License v3.0
from android-hacker
with GNU General Public License v3.0
from android-hacker
@Override
public void inject() throws Throwable {
Log.i(TAG, "inject transaction handler.");
Object activityThread = ActivityThread.currentActivityThread.call();
Object transactionExecutor = ActivityThread.mTransactionExecutor.get(activityThread);
Field mTransactionHandlerField = transactionExecutor.getClreplaced().getDeclaredField("mTransactionHandler");
mTransactionHandlerField.setAccessible(true);
ClientTransactionHandler original = (ClientTransactionHandler) mTransactionHandlerField.get(transactionExecutor);
TransactionHandlerProxy proxy = new TransactionHandlerProxy(original);
mTransactionHandlerField.set(transactionExecutor, proxy);
Log.i(TAG, "executor's handler: " + mTransactionHandlerField.get(transactionExecutor));
}
18
Source : LaunchActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void preExecute(ClientTransactionHandler client, IBinder token) {
client.updateProcessState(mProcState, false);
client.updatePendingConfiguration(mCurConfig);
}
18
Source : ClientTransaction.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
/**
* Do what needs to be done while the transaction is being scheduled on the client side.
* @param clientTransactionHandler Handler on the client side that will executed all operations
* requested by transaction items.
*/
public void preExecute(android.app.ClientTransactionHandler clientTransactionHandler) {
if (mActivityCallbacks != null) {
final int size = mActivityCallbacks.size();
for (int i = 0; i < size; ++i) {
mActivityCallbacks.get(i).preExecute(clientTransactionHandler, mActivityToken);
}
}
if (mLifecycleStateRequest != null) {
mLifecycleStateRequest.preExecute(clientTransactionHandler, mActivityToken);
}
}
18
Source : ActivityRelaunchItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void preExecute(ClientTransactionHandler client, IBinder token) {
mActivityClientRecord = client.prepareRelaunchActivity(token, mPendingResults, mPendingNewIntents, mConfigChanges, mConfig, mPreserveWindow);
}
17
Source : ActivityRelaunchItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void postExecute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
client.reportRelaunch(token, pendingActions);
}
16
Source : LaunchActivityItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityStart");
ActivityClientRecord r = new ActivityClientRecord(token, mIntent, mIdent, mInfo, mOverrideConfig, mCompatInfo, mReferrer, mVoiceInteractor, mState, mPersistentState, mPendingResults, mPendingNewIntents, mIsForward, mProfilerInfo, client);
// 调用 ActivityThread.handleLaunchActivity()
client.handleLaunchActivity(r, pendingActions, null);
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
16
Source : LaunchActivityItem.java
with MIT License
from BaoBaoJianqiang
with MIT License
from BaoBaoJianqiang
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityStart");
ActivityClientRecord r = new ActivityClientRecord(token, mIntent, mIdent, mInfo, mOverrideConfig, mCompatInfo, mReferrer, mVoiceInteractor, mState, mPersistentState, mPendingResults, mPendingNewIntents, mIsForward, mProfilerInfo, client);
client.handleLaunchActivity(r, pendingActions, null);
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
14
Source : ActivityRelaunchItem.java
with Apache License 2.0
from lulululbj
with Apache License 2.0
from lulululbj
@Override
public void execute(ClientTransactionHandler client, IBinder token, PendingTransactionActions pendingActions) {
if (mActivityClientRecord == null) {
if (DEBUG_ORDER)
Slog.d(TAG, "Activity relaunch cancelled");
return;
}
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "activityRestart");
client.handleRelaunchActivity(mActivityClientRecord, pendingActions);
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
}