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

Commit 0e0d1c59 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge changes I4710a554,I28c8188b,Ia8d4b546

* changes:
  Set MediaPlayer sources in more direct fashion.
  Grant ringtone picker the ability to see Music.
  Also include snapshot value in APK cache digest.
parents a99c4f30 a0a955f8
Loading
Loading
Loading
Loading
+5 −16
Original line number Diff line number Diff line
@@ -1180,13 +1180,8 @@ public class MediaPlayer extends PlayerBase
        }

        final File file = new File(path);
        if (file.exists()) {
            FileInputStream is = new FileInputStream(file);
            FileDescriptor fd = is.getFD();
            setDataSource(fd);
            is.close();
        } else {
            throw new IOException("setDataSource failed.");
        try (FileInputStream is = new FileInputStream(file)) {
            setDataSource(is.getFD());
        }
    }

@@ -2868,15 +2863,9 @@ public class MediaPlayer extends PlayerBase
            throw new IllegalArgumentException(msg);
        }

        File file = new File(path);
        if (file.exists()) {
            FileInputStream is = new FileInputStream(file);
            FileDescriptor fd = is.getFD();
            addTimedTextSource(fd, mimeType);
            is.close();
        } else {
            // We do not support the case where the path is not a file.
            throw new IOException(path);
        final File file = new File(path);
        try (FileInputStream is = new FileInputStream(file)) {
            addTimedTextSource(is.getFD(), mimeType);
        }
    }

+2 −1
Original line number Diff line number Diff line
@@ -3306,7 +3306,8 @@ public class PackageManagerService extends IPackageManager.Stub
        // feature flags should cause us to invalidate any caches.
        final String cacheName = SystemProperties.digestOf(
                "ro.build.fingerprint",
                "persist.sys.isolated_storage");
                StorageManager.PROP_ISOLATED_STORAGE,
                StorageManager.PROP_ISOLATED_STORAGE_SNAPSHOT);
        // Reconcile cache directories, keeping only what we'd actually use.
        for (File cacheDir : FileUtils.listFilesOrEmpty(cacheBaseDir)) {
+1 −1
Original line number Diff line number Diff line
@@ -721,7 +721,7 @@ public final class DefaultPermissionGrantPolicy {
        grantSystemFixedPermissionsToSystemPackage(
                getDefaultSystemHandlerActivityPackage(
                        RingtoneManager.ACTION_RINGTONE_PICKER, userId),
                userId, STORAGE_PERMISSIONS);
                userId, STORAGE_PERMISSIONS, MEDIA_AURAL_PERMISSIONS);

        // TextClassifier Service
        String textClassifierPackageName =