diff options
author | Tsung-Mao Fang <tmfang@google.com> | 2022-03-03 09:22:03 +0000 |
---|---|---|
committer | Tsung-Mao Fang <tmfang@google.com> | 2022-03-03 11:49:49 +0000 |
commit | 14484e29bf3983e5d9f3545aed06ed653b19f680 (patch) | |
tree | 6573e33bc88f5382ef3a132b2d7deb8daed4efb6 | |
parent | 613bd9d6462b763bd4973e848c1fd2c36f016fd0 (diff) | |
download | robolectric-shadows-14484e29bf3983e5d9f3545aed06ed653b19f680.tar.gz |
Do not instrument class under androidx.lifecycle
Change-Id: Idba4abf42dd9c93f656ca00bb7f1415449bba66a
Test: Run robo tests for settings project
Fix: 221885823
-rw-r--r-- | robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java b/robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java index 7c54f4760..69afa6458 100644 --- a/robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java +++ b/robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java @@ -104,9 +104,10 @@ public class AndroidConfigurer { // This results in an error where two __robo_data__ fields get added to the same object. builder.doNotInstrumentPackage("androidx.room.migration"); builder.doNotInstrumentPackage("androidx.test"); - // Robolectric instrumentation causes issues with the - // androidx.lifecycle.viewmodel.MutableCreationExtras constructor. - builder.doNotInstrumentPackage("androidx.lifecycle.viewmodel"); + // Robolectric instrumentation causes issues with + // androidx.lifecycle.viewmodel.MutableCreationExtras and androidx.lifecycle.ViewModelProvider + // constructor. + builder.doNotInstrumentPackage("androidx.lifecycle"); builder.doNotInstrumentPackage("android.arch.persistence.room.migration"); builder.doNotInstrumentPackage("android.support.test"); |