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

Commit 58928e7f authored by Martin Brabham's avatar Martin Brabham Committed by Rajesh Yengisetty
Browse files

Implement a dialog that warns the user that we must expose the content of the file

by copying it out to an unsecure location in order to allow the external applications
to read the files.

Change-Id: I163ccd21678f413170e44cf3e8d341cd4747b1ac
parent d0d367d2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
  <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
  <uses-permission android:name="android.permission.NFC"/>
  <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
  <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
  <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
  <uses-permission android:name="com.cyanogenmod.filemanager.permissions.READ_THEME"/>

@@ -217,6 +218,13 @@
        <action android:name="android.intent.action.VIEW" />
      </intent-filter>
    </activity>
    <service android:name=".providers.secure.SecureCacheCleanupService">
      <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
        <action android:name="android.intent.action.QUICKBOOT_POWERON" />
        <action android:name="com.cyanogenmod.filemanager.ACTION_START_CLEANUP"/>
      </intent-filter>
    </service>

  </application>

+5 −0
Original line number Diff line number Diff line
@@ -815,6 +815,10 @@
    <string name="secure_storage_unlock_validation_length">Password must have at least <xliff:g id="characters">%1$d</xliff:g> characters.</string>
    <!-- Secure Storage unlock validation, equal -->
    <string name="secure_storage_unlock_validation_equals">Passwords do not match.</string>
    <!-- Secure storage open file warning -->
    <string name="secure_storage_open_file_warning">This will copy the file out to a temporary
        unencrypted location.  This will be cleared after 1 hour.</string>


    <!-- Print messages -->
    <!-- Unsupported document format -->
@@ -838,4 +842,5 @@
    <string name="welcome_msg">Welcome to the CyanogenMod file manager.\n\nThis app allows you to explore the file system and do operations that could break your device. To prevent damage, the app will start in a safe, low-privileged mode.\n\nYou can access the advanced, full-privileged mode via Settings. It\'s your responsibility to ensure that an operation doesn\'t break your system.\n\nThe CyanogenMod Team</string>

    <string name="activity_not_found_exception">Couldn\'t find an app to open this file</string>

</resources>
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import com.cyanogenmod.filemanager.preferences.AccessMode;
import com.cyanogenmod.filemanager.preferences.FileManagerSettings;
import com.cyanogenmod.filemanager.preferences.ObjectStringIdentifier;
import com.cyanogenmod.filemanager.preferences.Preferences;
import com.cyanogenmod.filemanager.providers.secure.SecureCacheCleanupService;
import com.cyanogenmod.filemanager.service.MimeTypeIndexService;
import com.cyanogenmod.filemanager.ui.ThemeManager;
import com.cyanogenmod.filemanager.ui.ThemeManager.Theme;
@@ -183,6 +184,9 @@ public final class FileManagerApplication extends Application {
        MimeTypeIndexService.indexFileRoot(this, externalStorage.getAbsolutePath());
        MimeTypeIndexService.indexFileRoot(this, Environment.getRootDirectory().getAbsolutePath());

        // Schedule in case not scheduled (i.e. never booted with this app on device
        SecureCacheCleanupService.scheduleCleanup(getApplicationContext());

    }

    /**
+5 −0
Original line number Diff line number Diff line
@@ -1948,6 +1948,11 @@ public class NavigationActivity extends Activity
        // Ignored
    }

    @Override
    public void onCancel(){
        // nop
    }

    /**
     * {@inheritDoc}
     */
+5 −0
Original line number Diff line number Diff line
@@ -1213,6 +1213,11 @@ public class SearchActivity extends Activity
        }
    }

    @Override
    public void onCancel() {
        // nop
    }

    /**
     * Method that returns to previous activity.
     *
Loading