Please sign in to comment.
Ensure MuzeiArtProviders cannot crash Muzei
Parcel.writeException details a set of RuntimeExceptions that are sent over to the calling app. If a MuzeiArtProvider threw any of these RuntimeExceptions, they'd crash Muzei - we want to avoid that by catching all of these exceptions and rethrowing them as RemoteException, which Muzei uses as the signal that the remote MuzeiArtProvider crashed. Special handling was added around checking for valid artwork to ensure the now RemoteExceptions don't take down the entire Worker, but instead are captured locally and mark the artwork as invalid.
- Loading branch information...
Showing with 42 additions and 14 deletions.
- +6 −5 android-client-common/src/main/java/com/google/android/apps/muzei/sync/ArtworkLoadWorker.kt
- +5 −3 android-client-common/src/main/java/com/google/android/apps/muzei/sync/ProviderChangedWorker.kt
- +31 −6 ...oid-client-common/src/main/java/com/google/android/apps/muzei/util/ContentProviderClientCompat.kt