Fixed
Status Update
Comments
su...@gmail.com <su...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 19b15188d2c730d65e6a1e24e5df26bcfd1bffa7
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Tue Apr 30 17:27:38 2019
Add a delegating WorkerFactory which can delegate to other WorkerFactories.
Test: Added unit tests.
Fixes: b/131435993
Change-Id: Id55dfca1ea4461b2bf2d7da2356c6cce9af22507
M work/workmanager/api/2.1.0-alpha01.txt
M work/workmanager/api/current.txt
M work/workmanager/build.gradle
A work/workmanager/src/androidTest/java/androidx/work/DelegatingWorkerFactoryTest.kt
A work/workmanager/src/main/java/androidx/work/DelegatingWorkerFactory.java
M work/workmanager/src/main/java/androidx/work/WorkerFactory.java
https://android-review.googlesource.com/954186
https://goto.google.com/android-sha1/19b15188d2c730d65e6a1e24e5df26bcfd1bffa7
Branch: androidx-master-dev
commit 19b15188d2c730d65e6a1e24e5df26bcfd1bffa7
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Tue Apr 30 17:27:38 2019
Add a delegating WorkerFactory which can delegate to other WorkerFactories.
Test: Added unit tests.
Fixes:
Change-Id: Id55dfca1ea4461b2bf2d7da2356c6cce9af22507
M work/workmanager/api/2.1.0-alpha01.txt
M work/workmanager/api/current.txt
M work/workmanager/build.gradle
A work/workmanager/src/androidTest/java/androidx/work/DelegatingWorkerFactoryTest.kt
A work/workmanager/src/main/java/androidx/work/DelegatingWorkerFactory.java
M work/workmanager/src/main/java/androidx/work/WorkerFactory.java
su...@gmail.com <su...@gmail.com> #3
So if I understand this correctly, this enables us to add more worker factory at runtime?
il...@google.com <il...@google.com> #4
This enables the use-case where a library that uses WorkManager uses a different WorkerFactory. So an application could add the library provided WorkerFactory to the list of delegates.
ku...@gmail.com <ku...@gmail.com> #5
You should add your libraries at startup, not at some point after your app and WorkManager have been initialized.
jb...@google.com <jb...@google.com> #6
Thank you for the pull request! This has been added internally and will be a part of the next Fragment alpha release.
a....@gmail.com <a....@gmail.com> #7
I know the ticket is closed but ..
if you call getLayoutInflater from onCreate method (not onCreateDialog) you may have a crash.
because getLayoutInflator goes to onGetLayoutInflater and then it can go to onCreateDialog (even though the entry point is onCreate dialog)
if you call getLayoutInflater from onCreate method (not onCreateDialog) you may have a crash.
because getLayoutInflator goes to onGetLayoutInflater and then it can go to onCreateDialog (even though the entry point is onCreate dialog)
Description
When using a method from
DialogFragment
, if you want to get aLayoutInflater
, you should always call thegetLayoutInflater()
Fragment
.Using can return a
LayoutInflater.from(Context)
LayoutInflater
that does not have the correct theme.It would be nice if there was a lint rule, that caught all calls to
LayoutInflater.from(Context)
and suggested to usegetLayoutInflater()
instead.