Robolectric 4.9
hoisie
released this
30 Sep 17:15
·
1199 commits
to master
since this release
Robolectric 4.9 adds support for Android T (API level 33).
This release removes shadows supportv4 module fully.
It also installs the Conscrypt as the primary Security provider. See http://robolectric.org/blog/2022/09/06/Umesh-GSoC-on-ConscryptMode/ for details.
4.9 also turns on NATIVE sqlite mode by default for Mac and Linux. Windows will continue to use the LEGACY SQLite mode.
What's Changed
- Enable integration_tests:sparsearray tests by @utzcoz in #7006
- Enable CI when PRs are made to the 'google' branch by @hoisie in #7164
- Add triggerOnReadyForSpeech() to ShadowSpeechRecognizer. #7163
- Bump gradle-versions-plugin to 0.42.0 by @utzcoz in #6970
- Clean up tests.yml by @utzcoz in #7161
- Block
UiController#loopMainThreadUntilIdle
on registered idling resources being idle. #7148 - Return non-zero pointer from
nCreateTextureLayer
#7166 - Correctly register all idling resources #7167
- Update README.md to declare Robolectric supports SDK 32 by @utzcoz in #7169
- Indicate windows are visible by default (flag enabled) #7179
- Add documentation to run tests on Emulator by @utzcoz in #7162
- Restore accidentally deleted link to building Robolectric #7183
- Ensure getNetworkCountryIso & getSimCountryIso return lowercase only, to match the actual APIs. #7184
- Update RoboLocationRequest equals() and toString(). #7186
- Centralize the Injector logic to load the native runtime #7198
- Fixed PFD testGetFd_canRead test failed on macOS. by @ZSmallX in #7202
- Optimize CI a bit by @Goooler in #7195
- Clean up ctesque by @utzcoz in #7145
- Clean up ShadowDefaultRequestDirectorTest.java by @utzcoz in #7208
- Bump Gradle to 7.4.2 by @utzcoz in #7207
- Remove unused Exception from example in README.md by @utzcoz in #7206
- Error prone and google format fix annotation module by @hellosagar in #7154
- Update CI to use JDK 11.0.14 by @hoisie in #7213
- Support Canvas#drawRect with RectF by @Akshay2131 in #7210
- Remove maxSdk restrition for ShadowBiometricManager#canAuthenticate implementation by @utzcoz in #7211
- Switch to run tests on Emulator with SDK 29,32 by @utzcoz in #7170
- Support JDK 1.8 in ShadowWrangler invokespecial logic #7219
- build: bump errorprone plugin version from 1.3.0 to 2.0.2 by @hellosagar in #7218
- Bring integration_tests to API 32 by @utzcoz in #7217
- Add method expectLogMessagePatternWithThrowableMatcher to ExpectedLogMessagesRule so that users can check for a Throwable, as well as a log message pattern. #7221
- Add javadoc for DefaultShadowPicker by @hoisie in #7222
- Add SdkSuppress to some tests in ThemeTest and MotionEventTest by @hoisie in #7227
- Removed
targetSdk
from AndroidManifest.xml by @Umesh-01 in #7232 - Add getCurrentSyncs() in ShadowContentResolver by @Akshay2131 in #7225
- Make deep copy of mPointerProperties for NativeInput#copyFrom by @utzcoz in #7251
- Remove empty ShadowTextPaint by @utzcoz in #7250
- Migrate compileSdkVersion to compileSdk by @Akshay2131 in #7253
- Ensure ShadowActivity can work with project targetSdk less than S by @utzcoz in #7254
- Deprecate is___Intent methods of ShadowPendingIntent #7276
- Invoke the real View.draw(Canvas) from ShadowView.draw(Canvas) #7279
- Add looper mode assertions to
ShadowChoreographer
methods #7278 - Inline ShadowBitmapFactory#decodeByteArray by @utzcoz in #7285
- Skip to generate shadowOf for ShadowBackdropFrameRenderer by @utzcoz in #7284
- Add voice interactions support to ShadowVoiceInteractor #7299
- Bump guava to 31.1-jre by @utzcoz in #7288
- Improve the friendliness of code names for Util.java by @utzcoz in #7296
- Add shadows for createOnDeviceSpeechRecognizer and isOnDeviceRecognitionAvailable. #7303
- Deprecated Util#intArrayToList by @utzcoz in #7307
- Add Shadow implementation for ShadowApplicationPackageManager.getGroupOfPlatformPermission #7313
- Add support for changing NetworkSpecifier in NetworkCapabilities by @bacecek in #7298
- Migrate testRuntime to testRuntimeOnly by @utzcoz in #7314
- Add several new methods to ShadowPaint by @bacecek in #7309
- Fix non-determinism in ShadowContentResolverTest by @hoisie in #7315
- Tweak some tests in EspressoTest by @hoisie in #7316
- Remove deprecated ShadowPackageManager.getPackageInfoForTesting #7318
- Add baseline test cases for successfully expecting error and warn level logs using ExpectedLogMessagesRuleTest. #7330
- Implements methods isVoicemailNumber() and getVoicemailNumber() of ShadowTelecomManager. #7331
- Print log when skipping test because of legacy resource mode from P by @utzcoz in #7334
- Change the top level project name from parent to robolectric by @hellosagar in #7347
- Remove deprecated shadows/support-v4 by @utzcoz in #7339
- Use compat-target module to test compatibility from SDK 28 by @utzcoz in #7100
- [utils module] [Test conversion] Scheduler test by @hellosagar in #7235
- [utils module] [Test conversion] Pref stats collector test by @hellosagar in #7237
- [utils module] [Test conversion] Temp Directory test by @hellosagar in #7236
- [utils module] [Test conversion] Plugin finder test by @hellosagar in #7238
- [utils module] [Test conversion] Service finder adapter test by @hellosagar in #7239
- Extract auto-service version to gradle.properties by @utzcoz in #7352
- Removed NO_REBUILD option by @Umesh-01 in #7355
- Update ShadowView.setLayerType to call the real underlying implementation #7356
- Support test methods that have parameters #7358
- Use API level int for equality and hashing #7361
- Set Bitmap default density to qualifiers value #7372
- Replace Bouncycastle arrays with Java arrays by @akhilrm in #7364
- Use JDK 11 instead of 11.0.14 for CI by @utzcoz in #7365
- Prototype GMD configuration with plugin by @utzcoz in #7349
- Migrate ARTIFACT_FORMAT to ARTIFACT_TYPE_ATTRIBUTE by @utzcoz in #7385
- Inline me inliner warning fix by @hellosagar in #7382
- [warning] Equals get class warning fix by @hellosagar in #7381
- [warning] Empty catch warning fix by @hellosagar in #7379
- [warning] Byte buffer backing array warning fix by @hellosagar in #7368
- Fix simulating window focus on android T. #7389
- [warning] Do not call suggester warning suppress by @hellosagar in #7377
- [Warning] Bad import warning fix by @hellosagar in #7373
- Migrate *SdkVersion to *Sdk by @utzcoz in #7398
- Migrate ActivityTestRule to ActivityScenario by @akhilrm in #7407
- Adds CameraInfo#canDisableShutterSound to the set of values returned from ShadowCamera#getCameraInfo(). #7409
- [warning] InlineMeSuggester warning fix by @hellosagar in #7386
- Clean up ExpectedLogMessagesRuleTest by @utzcoz in #7419
- Fix code formatting for some SQLite tests by @utzcoz in #7417
- Run runConfigureICU with sh explicitly on Windows by @utzcoz in #7418
- Restructure androidx_test with sharedTest pattern by @utzcoz in #6948
- Bump Espresso to 3.5.0-alpha07 by @utzcoz in #7429
- chore: Set permissions for GitHub actions by @naveensrinivasan in #7425
- chore: Included githubactions in the dependabot config by @naveensrinivasan in #7430
- [warning] ThreadLocalUsage warning fix by @hellosagar in #7406
- [warning] StringSplitter warning fix by @hellosagar in #7405
- [warning] UnnecessaryParentheses warning fix by @hellosagar in #7403
- Add SuppressWarnings for a few NewApi warnings by @JuliaSullivanGoogle in #7433
- Add a test for TileService.requestListeningState #7437
- Implement UsbManager#openDevice and UsbManager#hasPermission(UsbAccessory) #7445
- Rollback of ShadowUsbRequest and ShadowUsbDeviceConnection #7448
- Implements ShadowUsbRequest and ShadowUsbDeviceConnection #7451
- Implement missing ShadowNativeSQLiteConnection.nativeClose #7454
- Add Bundle options to ShadowPendingIntent by @adaext in #7458
- Respect permissions granted by
ShadowContextWrapper.grantPermissions()
when sending broadcasts to receivers with permissions. #7463 - Conscrypt Testing - to run all of the tests on VMs by @Umesh-01 in #7450
- Avoid calling reflector as part of object finalization #7465
- Update ActivityScenario.launch() to remove BootstrapActivity #7264
- Rollback update ActivityScenario.launch() to remove BootstrapActivity #7468
- Remove '@ignore' from EspressoTest by @hoisie in #7470
- Fix sharedTest pattern configuration for androidx_test by @utzcoz in #7431
- [warning] MissingSummary warning fix by @hellosagar in #7399
- [warning] InvalidInlineTag warning fix by @hellosagar in #7392
- Prepare to block explicit intents if they don't match intent filters on T+. #7486
- Retry connectedCheck on CI maximum three time by @utzcoz in #7474
- Add setSessionActiveState and getAllSessionCallbacks API to ShadowPackageInstaller. #7491
- Bump spotless to 6.9.1 by @utzcoz in #7498
- Fix ActivityNotFoundException in ActivityScenario in API 33 #7534
- Redo update ActivityScenario.launch() to remove BootstrapActivity #7536
- Post call to recreate activity #7535
- Implement
ShadowUiAutomation#setRotation
#7537 - Add support for the onTopResumedActivityChanged in ActivityController #7539
- Make ResolveInfo generated by the shadow not crash on toString(). #7540
- Add shadow method for VMRuntime.getNotifyNativeInterval #7541
- Add shadow methods for {g,s}etActiveDevice for BluetoothHeadset and BluetoothA2dp #7542
- Use the new
getDeclaredField
helper in more parts of ReflectionHelpers #7544 - Conscrypt as default Security Provider [Updated] by @Umesh-01 in #7492
- Idle main looper in AndroidX Fragment memory leak test #7547
- Added simulateSynthesizeToFileResult to support testing success, error and queued states. #7548
- Avoid calling the real DisplayManagerGlobal constructor in RNG #7549
- Store CallAudioState in FakeTelecomServer, instead of storing across various Shadow classes. #7550
- Change calls to
Truth.assertThat(java.lang.Boolean)
that ignore the result to callisTrue()
on it instead. #7553 - Fix kotlinVersion typo by @utzcoz in #7554
- Implement ShadowBluetoothDevice#getBatteryLevel for O_MR1+ #7555
- Make ValueCallbacks in RoboCookieManager nullable by @tinsukE in #7473
- [warning] UnusedMethod warning fix by @hellosagar in #7402
- [warning] UnnecessaryLambda warning fix by @hellosagar in #7404
- [warning] InvalidBlockTag warning fix by @hellosagar in #7393
- [warning] VariableNameSameAsType warning fix by @hellosagar in #7401
- Fix logspam in RobolectricTestRunnerMultiApiTest by @hoisie in #7563
- [warning] Catch and print stack trace warning fix by @hellosagar in #7370
- Reorder if statements in ShadowRegion.equals by @hoisie in #7566
- Remove unused test code by @hoisie in #7568
- Fix Javadoc for BackgroundTestRule by @hoisie in #7569
- [warning] DefaultCharset warning fix by @hellosagar in #7376
- [warning] Unused variable warning fix by @hellosagar in #7374
- [warning] JavaLangClash warning fix by @hellosagar in #7394
- [warning] EmptyBlockTag warning fix by @hellosagar in #7391
- Add support for FontFamily.getFont #7574
- GitHub Workflows security hardening by @sashashura in #7573
- [Warning] Eliminated AlmostJavadoc warnings across project by @hellosagar in #7354
- [warning] JavaUtilDate warning fix by @hellosagar in #7395
- Revert some method signature updates for Android T #7580
- Update Robolectric to be compiled against Android T by @hoisie in #7582
- Add support for two GNSS APIs to ShadowLocationManager. #7584
- Add test for RoboCookieManager#setCookie with null callback by @utzcoz in #7587
- [warning] RethrowReflectiveOperationExceptionAsLinkageError warning fix by @hellosagar in #7400
- Suppress RethrowReflectiveOperationExceptionAsLinkageError for Danger11Plus by @utzcoz in #7589
- Bump AGP to 7.2.2 by @utzcoz in #7499
- Add support for DevicePolicyManager in Android T #7592
- Parse
idx
andoffset
correctly from sparse resource entries #7594 - Deprecate and un-shadow ShadowScanResult class. #7603
- Bump AGP to 7.3 by @utzcoz in #7384
- Remove dead code that uses Plan based instrumentation (ClassHandler.Plan) #7610
- Run SDK 33 tests on CI by @utzcoz in #7613
- Bump maximum API for GMD to SDK 33 by @utzcoz in #7614
- Remove use-sdk from androidx_test/sharedTest/AndroidManifest.xml by @utzcoz in #7615
- [Warning] Eliminated AnnotateFormatMethod warnings by @hellosagar in #7353
- Remove 0x prefix for string format log by @utzcoz in #7617
- Bump compile/targetSdk to 33 by @utzcoz in #7616
- Remove unused Exception for ShadowActivityTest by @utzcoz in #7618
- Support Activity setShowWhenLocked() and setTurnScreenOn() by @utzcoz in #7438
- Exclude kotlin-stdlib dependency from utils generated .pom by @utzcoz in #7607
- Move dependencies of shadows/framework to gradle.properties by @utzcoz in #7627
- Bump ASM to 9.3 by @utzcoz in #7626
- Add the ability to deploy specific preinstrumented jars to maven by @hoisie in #7602
- Combine exceptions for ReflectionHelpers#getDeclaredField by @utzcoz in #7634
- Clean up ShadowAccountManager by @utzcoz in #7636
- Migrate Gradle dependencies to dependencies.gradle by @utzcoz in #7635
- Add alternative to Unsafe.defineAnonymousClass by @utzcoz in #7633
- Support all authentication results for BiometricManager by @charlesng in #7427
- Bump bcprov-jdk15on from 1.68 to 1.70 by @dependabot in #7638
- Bump constraintlayout from 2.1.3 to 2.1.4 by @dependabot in #7640
- Reuse bytecode of ClassWriter for ProxyMaker by @utzcoz in #7643
- Migrate instance calling in ReflectionHelpers to lambda by @utzcoz in #7644
- Bump compile-testing from 0.18 to 0.19 by @dependabot in #7645
- Bump apiCompatVersion from 4.7 to 4.8.2 by @dependabot in #7647
- Bump gson from 2.8.6 to 2.9.1 by @dependabot in #7646
- Bump core from 1.5.0 to 1.9.0 by @dependabot in #7649
New Contributors
- @Goooler made their first contribution in #7195
- @hellosagar made their first contribution in #7154
- @Akshay2131 made their first contribution in #7210
- @Umesh-01 made their first contribution in #7232
- @bacecek made their first contribution in #7298
- @akhilrm made their first contribution in #7364
- @naveensrinivasan made their first contribution in #7425
- @adaext made their first contribution in #7458
- @tinsukE made their first contribution in #7473
- @sashashura made their first contribution in #7573
- @charlesng made their first contribution in #7427
- @dependabot made their first contribution in #7638
Full Changelog: robolectric-4.8...robolectric-4.9-alpha-1