-
Notifications
You must be signed in to change notification settings - Fork 61
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
RUM-4148 Add support to the Toolbar in Session Replay #2024
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2024 +/- ##
===========================================
- Coverage 83.55% 83.51% -0.04%
===========================================
Files 478 482 +4
Lines 17576 17586 +10
Branches 2672 2671 -1
===========================================
+ Hits 14684 14686 +2
- Misses 2164 2171 +7
- Partials 728 729 +1
|
...replay/src/main/kotlin/com/datadog/android/sessionreplay/internal/DefaultRecorderProvider.kt
Show resolved
Hide resolved
import android.annotation.SuppressLint | ||
import android.graphics.drawable.Drawable | ||
|
||
internal class ActionBarContainerDrawableAccessor( |
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.
minor: maybe add Datadog
to the name? unlikely that the class named ActionBarContainerDrawableAccessor
will ever appear in Android codebase, but who knows.
// ActionBarContainer class. | ||
// Fortunately, the mBackground field we're interested in is package private, | ||
// which allows us to access it. | ||
// val background = backgroundField?.get(view) as? Drawable |
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.
leftover?
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.
Yep
val shapeStyle = background?.let { resolveShapeStyle(it, view.alpha) } | ||
val id = viewIdentifierResolver.resolveChildUniqueIdentifier(view, PREFIX_BACKGROUND_DRAWABLE) | ||
|
||
if ((shapeStyle != null) && (id != null)) { |
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.
minor: extra brackets
} | ||
|
||
@SuppressLint("RestrictedApi") | ||
fun setBackgroundDrawabal(drawable: Drawable) { |
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.
typo in the method name
fun setBackgroundDrawabal(drawable: Drawable) { | |
fun setBackgroundDrawable(drawable: Drawable) { |
What does this PR do?
This PR allows sessin replay to capture the content of a Toolbar.
ActionBarContainer
's background