Roboletric v4.5-alpha Release Notes

Release Date: 2020-09-30 // over 3 years ago
  • πŸ›  Robolectric 4.5 Alpha 1 adds support for Android API 30 (R final) and contains many bug fixes and other enhancements.

    πŸš€ More detailed release notes are forthcoming.

    For all changes view the comparison to 4.4.

    πŸ‘‰ Use Robolectric:

    testCompile "org.robolectric:robolectric:4.5-alpha-1"
    

Previous changes from v4.4

  • Robolectric 4.4 is a massive release in terms of improvements to Android compatibility. The most noticeable item in the release is that the new PAUSED looper mode is now the default. You can read about the PAUSED looper in more detail here: http://robolectric.org/blog/2019/06/04/paused-looper/.

    Note:

    πŸš€ 1. Not all changes are listed in the release notes. There were many other minor changes (such as dependency version bumps) that weren't included in this list for brevity. For all changes view the comparison to 4.3.1. πŸš€ 2. Some of the pull requests in this release may contain duplicate changes from other pull requests in this release. We apologize for this messy history, it was the result of some misconfigured code sync tool. We’ve taken measures to ensure it doesn’t happen any more.

    πŸ‘‰ Use Robolectric:

    testCompile "org.robolectric:robolectric:4.4"
    

    πŸ‘ SDK/JVM support

    πŸ—„ Deprecations

    • πŸ—„ Deprecate LooperMode LEGACY in favor of PAUSED (#5490), and default to PAUSED looper mode (#5491)
    • 🚚 Accessibility checking is now deprecated and has been moved into a separate maven artifact org.robolectric:plugin-accessibility-deprecated. Accessibility checking will be removed entirely from Robolectric 4.5. Please switch to Espresso for accessibility checking. (#5547)
    • πŸ—„ Deprecate ShadowContentResolver shadow API because they do not work with ContentProviderClient (#5376)
    • ⚑️ Deprecate ShadowLocationManager.getLocationUpdateListeners and ShadowLocationManager.getLocationUpdateListeners (#5150)
    • πŸ‘‰ Make it an error to run on Q with an unsupported java version
      βœ… instead of just silently skipping tests (#5290)
    • πŸ—„ Deprecate Robolectric's custom cursor implementation (#5613)
    • πŸ”’ The BouncyCastle security provider is now considered deprecated due to the incompatibility with Java 9+ (#5849, #5850). This was preventing Robolectric tests (and Robolectric itself) from making HTTPS network requests on Java 9+. Long term the plan is to switch to Conscrypt.

    βœ… Android support / Robolectric test API improvements

    • πŸ›  Fix bug in ShadowImageDecoder.decodeBitmap (#4966)
    • Use real setting for WIFI_SCAN_ALWAYS_AVAILABLE (#4968)
    • βž• Add a shadow for Font.Builder (#4993)
    • βž• Add killProcess implementation to ShadowProcess (#4985)
    • βž• Add a shadow for CallLog.Calls (#4996)
    • βž• Add a shadow for CallScreeningService (#4997)
    • βž• Add several shadows for camera2 classes (#4874)
    • βž• Add option to avoid calling ShadowApplication.onServiceDisconnected in ShadowApplication.unbindService (#4979)
    • βž• Add ability to simulate Bluetooth unavailable in ShadowBluetoothAdapter (#5002)
    • πŸ“¦ Implement ShadowApplicationPackageManager.getApplicationIcon(ApplicationInfo) (#5005)
    • βž• Add ability to simulate SecurityExceptions in bindService (#4980)
    • βž• Add ability to simulate enabled/disabled networks in ShadowWifiManager (#4974)
    • βž• Add ability to simulate wifi usability system APIs in ShadowWifiManager (#5168)
    • βž• Add null check in ShadowWifiManager.addNetwork (#5014)
    • βž• Add shadow implementation of ShadowTelephonyManager#getDataState (#5003)
    • Fall back to Android's implementation of getResourcesForApplication (#4969)
    • Implement ShadowTypeface.equals and ShadowTypeface.hashCode (#4992)
    • βž• Add ability to make ShadowContentResolver.registerContentObserver throw an exception (#4988)
    • Implement ShadowSubscriptionManager.getActiveSubscriptionInfoCountMax (#5010)
    • βž• Add ability to set system dialer package in ShadowTelecomManager (#4986)
    • Implement ShadowSensorManager.registerListener 5-arg overload (#5014)
    • βž• Add ability to get last flags set in ShadowUIModeManager (#5027)
    • βž• Add a shadow for BluetoothA2dp (#5034)
    • βž• Add shadow implementation for BluetoothDevice.createRfcommSocketToServiceRecord (#5034)
    • βž• Add shadow implementations for BluetoothDevice.setPin and BluetoothDevice.setPairingConfirmation (and ability to get the values set) (#5116)
    • βž• Adding shadow implementations of BluetoothDevice.getAlias and BlueToothDevice.getAliasName and related test APIs (#5222)
    • βž• Adds the ability to get broadcast intents sent to a specific user (#5045)
    • Validate intents passed to start/stop/bindService (#5053)
    • Complete rewrite of ShadowLocationManager to improve fidelity (#5035, #5062, #5152, #5587, #5666)
    • βž• Add ability to clear broadcast intents in ShadowContextWrapper (#5066)
    • πŸ›  Fix package name ShadowApplicationPackageManager's Activity Chooser (#5068)
    • βž• Add shadow implementation for MediaPlayer#setDataSource(Context, Uri) (#5064)
    • βž• Add shadow implementation for UserManager.getUserHandle(int) (#5065)
    • βž• Add shadow implementations for DevicePolicyManager.setSystemUpdatePolicy and DevicePolicyManager.getSystemUpdatePolicy (#5069)
    • βœ‚ Remove ShadowOverscroller (#5081)
    • βž• Add ability to simulate return value of AccessibilityService.getWindows list in ShadowAccessibilityService (#5083)
    • πŸ›  Fix bug in ShadowParcel.writeByteArray (#5089)
    • βž• Add shadow implementation for UserManager.getUserName (#5099)
    • πŸ‘Œ Improve fidelity of ShadowTime#parse3339 (#5101)
    • βž• Add shadow for BiometricManager (#5072)
    • Propagate RemoteException from Binder#onTransact method (#4984)
    • βž• Add shadow for android.service.notification.NotificationListenerService.Ranking (#5113)
    • βž• Add support for VibrationEffect.Prebaked in ShadowSystemVibrator (#5119
    • βž• Add the ability to set Tx and Rx packets/bytes for ShadowTrafficStats (#5121)
    • βž• Add shadow implementation for Activity.getCallingPackage (and the ability to set it) (#5126)
    • βž• Add shadows for several telephony classes (android.telecom.Call, android.telecom.InCallAdapter, android.telecom.InCallService, android.telecom.Phone) (#5107)
    • πŸ‘Œ Improve fidelity of ShadowCookieManager.removeSessionCookies (#5130)
    • πŸ‘Œ Improve fidelity of OpEntry.getTime() and OpEntry.getDuration() in Q (#5133)
    • 0️⃣ Set default NetworkCapabilities for the two Robolectric created Networks (#5129)
    • Set the mimetype in ShadowBitmapFactory.decodeStream() (#5128)
    • βž• Add module support for ShadowPackageManager and ShadowApplicationPackageManager (#5136)
    • βž• Add the ability to set the external storage directory in ShadowEnvironment (#5140)
    • βž• Add support for the dataChanged API in ShadowBackupManager (#5137)
    • βž• Add ShadowContentResolver.registerInputStreamSupplier (#5142)
    • πŸ”” Notify settings ContentResolver when settings change (#5138)
    • Include size and mtime members in Os.stat variants (#5148)
    • Implement ShadowInstrumentation.execStartActivity variant with UserHandle (#5096)
    • βž• Add ability to add entries to ShadowDropBoxManager (#5160)
    • πŸ›  Fix ShadowSigningInfo parceling (#5163)
    • βž• Add ability to set Build.VERSION.SECURITY_PATCH (#5173), Build.PRODUCT (#5304), Build.BRAND (#5566), and Build.HARDWARE (#5619)
    • βž• Add support for DisplayManager BrightnessConfiguration APIs (#5170)
    • βž• Add ability to simulate location power save modes in ShadowPowerManager (#5176)
    • βž• Add shadow method and test API for PowerManager.isLightDeviceIdleMode (#5226)
    • βž• Add support for Android Q usb port statuses in ShadowUsbManager (#5175)
    • βž• Add ability to simulate sending and downloading multimedia messages in ShadowSmsManager (#5177)
    • βž• Add ability to query the number of times a WebView was reloaded (#5182)
    • βž• Add ability to simulate WebViewClient and WebViewClient callbacks on page loads (#5188, #5199)
    • βž• Add shadow method for WebView.getTitle (#5200)
    • βž• Add test APIs to check if WebViewDatabase.clearFormData was called (#5201)
    • βž• Add ability to override autofill service component name to ShadowAutofillManager (#5181)
    • βž• Add ability to construct AttestedKeyPair objects (#5183)
    • βž• Add shadow method for CameraCaptureSessionImpl.capture (#5191)
    • βž• Add shadow method and test APIs for MediaScannerConnection.scanFile (#5178)
    • βž• Add synchronous support to ShadowMediaCodec and the ability to apply fake codecs (#5195)
    • βž• Add shadow methods for CameraParameters metering and focus areas and test APIs (#5189)
    • βž• Add shadow method for AudioManager.getActiveRecordingConfigurations and test APIs (#5198)
    • βž• Add ShadowAudioRecord (#5202, #5789)
    • βž• Add several shadow methods for SliceManager (#5227)
    • βž• Add shadow methods for new Android Q variants of setPackagesSuspended (#5135)
    • βž• Add shadow method and test APIs for AccessibilityManager.sendAccessibilityEvent (#5192)
    • βž• Add ability to log time in ShadowLog (#5224)
    • βž• Add shadow for SuspendDialogInfo system API (#5232)
    • βž• Add shadow method for PackageManager.canonicalToCurrentPackageNames and the ShadowPackageManageraddCanonicalName test API (#5233)
    • βž• Add better support for camera2 CaptureRequestBuilder (#5230)
    • βž• Add shadow method for Os.sysconf and a shadow API to set sysconf values (#5247)
    • βž• Add shadow method for PackageManager.setDistractingPackageRestrictions and shadow API to get the set value (#5248)
    • βž• Add shadow method for Bitmap.extractAlpha(Paint, int[]) (#5240)
    • βž• Add the ability to set the user id in ContextImpl (#5253)
    • πŸ›  Fix some bugs in ShadowStorageManager StorageVolume logic (#5251, #5250)
    • βž• Add shadow method for Trace.isEnabled and shadow API to toggle the value (#5256)
    • πŸ›  Fix infinite loop when using CameraManager (#5269)
    • βž• Add shadow class for MediaController (#5266, #5395)
    • βž• Add shadow method for MediaMetadataRetriever.setDataSource and a shadow API to add bitmaps to a data source (#5279)
    • βž• Add shadow method for MediaMetadataRetriever.getScaledFrameAtTime and the ability to set scaled frames (#5279)
    • βž• Add shadow method for BluetoothDevice.getBluetoothClass and the ability to set the bluetooth class (#5277)
    • βž• Add shadow methods for PendingIntent.readPendingIntentOrNullFromParcel and PendingIntent.writePendingIntentOrNullToParcel (#5283)
    • πŸ‘Œ Improve fidelity of AccessibilityWindowInfo.equals (#5278)
    • βž• Add shadow methods for DevicePolicyManager.bindDeviceAdminServiceAsUser and DevicePolicyManager.getBindDeviceAdminTargetUsers and a shadow API to set the authorized users for these methods (#5287)
    • βž• Add shadow method for ContextImpl.getExternalCacheDirs (#5288)
    • βž• Add shadow method for WebSettings.getDefaultUserAgent to prevent crash (#5294)
    • βž• Add shadow method for MediaBrowserCompat.getSessionToken (#5301)
    • βž• Add shadow method for VMRuntime.getCurrentInstructionSet and shadow API to set the current instruction set (#5318)
    • βž• Add shadow methods for PowerManager.getCurrentThermalStatus, PowerManager.addThermalStatusListener, PowerManager.removeThermalStatusListener. Athermal, and a shadow API to set the current thermal status (#5297)
    • βž• Add support for opening a ParcelFileDescriptor in truncate and append modes (#5322)
    • βž• Add shadow method for UserManager.isUserUnlocked(UserHandle) and shadow API to set user unlocked status (#5323)
    • πŸ‘Œ Improve fidelity of DateFormat.get*DateFormat( #5314)
    • βž• Add shadows for ContextHubManager and ContextHubClient (#5340, #5399)
    • βž• Add support for AudioPlaybackCallback in ShadowAudioManager (#5342)
    • ⚑️ Update many ShadowUserManager methods to support profiles and add shadow method for UserManager.isManagedProfile(int) (#5346)
    • βž• Add shadow for RoleManager (#5357)
    • βž• Add shadow method for AccountManager.addOnAccountsUpdatedListener and shadow API to notify the listeners (#5347)
    • βž• Add shadow API to get AccountManager OnAccountsUpdateListeners (#5361)
    • βž• Add shadow method TelephonyManager.requestCellInfoUpdate and a shadow API to set the cell infos for the callbacks (#5355)
    • βž• Add shadow method for MediaCodec.getOutputFormat and the ability to set the output format (#5372)
    • βž• Add shadow method for AudioManager.isBluetoothScoAvailableOffCall and shadow API to set the value (#5364)
    • βž• Add more complete shadow implementation for TelecomManager.placeCall and shadow API to query information about outgoing calls (#5373)
    • βž• Add shadow APIs for allowing and denying calls to ShadowTelecomManager (#5374)
    • βž• Add shadow method for CrossProfileApps.startActivity and shadow APIs to peek/get/clear the started activities (#5387)
    • βž• Add shadow API to get all available loopers (#5371)
    • βž• Add shadow for android.media.AudioTrack (#5379)
    • βž• Add shadow for android.media.MediaCodecList (#5390, #5699)
    • βž• Add shadow methods for View.addOnAttachStateChangeListener and View.removeOnAttachStateChangeListener and test API to get the OnAttachStateChangeListeners (#5401)
    • πŸ“¦ Throw IllegalArgumentException in PackageManager.getInstallerPackageName if package name is not installed (#5403)
    • βž• Add shadow method for PackageManager.getUnsuspendablePackages (#5406)
    • βž• Add static factory method ShadowSensorManager.createSensorEvent(int, int) that takes a sensor type (#5398)
    • βž• Add shadow method for TelephonyManager.isRttSupported and a test API to set whether or not Rtt is supported (#5411)
    • βž• Add shadow methods for NfcAdapter.enableReaderMode, NfcAdapter.disableReaderMode, and some shadow API to work with reader mode (#5405)
    • βž• Add shadow for UserManager#isQuietModeEnabled (#5416)
    • πŸ‘Œ Improve fidelity of MediaCodec.dequeueOutputBuffer (#5409, #5466)
    • βž• Add shadow methods for AutofillManager.isAutofillSupported and AutofillManager.isEnabled and shadow API to set values returned (#5408)
    • βž• Add shadow method for WifiRttManager.isAvailable (#5429)
    • βž• Add shadow method for AccessibilityService.dispatchGesture and some shadow API to toggle and get the dispatched gestures (#5441)
    • βž• Add shadow method for Adding TelephonyManager.sendDialerSpecialCode and shadow API to get the values sent (#5444)
    • πŸ‘Œ Improve fidelity of Path copy constructor shadow implementation (#5444)
    • βž• Add shadow method for AppOpsManager.java.unsafeCheckOpRawNoThrow (#5448)
    • βž• Add shadow method for TelephonyManager.isHearingAidCompatibilitySupported and a shadow API method to set the value returned (#5450)
    • βž• Add shadow methods for DevicePolicyManager.getAffiliationIds and DevicePolicyManager.setAffiliationIds (#5452)
    • βž• Add shadow method for Canvas.drawRoundRect and shadow API to get information about the drawn round rects (#5451)
    • βž• Add shadow method for UserManager.getProfileParent (#5457)
    • βž• Add shadow method for DevicePolicyManager.isDeviceProvisioned and shadow API to set the value returned (#5461)
    • βž• Add shadow methods for DevicePolicyManager.getPermissionPolicy and DevicePolicyManager.setPermissionPolicy in ShadowDevicePolicyManager (#5453)
    • βž• Add a Configurer plugin that changes the behavior of the PackageManager.html.getInstallerPackageName shadow method to throw an exception (instead of returning null), which is consistent with real Android (#5465)
    • βž• Add shadow API to optionally enforce a notification limit to NotificationManager.notify (#5467)
    • πŸ›  Fix triggering broadcasts from explicit intents if data on intent is specified (#5482)
    • βž• Add shadow for android.telephony.ims.ImsMmTelManager system service and shadow API to set various pieces of state on the shadow (#5483, #5497)
    • πŸ‘‰ Make ShadowTrace sections thread aware (#5494)
    • πŸ›  Fix permission check when matching broadcast receivers (#5495)
    • πŸ”¨ Refactor ShadowWrangler to delegate to a ShadowMatcher for making SDK-level decisions (f5371b5, dda4709)
    • βž• Add shadow for android.media.MediaActionSound and shadow API to get the play counts (#5500)
    • βž• Add shadow method for DownloadManager#setDestinationInExternalPublicDir (#5489)
    • Include StatusBarNotification post times in ShadowNotificationManager (#5519)
    • βž• Add a more complete shadow method for TelecomManager.getDefaultOutgoingPhoneAccount and shadow API to to set (and reset) the default outgoing phone account (#5524)
    • βž• Add shadow method for BluetoothAdapter.isLeExtendedAdvertisingSupported and shadow API to set the value returned (#5515)
    • βž• Add shadow methods for AudioManager.registerAudioPolicy and AudioManager.unregisterAudioPolicy system APIs and shadow API to get information about the audio policies (#5538)
    • βž• Add shadow methods for TrafficStats.setThreadStatsTag and TrafficStats.getThreadStatsTag (#5541)
    • Create separate cache directory for getExternalCacheDir instead of using the external storage root directory (#5534)
    • ⚑️ Use provided executor in TelephonyManager.requestCellInfoUpdate and add shadow API to set the error details for the callback (#5543)
    • βž• Add more complete shadow methods for UserManager.isQuietModeEnabled and UserManager.requestQuietModeEnabled and shadow API to set whether a profile is locked (#5555)
    • βž• Add support for CameraManager.openCamera for older SDKs (21-27) (#5551)
    • βž• Add shadow method for CameraDeviceImpl.close (which is used in CameraDevice.close) (#5552)
    • βž• Add shadow method for ConnectivityManager.getRestrictBackgroundStatus and shadow API to set the returned value (#5556)
    • βž• Add shadow for android.service.voice.VoiceInteractionService and shadow APIs to get set UI hints and set the active service (#5537)
    • βž• Add shadow method for AudioManager.generateAudioSessionId that returns monotonically increasing values (#5559)
    • βž• Add shadow methods for NotificationManager.{getNotificationDelegate,canNotifyAsPackage,setNotificationDelegate} and shadow API ShadowNotificationManager.canNotifyAsPackage (#5565, #5573)
    • βž• Add shadow method for PackageManager.getPackagesHoldingPermissions (#5568)
    • βž• Add shadow method for TelephonyManager.getSimLocale and shadow API to set the returned value (#5582)
    • βž• Add shadow method ConnectivityManager.getProxyForNetwork and shadow API to set the returned value (#5570)
    • βž• Add shadow method for TelephonyManager.getDataNetworkType and shadow API to set the retired value (#5581)
    • βž• Add shadow method for Paint.setUnderlineText (#5585)
    • βž• Add support for MenuItem.setActionView(int) (#5603)
    • βž• Add support for writing and reading FileDescriptors in Parcel. Specifically this adds shadow methods for Parcel.nativeWriteFileDescriptor and Parcel.nativeReadFileDescriptor (#5588)
    • βž• Add shadow methods for DevicePolicyManager.isDeviceProvisioningConfigApplied and DevicePolicyManager.isDeviceProvisioningConfigApplied (#5599)
    • πŸ‘ Better support reading/writing SharedMemory objects to Parcels (#5612, #5756)
    • βž• Add shadow method for GradientDrawable.setStroke and shadow API methods to get the information about the stroke. (#5589)
    • βž• Add shadow API for setting default user agent in ShadowWebSettings (#5615)
    • βž• Add shadow method for TelephonyManager.isVoiceCapable and shadow API to set the value returned (#5606)
    • βž• Add shadow method for Android P Typeface.create static factory method (#5616)
    • βž• Add rudimentary support for Paint#breakText (#5607)
    • βž• Add shadow methods for Environment.isExternalStorageLegacy (both no-arg and 1-arg variants) and shadow API to set the value returned (#5617)
    • βž• Add shadow for android.service.voice.VoiceInteractionSession and many shadow API methods to work with the type (#5595)
    • βž• Add shadow method for TelephonyManager.getCarrierIdFromSimMccMnc and a shadow API method to set the value returned (#5618)
    • βž• Add shadow methods for WebView.goForward and WebView.canGoForward and shadow API to get the number of invocations of goForward (#5620)
    • βž• Add shadow method for WebView.getHitTestResult and shadow API to set the value returned (#5630)
    • βž• Add shadow for android.content.rollback.RollbackManager system API and some shadow API methods to get rollback information (#5621)
    • βž• Add shadow for android.media.audiofx.DynamicsProcessing and make significant improvements to ShadowAudioEffect (#5591)
    • βž• Add support for System.logW (#5634)
    • βž• Add ShadowCamera.removeCamera shadow API for removing cameras (#5651)
    • βž• Add an implementation for async setCookie to RoboCookieManager (#5653)
    • Support ADJUST_LOWER and ADJUST_RAISE in AudioManager.adjustStreamVolume shadow method (#5650)
    • βž• Add shadow for android.bluetooth.le.BluetoothLeScanner and add shadow API to BluetoothAdapter to work with BluetoothLeScanner (#5659)
    • βž• Add shadow method for TileService.startActivityAndCollapse(Intent) (#5664)
    • βž• Add shadow API method ShadowWebView.pushEntryToHistory(String) to improve fidelity of history in a WebView (#5654)
    • βž• Add builders for android.media.MediaCodecInfo and android.media.MediaCodecInfo.CodecCapabilities and a shadow API method ShadowMediaCodecList.addCodec (#5705)
    • ⚑️ Update DeviceConfig to populate additional display metrics (#5706)
    • πŸ‘Œ Improve fidelity of Activity#requestPermissions behavior (#5707)
    • ⚑️ Update ShadowPausedAsyncTaskLoader to allow setting a custom executor (#5708)
    • πŸ‘Œ Improve fidelity of password tokens in DevicePolicyManager (#5693)
    • βž• Add shadow methods for BluetoothA2dp.getConnectedDevices and BluetoothA2dp.getDevicesMatchingConnectionStates and shadow API to set the values returned (#5681)
    • βž• Add shadow for android.media.RingtoneManager (#5689)
    • βž• Add shadow method for MediaCodec.native_flush (to support MediaCodec.flush) (#5698)
    • βž• Add shadow methods for BluetoothHeadset.{startVoiceRecognition,stopVoiceRecognition,isAudioConnected} (#5660)
    • βž• Add shadow for android.os.BugreportManager and some shadow API to query state and trigger callbacks for bug reports #5675)
    • πŸ›  Fix handling of null admin in DevicePolicyManager.isUninstallBlocked() (#5720)
    • πŸ“¦ Implement shadow method for ApplicationPackageManager.isInstantApp (#5725)
    • πŸ‘Œ Improve fidelity related to input buffer ownership in ShadowMediaCodec (#5719)
    • ⚑️ Update ShadowSensorManager to support listeners registering more than one sensor type, as well as a shadow API method to query the registration for a (listener, sensor) pair (#5735)
    • βž• Add shadow method for ContentResolver.query(Uri uri, String[], Bundle, CancellationSignal) (#5729)
    • βž• Add SubscriptionInfoBuilder.setMcc and fix SubscriptionInfoBuilder.setMnc for SDK < Q (#5736)
    • βž• Add shadow method for LauncherApps.isPackageEnabled (#5691)
    • βž• Add shadow for android.media.session.MediaSessionManager (#5741)
    • βž• Add shadow methods for WallpaperManager.setBitmap and WallpaperManager.getWallpaperFile and a shadow API method to get the set bitmap (#5750)
    • βž• Add shadow methods for Android N system APIs ContextHubManager.getContextHubHandles and ContextHubManager.getContextHubInfo (#5760)
    • βž• Add shadow method for Activity.reportFullyDrawn and shadow API to check whether this method has been called
    • βž• Add shadow methods for UsageStatsManager.registerAppUsageLimitObserver, UsageStatsManager.unRegisterAppUsageLimitObserver, and shadow API to get the observers and trigger them (#5770)
    • βž• Add shadow methods for DevicePolicyManager.{getShort,setShort,getLong,setLong}SupportMessage (#5776)
    • βž• Add shadow methods for WallpaperManager.isWallpaperSupported and WallpaperManager.isSetWallpaperAllowed and shadow API to set the values returned (#5765)
    • βž• Add shadow for android.net.wifi.aware.WifiAwareManager, which includes the ability to create WiFI aware sessions (#5766)
    • βž• Add shadow method for LauncherApps.getActivityList and test API to set the values returned (#5771)
    • βž• Add shadow method for TileService#isLocked and shadow API to set the value returned (#5794)
    • πŸ‘Œ Improve fidelity of BitmapFactory.decodeFile by attempting to use the real bitmap file width and height (#5774)
    • βž• Add shadow methods for TextToSpeech.synthesizeToFile, TextToSpeech.isLanguageAvailable, TextToSpeech.setLanguage, and shadow APIs to configure the behavior of these methods (#5797)
    • βž• Add shadow method for WallpaperManager.getWallpaperInfo and the ability for tests to specify the wallpaper service component (#5781)
    • ⚑️ Use loose signatures on ShadowTelephonyManager.requestCellInfoUpdate. This is to continue supporting Java 8 in Robolectric 4.4. (#5835)
    • βž• Add shadow methods for InCallService.canAddCall, InCallService.setMuted, InCallService.setAudioRoute, InCallService.getCallAudioState, InCallService.requestBluetoothAudio, and some shadow API methods to modify the behavior of these methods (#5816)
    • βž• Add shadow for android.media.audiofx.Visualizer (#5818, #5826)
    • βž• Add shadow method of MediaPlayer.setDataSource(AssetFileDescriptor) (#5844)

    Misc improvements

    • βœ… Simplify single-parameter tests in ParameterizedRobolectricTestRunner (#5026)
    • πŸ‘ Allow extension point for running custom actions for unsupported SDKs (#5028)
    • πŸ›  Fix SandboxClassLoader classloader inheritance (#5036)
    • πŸ›  Fix noisy NPE in ShadowInstrumentation (#5063)
    • πŸ“‡ Create Android application specified in package metadata (#5039)
    • Tolerate gaps between ZIP entries when jumping between Local File Headers (#5120)
    • βž• Add extension points so child tests can be created (#5132)
    • πŸ‘Œ Improve thread safety of many shadows (#5018, #5087, #5094, #5144, #5193, #5231, #5306, #5445, #5703, #5676, #5742)
    • Stop depending on javac annotation processing internals (#5155)
    • βž• Add a way to specify classes to not instrument based on a regex (#5264)
    • πŸ‘‰ Make reading binary resource zips more performant (#5309)
    • πŸ›  Fix issue transitioning to RESUMED state in ActivityScenario (#5332, #5331)
    • βž• Add a plugin mechanism to provide a custom ShadowWrangler specialization (#5268)
    • πŸ‘ Better support AssumptionViolatedException in RobolectricTestRunner (#5359, #5704)
    • πŸ›  Fix Util.getJavaVersion to support double-digit values (#5381)
    • πŸ›  Fix duplicate call to ContentProvider.onCreate (#5393)
    • βœ… Use AAPT for R class (and other cleanup) in shadows.support.v4 tests (#5430)
    • Clean up autoservice usage and dependencies (#5432)
    • Mark fields and methods added to classes as synthetic (#5418)
    • πŸ“¦ Stop shadowing ApplicationPackageManager's constructor (#5455)
    • ⬆️ Upgrade to Android Gradle Plugin 3.5.3 and Gradle 5.4.1 (#5498)
    • CircleCI improvements (#5498, a64beaf, #5709, #5700, #5761, #5770, #5769 )
    • βš™ Run google-java-format check on CircleCI (#5769)
    • βž• Add expectLogMessageWithThrowable to ExpectedLogMessagesRule (#5516) and other fixes/improvements to ExpectedLogMessagesRule (#5640, #5657, #5680)
    • ⚑️ Update BouncyCastle security provider due CVE-2018-1000613 (#5572)
    • πŸ“¦ Avoid instrumenting additional packages
      ** Jetpack Compose (#5622)
      ** io.mockk (#5169)
      ** org.bouncycastle and org.conscrypt (#5845)
    • ⚑️ Update RoboMonitoringInstrumentation to post shadowActivity.callOnActivityResult asynchronously (#5671, #5674)
    • ⚑️ Update ShadowServiceManager to lazily create binder proxies (#5716, #5714) and fix issues in ShadowServiceManager (#5717, #5722)
    • βœ… Use guava's ByteStreams to read and copy streams (#5726)
    • Preload android.net.Uri in Android Q+ (#5733)
    • πŸ›  Fix Scheduler return values in PAUSED LooperMode, and support Scheduler#size (#5001)
    • Throw if ShadowPausedLooper APIs are used on a quit looper (#5499)
    • βœ‚ Removed the pegdown-doclet Markdown doclet gradle plugin due to Java 10+ incompatibility (#5743)
    • Converted all Robolectric Markdown Javadoc to regular Javadoc (#5746, #5747, #5753, #5759)
    • βž• Add BackgroundTestRule to simplify running test code in a background thread (#5732)
    • βž• Add BackgroundExecutor.runInBackground(Callable) helper method (similar to the existing BackgroundExecutor.runInBackground(Runnable) (#5730)
    • πŸ‘Œ Improve support for MockK (#5169)
    • πŸ›  Fix 'Duplicate key' error when running ./gradlew upload (#5788)
    • βž• Add robolectric.util.Logger.lifecycle method and use it to log some lifecycle events in RobolectricTestRunner (#5824)
    • ⬇️ Drop maven-ant-tasks dependency (due to CVE) and fetch from Maven manually (#5833, #5842, #5849, #5854, #5855)
    • Generate reflector class with valid access (#5841)
    • βž• Add shadow API to ShadowNetwork to determine whether a socket is bound, or how many sockets are bound (#5836)
    • πŸ‘ Allow tests to configure value returned by P+'s Application.getProcessName (#5825)
    • βž• Add better support for Conscrypt (#5851)