Moved LRResolverRankerService to ExtServices, and added a permission to
ensure that ResolverRankerServices are from trust sources.
Test: manually shared images in Camera, and in PTP to confirm it works
as expected.
Change-Id: I3549292d424fec949e9115faea7a0c5bdec06e87
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 31586d4..fcb28f6 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3182,6 +3182,14 @@
<permission android:name="android.permission.BIND_CHOOSER_TARGET_SERVICE"
android:protectionLevel="signature" />
+ <!-- @SystemApi Must be held by services that extend
+ {@link android.service.resolver.ResolverRankerService}.
+ <p>Protection level: signature|privileged
+ @hide
+ -->
+ <permission android:name="android.permission.PROVIDE_RESOLVER_RANKER_SERVICE"
+ android:protectionLevel="signature|privileged" />
+
<!-- @SystemApi Must be required by services that extend
{@link android.service.resolver.ResolverRankerService}, to ensure that only the system can
bind to them.
@@ -3707,14 +3715,6 @@
<service android:name="com.android.server.PreloadsFileCacheExpirationJobService"
android:permission="android.permission.BIND_JOB_SERVICE" >
</service>
-
- <service android:name="com.android.internal.app.LRResolverRankerService"
- android:permission="android.permission.BIND_RESOLVER_RANKER_SERVICE"
- android:priority="-1" >
- <intent-filter>
- <action android:name="android.service.resolver.ResolverRankerService" />
- </intent-filter>
- </service>
</application>
</manifest>