Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cwa App Android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Foertsch
Cwa App Android
Commits
c189160c
Commit
c189160c
authored
4 years ago
by
Mohamed Metwalli
Browse files
Options
Downloads
Patches
Plain Diff
Fix injection crash in UI tests on pre Android 11
parent
f7e573bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Corona-Warn-App/src/androidTest/java/testhelpers/TestApplication.kt
+5
-3
5 additions, 3 deletions
...n-App/src/androidTest/java/testhelpers/TestApplication.kt
with
5 additions
and
3 deletions
Corona-Warn-App/src/androidTest/java/testhelpers/TestApplication.kt
+
5
−
3
View file @
c189160c
...
...
@@ -30,12 +30,14 @@ class TestApplication : Application(), HasAndroidInjector {
private
fun
setupActivityHook
()
{
registerActivityLifecycleCallbacks
(
object
:
ActivityLifecycleCallbacks
{
override
fun
onActivityPreCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{
override
fun
onActivityPreCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
=
Unit
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{
Timber
.
d
(
"onActivityCreated"
)
setupFragmentHook
(
activity
)
Timber
.
d
(
"FragmentHook injection is called"
)
}
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
=
Unit
override
fun
onActivityStarted
(
activity
:
Activity
)
=
Unit
override
fun
onActivityResumed
(
activity
:
Activity
)
=
Unit
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment