Skip to content

Commit

Permalink
don't crash apps that depend on missing Gservices provider
Browse files Browse the repository at this point in the history
This allows apps that have minor dependency on GSF/GmsCore (EuiccSupportPixel, Google Camera etc)
to work without having any of GSF, GmsCore, Play Store installed.

Gservices provider is currently hosted by GSF, soon to be hosted by GmsCore.
  • Loading branch information
muhomorr authored and thestinger committed Mar 28, 2023
1 parent fe03a27 commit 38a5ca0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/java/android/content/ContentResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -2755,6 +2755,11 @@ public final void registerContentObserver(Uri uri, boolean notifyForDescendents,
observer.getContentObserver(), userHandle, mTargetSdkVersion);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} catch (SecurityException se) {
if ("com.google.android.gsf.gservices".equals(uri.getAuthority())) {
return;
}
throw se;
}
}

Expand Down

0 comments on commit 38a5ca0

Please sign in to comment.