-
Notifications
You must be signed in to change notification settings - Fork 207
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
Update context tracking to use lifecycle callbacks #238
Conversation
Pull Request Test Coverage Report for Build 1047
💛 - Coveralls |
Pull Request Test Coverage Report for Build 1093
💛 - Coveralls |
@@ -24,8 +25,8 @@ | |||
private static final String KEY_LIFECYCLE_CALLBACK = "ActivityLifecycle"; | |||
private static final int DEFAULT_TIMEOUT_MS = 30000; | |||
|
|||
private final ConcurrentHashMap<String, Boolean> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the change here? I'd be a bit concerned as this set is accessed using a few different code paths. Even if only the key is used, all this does is derive a concurrency-safe set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kattrali I've changed it to a LinkedHashSet as that retains the ordering of values. The testBasicInForeground
covers the case where multiple activities launch, then one stops, and we need to access the previous activity name.
Maybe a ConcurrentLinkedDeque would be a better choice for this, if you're happy with the general approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the approach is solid - ConcurrentLinkedDeque seems ideal for this case as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use a ConcurrentLinkedDeque.
Something went awry with the linter but I don't see what. |
… and only anticipate small number of elements
Android Lint was failing as |
Avoid unnecessary SO mapping file uploads for ABI splits
Placeholder e2e tests for Android target
ActivityManager#getRunningTasks
was deprecated on Lollipop and above. This PR changes the automatic Report context so that it is set as the name of the most recently launchedActivity
which is in the started state, or null if this condition cannot be met.