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

Commit 04d40552 authored by Arne Coucheron's avatar Arne Coucheron Committed by Zhao Wei Liew
Browse files

Revert "cmfm: Use FileProvider for serving files"

Incomplete so things are still very much broken.
We'll force SDK to version 23 instead for now, so
at least we have a fully working file manager.

This reverts commit 578f0a0e.

Change-Id: I612507d75d3e45ba091d43ac2c5bf1f9dbe53fb5
parent 11826416
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -76,16 +76,6 @@
      android:authorities="com.cyanogenmod.filemanager.providers.index"
      android:name=".providers.MimeTypeIndexProvider"/>

    <provider
      android:name="android.support.v4.content.FileProvider"
      android:authorities="com.cyanogenmod.filemanager.providers.file"
      android:exported="false"
      android:grantUriPermissions="true">
        <meta-data
          android:name="android.support.FILE_PROVIDER_PATHS"
          android:resource="@xml/provider_paths" />
    </provider>

    <service
      android:name=".service.MimeTypeIndexService"
      android:label="@string/app_name">

res/xml/provider_paths.xml

deleted100644 → 0
+0 −4
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="external_files" path="."/>
</paths>
+1 −5
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ import android.os.Parcelable;
import android.os.storage.StorageVolume;
import android.provider.Settings;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.content.FileProvider;
import android.support.v4.widget.DrawerLayout;
import android.text.TextUtils;
import android.util.Log;
@@ -637,10 +636,7 @@ public class NavigationActivity extends Activity
                        for (FileSystemObject f : selectedFiles) {
                            //Beam ignores folders and system files
                            if (!FileHelper.isDirectory(f) && !FileHelper.isSystemFile(f)) {
                                fileUri.add(FileProvider.getUriForFile(
                                            NavigationActivity.this,
                                            "com.cyanogenmod.filemanager.providers.file",
                                            new File(f.getFullPath())));
                                fileUri.add(Uri.fromFile(new File(f.getFullPath())));
                            }
                        }
                        if (fileUri.size() > 0) {
+2 −5
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.storage.StorageVolume;
import android.support.v4.content.FileProvider;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
@@ -467,8 +466,7 @@ public class PickerActivity extends Activity
                    if (getIntent().getType() != null) {
                        intent.setType(getIntent().getType());
                    }
                    intent.setData(FileProvider.getUriForFile(this,
                                "com.cyanogenmod.filemanager.providers.file", src));
                    intent.setData(Uri.fromFile(src));
                    intent.putExtras(extras);
                    intent.setComponent(CROP_COMPONENT);
                    try {
@@ -574,8 +572,7 @@ public class PickerActivity extends Activity
        // Try to find the preferred uri scheme
        Uri result = MediaHelper.fileToContentUri(context, src);
        if (result == null) {
            result = FileProvider.getUriForFile(context,
                    "com.cyanogenmod.filemanager.providers.file", src);
            result = Uri.fromFile(src);
        }

        if (Intent.ACTION_PICK.equals(intent.getAction()) && intent.getData() != null) {
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ public class AssociationsDialog implements OnItemClickListener {
                    public void onClick(DialogInterface dialog, int which) {
                        ResolveInfo ri = getSelected();
                        Intent intent =
                                IntentsActionPolicy.getIntentFromResolveInfo(mContext,
                                IntentsActionPolicy.getIntentFromResolveInfo(
                                        ri, AssociationsDialog.this.mRequestIntent);

                        // Open the intent (and remember the action is the check is marked)
Loading