Skip to content
Compare
Choose a tag to compare

This is a minor release that fixes #7286, a NoClassDefError that can occur. Thanks for @utzcoz for the fix (#7284).

Robolectric 4.8 adds support for Android S V2 (API level 32). It also contains many bug fixes and API enhancements.

What's Changed

  • Turn off Gradle's fs watching during tests by @hoisie in #6849
  • Remove unused resources.arsc file by @hoisie in #6855
  • Fix name for macOS tasks to rename and upload binary files by @utzcoz in #6856
  • Shadow Build.VERSION#MEDIA_PERFORMANCE_CLASS in #6836
  • Support overriding Icon loading executor from Icon#loadDrawableAsync. in #6828
  • Update Android code search link to the public version in #6850
  • Remove unnecessary TimePickerDialog constructor shadow in #6838
  • Remove inaccessible Google issue tracker links in #6854
  • Use Activity's member Instrumentation in ActivityController in #6860
  • Fix UnsupportedOperationException if a leaked Activity.recreate is called in #6862
  • Add ActivityController.close that transitions Activity to destroyed state in #6864
  • Fix SDK version check for onPageFinished() call. It should be available for all SDK versions instead. See https://developer.android.com/reference/android/webkit/WebViewClient#onPageFinished(android.webkit.WebView,%20java.lang.String) in #6865
  • Limit instrumentation on interfaces in #6866
  • Bump to version 3 of preinstrumented jars by @hoisie in #6867
  • Migrate ShadowAccessibilityNodeInfo to reflector in #6868
  • Add perf stat for applying styles in binary resources in #6869
  • Refine methods: getYear(), getMonthOfYear(), getDayOfMonth() and getOnDateSetListenerCallback(). in #6841
  • Add onConnectionEvent() to ShadowInCallService. in #6870
  • Fix theme native object collection in Android S in #6873
  • Use a self-hosted Mac M1 runner for the build_nativeruntime task by @hoisie in #6871
  • Use 'processResources' task instead of 'jar' task for nativeruntime by @hoisie in #6874
  • Remove unused Exception from test methods for dependency-on-stubs by @utzcoz in #6876
  • Add solution log for unhandled PNG file by @utzcoz in #6829
  • Remove instrumentedPackages workaround by @hoisie in #6875
  • Remove unused org.robolectric.annotation.Config imports by @hoisie in #6879
  • Only using AttributionSource for compile sdk 31 and above by @utzcoz in #6884
  • Clear InputMethodManager.sInstance for SDK > P in #6880
  • Adding VcnManagementService to ShadowSystemServices for VCN-related tests. in #6881
  • Check Window flags when selecting root view in LocalUiController. #6741 in #6745
  • Cleanup of AndroidManifest Activity references. in #6878
  • Fix broken GitHub CI when running tests by @hoisie in #6893
  • Fix some lint errors in Target29CompatibilityTest by @hoisie in #6891
  • Avoid re-running ICU ./configure if Makefile exists by @hoisie in #6889
  • Remove redundant SKIP_ICU_BUILD environment variable by @hoisie in #6890
  • Remove unnecessary DatePickerDialog constructor shadow in #6897
  • Add matrix computation support to ShadowRenderNode implementations in #6775
  • Add support for building Robolectric's nativeruntime with gcc/g++ in #6900
  • Switch to Ninja for building the native runtime in #6904
  • Close android.database.Cursor objects in tests in #6905
  • Fix remaining CloseGuard warnings in Robolectric tests in #6906
    1. Adds ShadowVibrator#addSupportedPrimitives to enable in #6907
  • Use real Android code for ContentProviderClient.release in #6908
  • Update platformStrError to work in Windows in #6910
  • Add setIsUniqueDeviceAttestationSupported and isUniqueDeviceAttestationSupported support to ShadowDevicePolicyManager in #6909
  • Add custom JNI_INCLUDE_DIRS for Windows only by @utzcoz in #6914
  • Use runner.arch when calculating ICU cache keys by @hoisie in #6894
  • Add test ShadowPackageManagerTest#packageInstallerAndGetPackageInfo by @utzcoz in #6898
  • fix for NPE when ShadowLegacyAssetManager is used by @kenyee in #6918
  • Remove specific clang/clang++ env for build_native_runtime.yml by @utzcoz in #6924
  • Support nativeruntime building for Windows by @utzcoz in #6801
  • Handle more values in ShadowSystemProperties.getBoolean in #6915
  • Update the windowConfiguration bounds when updating the display metrics in #6922
  • Add shadows for UwbManager and RangingSession. in #6926
  • Make two small improvements to ShadowMatrixTest in #6929
  • Remove ServiceFinder in #6931
  • Bump AGP to 7.1.0-beta05 by @utzcoz in #6927
  • Bump SDK to 31 for integration_tests if possible by @utzcoz in #6928
  • Remove explicit binary mode declaration for affected test modules by @utzcoz in #6943
  • Remove specific clang/clang++ env for tests.yml by @utzcoz in #6945
  • Creating ShadowVcnManager for vcn-related testing. in #6932
  • Add READ_PHONE_STATE permission check to ShadowTelephonyManager.getVoiceNetworkType in #6935
  • Update ShadowAppOpsManager to allow for multiple invocations of startWatching for a single listener. in #6936
  • Add shadows for ImageReader and SurfaceTexture. Invoke updates from Surface to linked clients. in #6937
  • Fix typo in #6938
  • Add CI job to build nativeruntime for Windows by @utzcoz in #6923
  • Intercept native Font states at Java level for Android S by @utzcoz in #6954
  • Add regression test for mockito spy by @utzcoz in #6942
  • Remove unused Exception from test methods for XmlResourceParserImplTest by @utzcoz in #6946
  • Merge defaultConfig for ctesque build.gradle by @utzcoz in #6949
  • Use guavaJREVersion from gradle.properties for some modules by @utzcoz in #6952
  • Use version from gradle.properties for shadows:playservices by @utzcoz in #6951
  • Call onSaveInstanceState after onStop from API P by @utzcoz in #6940
  • Add perf stats for loading plugins and loading the native runtime in #6947
  • Add two S-specific test cases for ShadowDevicePolicyManager in #6956
  • Fix class description. in #6957
  • Support NotificationManager.addAutomaticZenRule that could add AutomaticZenRule without owner,but has configurationActivity. in #6958
  • Add plumbing for source resource id getter in #6959
  • Add ShadowConnection that records the last event sent through Connection.sendConnectionEvent. in #6964
  • Bump AGP to 7.1.0-rc01 by @utzcoz in #6955
  • Remove unused exception from tests for SQLiteLibraryLoaderTest by @utzcoz in #6968
  • Clean up androidx_test by @utzcoz in #6969
  • set createdFromBytes also when using decodeByteArray with options by @edwinvanderham in #6972
  • Move ShadowWranglerIntegrationTest.ShadowFooParent to sandbox testing package in #6973
  • Use invokespecial when invoking shadow constructors in #6979
  • Add a ShadowCloseGuard and CloseGuardRule for verifying all CloseGuards have been closed in #6980
  • Trigger listeners for ServiceState in TelephonyManager.listen in #6981
  • Tweak precondition check in NotificationManager.updateAutomaticZenRule by @hoisie in #7003
  • Makes sparse array implement the set() method for all api levels by adding the byte code for it in the ClassInstrumentor. by @JuliaSullivanGoogle in #6963
  • Intercept the getInt$() and setInt$(int) functions on FileDescriptor by @hoisie in #7002
  • Simplify SparseArray.set instrumentation by @hoisie in #7004
  • Retain outer class assignment in the constructor in #6984
  • Add FileDescriptor transform to ShadowMediaMetadataRetriever. in #6985
  • Add shadow method for WifiManager.isStaApConcurrencySupported in #6986
  • Update ShadowVcnManager to support VcnConfig setting and subscription group (ParcelUuid) setting. in #6987
  • Fix signature for ShadowPausedMessageQueue 'enqueueMessage' reflector in #6988
  • Allows calling clearVcnConfig() when the vcnConfig being cleared is not set. in #6992
  • Enable realistic View matrix calculations by default in #6996
  • Add unregisterStats(path) method in ShadowStatsFs in #7001
  • Bump icu4j to 70.1 by @utzcoz in #6993
  • Bump apiCompatVersion to 4.7 by @utzcoz in #6994
  • Bump AGP to 7.1.0 by @utzcoz in #7007
  • Added JDK prerequisites in README, for contributors to build project. by @ZSmallX in #7009
  • Remove deprecated supportv4 shadows by @utzcoz in #7031
  • Change ShadowAppWidgetManager to use AppWidgetHostView instead of FrameLayout to support ListView / remote collections testing. in #7008
  • Reformat AndroidInterceptors in #7010
  • Add shadow for SurfaceControl#nativeCreate in #7012
  • Changes ShadowActivity to use reflector instead of using direct reflection to call certain methods by @JuliaSullivanGoogle in #7040
  • Add a test case for spying on a shadowed object in #7013
  • Trigger an asynchronous broadcast of scan results in WifiManager.startScan in #7015
    1. Stores VibrationAttributes in ShadowVibrator and exposes a getter getVibrationAttributesFromLastVibration to get VibrationAttributes for the last vibration. in #7018
  • Make loading the native runtime extensible in #7021
  • Return null for external files directory if external storage is unavailable in #7022
  • Fix touch event dispatch to not go to out of bounds non touch modal windows in #7025
  • Add getShareTitle() and getShareDescription() to ShadowBugreportManager, set in #7024
  • Add shadow for CompanionDeviceManager in #7030
  • Add support for new S ProviderProperties APIs. in #7029
  • Make deprecation comment in RuntimeEnvironment.application refer to RuntimeEnvironment.getApplication() instead of androidx.test.core.app.ApplicationProvider#getApplicationContext in #7033
  • Added register/unregister callback shadows for CameraManager. in #7035
  • Return Number from ShadowSurfaceControl#nativeCreate to support sdk 18/19 in #7027
  • Fix some lint warnings in #7016
  • Change ShadowBluetoothAdapter to cache getRemoteDevice instances. In android, the state for a given device (uniquely identified by its address) is global. When you have two instances of BluetoothDevice and mutate one, the other will reflect it, even though they are not the same java object. in #7038
  • Add support for touch mode in #7011
  • Return Number from ShadowSurfaceControl#nativeCreate to support sdk 18/19 by @JuliaSullivanGoogle in #7042
  • Added more prerequisites for robolectic building and testing in README by @ZSmallX in #7079
  • Added junit dependency in README. by @ZSmallX in #7085
  • Migrate AndroidJUnit4 to ext version for ctesque by @utzcoz in #7037
  • Add a task to fetch nativeruntime artifacts from a GitHub CI run by @hoisie in #6895
  • Add integration tests for mokito-kotlin's regression by @ZSmallX in #7086
  • Remove ShadowsPlugin from supportv4/build.gradle by @hoisie in #7092
  • Bump massive dependencies for androidx and androidx_test by @utzcoz in #7093
  • Optimizes getFd and close behaviors for ParcelFileDescriptor by @ZSmallX in #7101
  • Add support for Build.setSerial in ShadowBuild in #7043
  • Add DragEventBuilder helper in #7044
  • Flesh out support for GNSS APIs. in #7039
  • Reduce visibility of ShadowActivity.isFinishing in #7047
  • create ShadowActivity#simulateGetDirectActions for testing assistant requesting DirectAction from an Activity in #7045
  • Add shadow implementations for source resource id getters in #7046
  • Adds a Robolectric property to allow users to build Robolectric without the preinstrumented jars to allow for better testing of new features. in #7000
  • Adds shadow for DisplayHashManager. in #7050
  • Remove enableMatrix=true properties, default is now true in #7051
  • Add interceptor for Reference.refersTo. in #7052
  • Speed up ShadowRcsUceAdapterSTest. in #7056
  • Run google-java-format on ShadowMatrixTest in #7058
  • Make ShadowPackageManager generatePackageInfo extensible. in #7059
  • Removing the onStatusChanged() invoke when VcnStatusCallback is registered. in #7061
  • Sets github's test gradle usePreinstrumentedJars value to false by default. in #7062
  • Add ShadowWindowManagerGlobal#getLastDragClipData method in #7019
  • Update SQLiteConnection shadows to support Android T changes in #7063
  • Update ShadowActivityThread for T in #7064
  • Add T-specific logic for ActivityController.windowFocusChanged in #7065
  • Prepare to adjust for changed BluetoothAdapter.setScanMode signature. in #7066
  • Return the original method's test name in #7067
  • Support new API registerReceiver(BroadcastReceiver receiver, IntentFilter filter, int flags) after O in #7068
  • Add shadows for Settings.Secure.getIntForUser. in #7071
  • ShadowImageReaderTest: Move Config setting to class level since its common for all tests. in #7072
  • Pass through openInputStream calls if a provider for the authority is registered. in #7073
  • Fix for potential race condition in ShadowMediaCodec async mode. in #7074
  • Enable WebView.createWebMessageChannel shadow. in #7070
  • Bump the runtime SDK of shadows:httpclient tests to S in #7075
  • Add new VibrationAttributesBuilder in #7077
  • Add support for new constructor in StorageVolumeBuilder in #7078
  • Create new RangingSessionBuilder in #7076
  • Mimic actual MediaCodec creation logic. in #7082
  • Add unregisterSessionCallback implementation in the PackageInstaller. in #7084
  • Make the ShadowPausedSystemClock thread safe in #7083
  • Add support for new field in DisplayManager BrightnessConfiguration APIs in #7088
  • Make TestParcelable* classes public in #7087
  • Add getThermalStatusListeners() to return registered listener for shadow power manager. in #7091
  • Add USB signaling API override support to ShadowDevicePolicyManager in #7098
  • Remove robolectric.rendernode.enableMatrix flag in #7099
  • Update check_java_formatting action to use Google Java Format 1.15 by @hoisie in #7113
  • Open LocationRequest methods up down to Kitkat when they were first added. in #6761
  • Add getTotalSize, setTotalSize, getBytesSoFar and setBytesSoFar for DownloadManager.Request in ShadowDownloadManager. in #7104
  • Add nCreateTextureLayer to ShadowHardwareRenderer in #7106
  • Add some concurrency tests for ShadowPausedSystemClockTest in #7090
  • Add a test for ActivityNotFoundExceptions in Espresso intents by @hoisie in #7115
  • Add support for getInstallSourceInfo in ShadowPackageManager. The behaviour is independent of existing getInstallerPackage support. in #7103
  • Apply style/lint fixes to mockito-kotlin test code by @hoisie in #7116
  • Use ktfmt to format kotlin code by @utzcoz in #7125
  • Skip ShadowSQLiteConnection test on M1 by @utzcoz in #7054
  • Update minimum requirement toolchain version by @utzcoz in #7131
  • Add implementation for shadows of AccessibilityManagers StateChangeListener by @MichaelEvans in #7094
  • Fix format problem of ShadowAccessibilityManager by @utzcoz in #7137
  • Have ShadowApplicationPackageManager#getPackageArchiveInfo call super() when apiLevel >= T in #7118
  • Fix setTouchExplorationEnabled() not calling onTouchExplorationStateChanged() on the TouchExplorationStateChangeListeners in #7120
  • Adding an overload method to registerReceiver to include flags when registering a receiver with a broadcast permission in #7121
  • Fix bitmap mutable, premutliplied, and alpha properties. in #7122
  • Add @implementation where missing in Robolectric's shadows in #7119
  • Run google-java-format on ShadowTime in #7133
  • Add support for ColorSpace to ShadowBitmap in #7134
  • Add support for Android S V2 in Robolectric by @hoisie in #7132
  • Add a "default" list of system features to ShadowPackageManager in #7135
  • Update ShadowBluetoothDevice to throw an exception if the BLUETOOTH_CONNECT permission isn't granted. in #7117
  • Don't decode image bytes as utf-8 encoded string in #7139
  • Improve support for low-power idle modes in ShaddowAlarmManager in #7138
  • Add support for shadowing TaskInfo#isVisible. in #7142
  • Migrate from strongly discouraged @Test(expected = ...) to assertThrows(...). in #7143
  • Adding ShadowContentCaptureManager to Q+ in #7144
  • Add support for save/restore in ShadowCanvas in #7146
  • Fix TouchExplorationStateChangeListener trigger logic for SDK < O in #7147
  • Migrate ShadowTaskInfo to a builder in #7149
  • Bump preinstrumented jars to version 4 by @hoisie in #7156
  • Re-enable nativeruntime building for Windows by @hoisie in #7157
  • Disable shadowOf generation for DisplayHashManager by @hoisie in #7159
  • 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. in #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. in #7148
  • Return non-zero pointer from nCreateTextureLayer in #7166
  • Correctly register all idling resources in #7167
  • Update README.md to declare Robolectric supports SDK 32 by @utzcoz in #7169
  • Indicate windows are visible by default (flag enabled) in #7179
  • Add documentation to run tests on Emulator by @utzcoz in #7162
  • Restore accidentally deleted link to building Robolectric in #7183
  • Ensure getNetworkCountryIso & getSimCountryIso return lowercase only, to match the actual APIs. in #7184
  • Update RoboLocationRequest equals() and toString(). in #7186
  • Centralize the Injector logic to load the native runtime in #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 in #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. in #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

