Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57f6dbc5 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Remove support for file:// items.

We've messaged since the N release that file:// Uris are going away,
and we've been crashing those apps via StrictMode for many years.

The broader storage changes in Q mean it's finally a good time to say
we only handle content:// items.

Bug: 123212933
Test: none
Change-Id: I69a791468c4bcf45b0022cf52264e78f94bfdeae
parent f4a7a585
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -43,14 +43,12 @@
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.INSTALL_PACKAGE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="file" />
                <data android:scheme="content" />
                <data android:mimeType="application/vnd.android.package-archive" />
            </intent-filter>
            <intent-filter android:priority="1">
                <action android:name="android.intent.action.INSTALL_PACKAGE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="file" />
                <data android:scheme="package" />
                <data android:scheme="content" />
            </intent-filter>
+1 −1
Original line number Diff line number Diff line
@@ -3502,7 +3502,7 @@ public class PackageManagerService extends IPackageManager.Stub
    private @NonNull String getRequiredInstallerLPr() {
        final Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        intent.setDataAndType(Uri.fromFile(new File("foo.apk")), PACKAGE_MIME_TYPE);
        intent.setDataAndType(Uri.parse("content://com.example/foo.apk"), PACKAGE_MIME_TYPE);
        final List<ResolveInfo> matches = queryIntentActivitiesInternal(intent, PACKAGE_MIME_TYPE,
                MATCH_SYSTEM_ONLY | MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE,