Skip to content

Clean up old sessions in the NDK #2680

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

Merged
merged 1 commit into from
May 21, 2021
Merged

Clean up old sessions in the NDK #2680

merged 1 commit into from
May 21, 2021

Conversation

mrober
Copy link
Contributor

@mrober mrober commented May 20, 2021

Clean up old sessions in the NDK before initializing and after finalizing a session.

Tested manually with a test app.

@googlebot googlebot added the cla: yes Override cla label May 20, 2021
@mrober mrober requested review from mrichards and kmandrika May 20, 2021 20:09
@google-oss-bot
Copy link
Contributor

Coverage Report

Affected SDKs

No changes between base commit (6357bbe) and head commit (a82bf936).

Test Logs

Notes

HTML coverage reports can be produced locally with ./gradlew <product>:checkCoverage.
Report files are located at <product-build-dir>/reports/jacoco/.

Head commit (a82bf936) is created by Prow via merging commits: 6357bbe 4271933.

@google-oss-bot
Copy link
Contributor

Binary Size Report

Affected SDKs

  • firebase-crashlytics-ndk

    Type Base (6357bbe) Head (a82bf936) Diff
    aar 1.72 MB 1.72 MB +715 B (+0.0%)

Test Logs

Notes

Head commit (a82bf936) is created by Prow via merging commits: 6357bbe 4271933.

recursiveDelete(new File(rootPath, sessionId));
}

@Override
public void cleanOldSessionFileDirectories() {
File[] sessionFileDirectories = rootPath.listFiles(File::isDirectory);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd double check with Marc about JDK version requirements - this syntax may not be supported.

Copy link
Contributor

@mrichards mrichards May 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should work now that we're requiring everyone to update to Java 8 (as of the M95 release). I think this syntax is 100% resolved in the compiler but it is probably worth testing on an API 19 emulator, which I believe is the oldest we support.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: API 16 is the oldest one we support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it on an emulator with API 16 and it works fine. We use this syntax in a few other places already.

Copy link
Contributor

@mrichards mrichards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending confirmation that JDK version isn't an issue.

@mrober
Copy link
Contributor Author

mrober commented May 21, 2021

/test macrobenchmark

@mrober mrober merged commit 978bfbc into master May 21, 2021
@mrober mrober deleted the ndk-cleanup-sessions branch May 21, 2021 19:00
@firebase firebase locked and limited conversation to collaborators Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants