Skip to content
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