Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
When building a test worker using TestListenableWorkerBuilder the worker factory set using setWorkerFactory is only use to create WorkerParameters and the defaultFactory is used to build the Worker instance.
```
val workerBuilder = TestWorkerBuilder(applicationContext, executor)
workerBuilder.setWorkerFactory(object: WorkerFactory() {
override fun createWorker(
appContext: Context, workerClassName: String, workerParameters: WorkerParameters
): ListenableWorker? = MyWorker(appContext, workerParameters, dependency)
})
```
TestListenableWorkerBuilder.build() should call and use `getWorkerFactory()` and fallback to WorkerFactory.getDefaultWorkerFactory();
```
val workerBuilder = TestWorkerBuilder(applicationContext, executor)
workerBuilder.setWorkerFactory(object: WorkerFactory() {
override fun createWorker(
appContext: Context, workerClassName: String, workerParameters: WorkerParameters
): ListenableWorker? = MyWorker(appContext, workerParameters, dependency)
})
```
TestListenableWorkerBuilder.build() should call and use `getWorkerFactory()` and fallback to WorkerFactory.getDefaultWorkerFactory();
il...@google.com <il...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 79a9f772da4adcac1bfc11ea0ace9e16badc0858
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Mon Jun 17 13:25:28 2019
Use the correct WorkerFactory when creating an instance of a ListenableWorker.
Fixes: b/135275844
Test: Added unit tests.
Change-Id: I1aed7adf4aabad3c011ead6afb1ce38081ef7d86
M work/workmanager-testing/src/androidTest/java/androidx/work/testing/TestWorkerBuilderTest.kt
M work/workmanager-testing/src/main/java/androidx/work/testing/TestListenableWorkerBuilder.java
https://android-review.googlesource.com/984775
https://goto.google.com/android-sha1/79a9f772da4adcac1bfc11ea0ace9e16badc0858
Branch: androidx-master-dev
commit 79a9f772da4adcac1bfc11ea0ace9e16badc0858
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Mon Jun 17 13:25:28 2019
Use the correct WorkerFactory when creating an instance of a ListenableWorker.
Fixes:
Test: Added unit tests.
Change-Id: I1aed7adf4aabad3c011ead6afb1ce38081ef7d86
M work/workmanager-testing/src/androidTest/java/androidx/work/testing/TestWorkerBuilderTest.kt
M work/workmanager-testing/src/main/java/androidx/work/testing/TestListenableWorkerBuilder.java
we...@salesforce.com <we...@salesforce.com> #4
Thank you all for the resolution! Have a great day.
Description
Hello, in a security audit we found an instance of insecure Random Number Generator.
File androidx/activity/result/ActivityResultRegistry.java near line 25:
This is the report we got:
Category Cryptography and Insecure Storage
Testing Method Black Box
Tools Used Apktool, dex2jar, jd-gui
Component used: Activity
Version used: 1.8
Devices/Android versions reproduced on: Android api 31.
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).