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

Commit ad25333d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [14651914, 14651880, 14651759, 14652210, 14651594,...

Merge cherrypicks of [14651914, 14651880, 14651759, 14652210, 14651594, 14651881, 14651915, 14651882, 14651883, 14651799, 14652154, 14651595, 14651760, 14652271, 14652272, 14652273, 14652056, 14651800, 14651801, 14651802, 14651884, 14651885, 14651886, 14652274, 14652275, 14652276, 14652277, 14652278, 14651894, 14651723, 14652211, 14651895, 14651916, 14651887, 14651888, 14651596, 14651889, 14652212, 14651761, 14652310, 14652311, 14651973, 14651974, 14652312, 14652313, 14651896, 14651803] into rvc-qpr3-release

Change-Id: Id310526e00961f21eafd8fa5e8a4a865a38a9559
parents bb97a4de e618fd8f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -110,6 +110,12 @@ public class BluetoothOppSendFileInfo {
        // This will allow more 3rd party applications to share files via
        // bluetooth
        if ("content".equals(scheme)) {
            if (fromExternal && BluetoothOppUtility.isForbiddenContent(uri)) {
                EventLog.writeEvent(0x534e4554, "179910660", -1, uri.toString());
                Log.e(TAG, "Content from forbidden URI is not allowed.");
                return SEND_FILE_INFO_ERROR;
            }

            contentType = contentResolver.getType(uri);
            Cursor metadataCursor;
            try {
+7 −0
Original line number Diff line number Diff line
@@ -448,6 +448,13 @@ public class BluetoothOppUtility {
        return isSameOrSubDirectory(Environment.getExternalStorageDirectory(), file);
    }

    static boolean isForbiddenContent(Uri uri) {
        if ("com.android.bluetooth.map.MmsFileProvider".equals(uri.getHost())) {
            return true;
        }
        return false;
    }

    /**
     * Checks, whether the child directory is the same as, or a sub-directory of the base
     * directory. Neither base nor child should be null.