Skip to content

Instantly share code, notes, and snippets.

@makzimi
Created November 2, 2022 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makzimi/7ae08d1ae5b790639d40902c9636a72e to your computer and use it in GitHub Desktop.
Save makzimi/7ae08d1ae5b790639d40902c9636a72e to your computer and use it in GitHub Desktop.
TransactionTooLargeException_article_PendingTransactionActions.java
public class PendingTransactionActions {
...
public static class StopInfo implements Runnable {
@Override
public void run() {
...
try {
...
// This is the call of the Binder transaction
// through the ActivityManagerService
ActivityClient.getInstance().activityStopped(
mActivity.token, mState, mPersistentState, mDescription);
} catch (RuntimeException ex) {
...
if (ex.getCause() instanceof TransactionTooLargeException
&& mActivity.packageInfo.getTargetSdkVersion() < Build.VERSION_CODES.N) {
Log.e(TAG, "App sent too much data in instance state, so it was ignored", ex);
return;
}
throw ex;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment