Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A comment #2157

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -451,18 +451,17 @@ private Bundle createResultBundle() {

@Override
public void finish(int resultCode, Bundle results) {

try {
super.finish(resultCode, results);
} catch (SecurityException e) {
Log.e(TAG, "Security exception thrown on shutdown", e);
// On API Level 18 a security exception can be occasionally thrown when calling finish
// with a result bundle taken from a remote message. Recreating the result bundle and
// retrying finish has a high probability of suppressing the flake.
results = createResultBundle();
super.finish(resultCode, results);
}

// This is a comment
try {
super.finish(resultCode, results);
} catch (SecurityException e) {
Log.e(TAG, "Security exception thrown on shutdown", e);
// On API Level 18 a security exception can be occasionally thrown when calling finish
// with a result bundle taken from a remote message. Recreating the result bundle and
// retrying finish has a high probability of suppressing the flake.
results = createResultBundle();
super.finish(resultCode, results);
}
}

@Override
Expand Down