New Contributors

Full Changelog: robolectric-4.7.3...robolectric-4.8

Use Robolectric:

testCompile "org.robolectric:robolectric:4.8"
Pre-release

*NOTE: Robolectric 4.8-alpha-1 is a outdated preview release; please use 4.8 or later instead.

Compare
Choose a tag to compare

This is a minor release that fixes #6883, a NoClassDefError that can occur if the compileSdk < 31. Thanks for @ninniuz for reporting and @utzcoz for the fix (#6884).

It also fixes a minor case of test pollution, where a single Activity could leak across tests (see 5a1f02a for details).

Compare
Choose a tag to compare

This is a minor release that fixes a memory leak of Theme objects in binary resources for Android S (#6872). Thanks @calvarez-ov for the report and helping debug.

Compare
Choose a tag to compare

This is a minor release that fixes #6858. In that issue, certain Android classes could not be mocked by Mockito due to some changes to Robolectric instrumentation performed on interfaces.

Compare
Choose a tag to compare

Robolectric 4.7 adds support for Android S (API level 31).

Another big feature is support for Apple Silicon (Mac M1). Robolectric 4.7 now contains its own native implementation of the android.database.sqlite package. For Mac M1 machines, this SQLite mode is the default. For other OS's and architecture, use @SQLiteMode(NATIVE) to enable it. This new mode is currently only available for Mac and Linux. Native SQLite should be significantly faster, around 50-90% faster for SQLite operations, than the LEGACY SQLite mode. There were also several other performance improvements made for SQLite operations -- #6687, #6690, and #6711 (thanks @al-broco!).

The support v4 shadows are also deprecated at this release, and they will be removed at Robolectric 4.8.

Robolectric 4.7 also supports JDK 17.

What's Changed

  • Clear cookies after test finished for CookieManagerTest by @utzcoz in #6581
  • Only using ApplicationExitInfo for compile sdk 30 and above by @utzcoz in #6590
  • Rebase PR 4064 - Fix NPE during saving state of WebView by @utzcoz in #6597
  • Converting the String version of directlyOn(...) to @direct with reflector(...). by @hoisie in #6598
  • Add ITelephonyRegistry to ShadowServiceManager #6605
  • Implement new #startActivity methods for ShadowCrossProfileApps. #6601
  • Add ShadowMediaExtractor. #6592
  • Converting onVsync calls from ReflectionHelpers to use @direct with reflector(...) instead. #6602
  • Update ShadowDisplayEventReceiver to support S #6609
  • Converting the proxy version of directlyOn(...) to @direct with reflector(...). by @hoisie in #6610
  • Fix Robolectric camera shadows to work with newer SDK versions. #6611
  • Converting recycleUnchecked calls to use @direct with reflector(...) in place of ReflectionHelpers. #6603
  • Cleaning up unnecessary @direct annotations in DirectActivityReflector. #6616
  • Fixing the incorrect method signature in AssetManagerReflector that breaks GitHub CI. #6612
  • No longer automatically log everything in ShadowLog if stream is specified #6617
  • Support IntBuffer with copyPixelsFromBuffer #6613
  • Suppress missing /system/etc/fonts.xml log noise for SDK 27 #6618
  • Add perf stats for reflector class definition #6624
  • Use Object to replace GnssAntennaInfo.Listener at ShadowLocationManager by @utzcoz in #6623
  • Trimming the localrepository string. by @Squadella in #6653
  • Merging the the separate Reflector interfaces for Message into one main interface. #6619
  • Remove OldClassInstrumentor #6621
  • Remove unnecessary ShadowLegacyMessage.isInUse #6626
  • Converting directlyOn(...) to @direct with reflector(...) in ShadowWindow and ShadowPhoneWindow. #6625
  • Intercept calls to methods in {@link Socket} not present in the OpenJDK. #6622
  • Use bulk operations in copyPixels{to,from}Buffer #6628
  • Improve reflector caching using a regular HashMap #6629
  • Add shadow method ShadowLauncherApps#getShortcutConfigActivityList. #6631
  • Add OnPermissionChangedListener implementation to ShadowPackageManager. #6627
  • Update minSdkVersion to 14 in some integration_test manifests #6630
  • Merge InvokeDynamicClassInstrumentor into ClassInstrumentor #6632
  • Add a shadow method for PackageManager#getText which gets a String associated with package name and resource id. #6634
  • Pass through openInputStream calls for SCHEME_ANDROID_RESOURCE #6636
  • Names thread used by ShadowFileObserver to match behavior of FileObserver. #6640
  • Migrate from AnnotationValue#toString to auto-common's AnnotationValues.toString. #6638
  • Fix fidelity issue with Cursor.getBlob on a String column #6641
  • Remove InvokeDynamic perf stats #6644
  • Fix SQLiteDatabaseTest foreign key test to match Android behavior #6643
  • Add cardId support for ShadowEuiccManager. #6642
  • Add OnUidImportanceListener implementation to ShadowActivityManager and SCREEN_ON/SCREEN_OFF broadcasts to ShadowPowerManager. #6639
  • Instrument default interface methods #6645
  • Support Object array and Iterable as return type for single parameter by @utzcoz in #6696
  • Rebase PR 6265: Bounds check the correct variable. by @utzcoz in #6706
  • Remove allocation in ShadowCursorWindow.Data init by @al-broco in #6711
  • internal #6654
  • Add perfstats for ShadowSQLiteConnection #6659
  • Add support for startWatchingMode() with flags. #6661
  • Make isOpActive() public, so it can be used in tests below Android R. #6662
  • Add a sqlite test using LIKE ? ESCAPE ? #6666
  • Throw an exception if a query is performed using SQLiteDatabase.execSQL #6672
  • Add isAutoRevokeWhitelisted implementation to ShadowPackageManager. #6673
  • Add support for setting smart replies on ShadowRanking object, so getSmartRanking method can be used in tests. #6667
  • Use full class name in the SQLiteConnection shadow #6679
  • Improve NFC testability: #6587
  • Add experimental sqlite shadows derived from AOSP SQLite #6670
  • Exclude built-in config from being reloaded in Configuration registry #6680
  • Make legacy ShadowSQLiteConnection implementation methods protected #6681
  • Newly added shadow class for MediaStore is exposed to open source rebolectric library #6665
  • Update ShadowAppWidgetManager to better handle RemoteViews with multiple layouts #6677
  • Add shadow functionality for removing bonds(systemAPi) #6682
  • Add support for NetworkInfo.extraInfo to ShadowNetworkInfo #6683
  • Update default SQLite synchronous and journal modes #6687
  • Add a null check to ShadowCursorWindow.put{Blob,String} #6675
  • Add parameterized test name method to the test runner #6686
  • Add ability to uninstall app widgets to ShadowAppWidgetManager.java #6693
  • Add ShadowInetAddressUtil class #6694
  • Add @InlineMe to deprecated ShadowLooper APIs. #6689
  • Add @InlineMe to deprecated, inlineable APIs. #6455
  • Add setAnchor to ShadowAccessibilityWindowInfo #6699
  • Fix an ArrayIndexOutOfBoundsException in ByteBucketArray #6700
  • Add missing implementation for __android_log_assert #6701
  • Remove mocking from FragmentControllerTest #6703
  • Add API to retrieve Intent used to start SpeechRecognizer #6692
  • Update default SQLite synchronous mode when WAL is enabled #6690
  • Fix formatting in ShadowSQLiteConnectionsTest #6712
  • Add a SQLite mode that enables the new native Android SQLite shadows #6709
  • Use offset from BufferInfo instead of ByteBuffer for ShadowMediaMuxer#writeSampleData by @utzcoz in #6695
  • Support to open fd for uncompressed file in asset by @utzcoz in #6649
  • Update gradle wrapper to 7.2 by @utzcoz in #6738
  • Improve resetter for NfcAdapter and CardEmulation by @utzcoz in #6749
  • Remove debug print statement #6714
  • Fixes WindowInfo children not cloned in ShadowAccessibilityWindowInfo #6718
  • Clarify ShadowLooper.idle message when test fails. #6719
  • Skip ErrorProne on GitHub CI runs #6728
  • Migrate off deprecated mockito APIs #6729
  • Remove CircleCI metadata #6730
  • Fix ShadowMediaPlayer#prepare() to invoke prepared listener on handler instead of executing directly on calling thread. #6731
  • Delete ShadowBaseLooper #6733
  • Include stack trace in System.log[WE] calls. #6735
  • Implemented startForeground(int, Notification, int). #6717
  • Fix spurious CloseGuard errors in Surface and SurfaceControl #6739
  • Specify LEGACY SQLite mode for ShadowSQLiteConnectionTest #6746
  • Add CMake build for SQLite native artifacts by @hoisie in #6720
  • Deprecate ShadowSwipeRefreshLayout. by @utzcoz in #6710
  • Add CI job to check aggregateDocs by @utzcoz in #6748
  • Deprecate the supportv4 shadows as mentioned in #6185 by @alsutton in #6194
  • Rework api classification and enforcement. #6755
  • Add toString to ShadowApplication.Wrapper #6736
  • Use more conventional name for the native runtime library #6764
  • Add setWifiApConfiguration & getWifiApConfiguration to ShadowWifiManager #6763
  • Make IntentsTest work on device without browser. #6765
  • Merging HardwareRendererCompat fixes into one branch by @dmeng in #6773
  • Don't use HARDWARE bitmaps in Bitmap#createBitmap. #6766
  • Fix missing imports when building on Mac OSX. #6771
  • Update ShadowInCallService so that onCallAudioStateChanged callback is invoked when the audio route is changed. #6758
  • Reduce usage for this$0 by @utzcoz in #6760
  • Update nativeruntime CMake build to support Mac M1 by @hoisie in #6774
  • Use the display ID in the provided ActivityOptions when launching activities, instead of always using the default display. #6697
  • Add ctesque common tests to androidTest by @utzcoz in #6570
  • Create a separate task to prefetch non-instrumented SDKs by @hoisie in #6778
  • Clarify error message if the SQLite submodule is missing by @hoisie in #6786
  • Make implementation classes protected on ShadowRenderNode by @hoisie in #6818
  • Support self notification callbacks for AppOpsManager #6788
  • Add a ShadowPackageBackwardCompatibility class to handle when multiple APIs are on the classpath #6790
  • Always look for tzdata in the corresponding android-all jar instead of the classpath #6789
  • Fix NPE when calling Path.arcTo with an invalid arc #6797
  • Add support to system flags on ShadowWindow #6792
  • Synchronize BinderService.getBinder #6807
  • Add a binder service for TELEPHONY_SERVICE in ShadowServiceManager. #6808
  • Add support for Android S #6776
  • Add a test for getting and setting the global animation duration #6809
  • Add supports of addOnActiveSessionsChangedListener with 3-arguments for ShadowMediaSessionManager. #6813
  • Bump AGP to 7.1.0-beta02 by @utzcoz in #6815
  • Default to native Android SQLite on the Mac M1 #6819
  • Update ShadowRenderNodeAnimator to direct reflector #6821
  • Turn off shadowOf generation for RoleControllerManager #6822
  • Deprecate the proxy version of directlyOn #6823
  • Update ShadowApplicationPackageManager.getPackageArchiveInfo to use reflector #6825
  • Migrate supportv4 shadows from directlyOn proxy to reflector #6826
  • Ensure that ShadowAccessibilityRecord fields are preserved during AccessibilityEvent copy. #6820
  • Migrate to use platform InstrumentationRegistry for LocalActivityInvoker by @utzcoz in #6787
  • Use direct reflector for AcccessibiltyRecord.init in #6831
  • Add ShadowTimePickerDialog.getIs24HourView in #6805
  • Add libicu as a git submodule by @hoisie in #6833
  • Disable the universal library for Mac OS by @hoisie in #6845
  • Bump asm to 9.2 by @utzcoz in #6844
  • Add workflow that builds native runtime and uploads artifacts by @hoisie in #6827

New Contributors

Full Changelog: robolectric-4.6.1...robolectric-4.7

Pre-release

*NOTE: Robolectric 4.7-alpha-2 is a outdated preview release; please use 4.7 or later instead.

Pre-release

NOTE: Robolectric 4.7-alpha-1 is a outdated preview release; please use 4.7 or later instead.

Compare
Choose a tag to compare

This is a minor release that fixes #6589, in which ShadowActivityManager contained a reference to android.app.ApplicationExitInfo, introduced in SDK 30, in public method. This caused shadowOf to fail if the target SDK was < 30. Thanks to @utzcoz for the fix and @jankowskib for reporting the issue.