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

Commit 59c14048 authored by Erik Almqvist's avatar Erik Almqvist Committed by Johan Redestig
Browse files

Set "isdrm" info in Mediastore

The mediascanner member mIsDrm was never set
according to the drmframework canHandle call.
This subsequently caused that the isdrm column
in mediastore was never set, and was defaulted
to false for all files.
mIsDrm is now set according to drmframework
canHandle result for each files that is scanned.

Change-Id: Id557d921c4e3e3dfc35da56b69471f4bd6b3c8bf
parent 568f923b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -441,6 +441,7 @@ public class MediaScanner
            mMimeType = mimeType;
            mFileType = 0;
            mFileSize = fileSize;
            mIsDrm = false;

            if (!isDirectory) {
                if (!noMedia && isNoMediaFile(path)) {
@@ -503,7 +504,6 @@ public class MediaScanner
            mLastModified = lastModified;
            mWriter = null;
            mCompilation = 0;
            mIsDrm = false;
            mWidth = 0;
            mHeight = 0;

@@ -1039,6 +1039,7 @@ public class MediaScanner
            }

            if (mDrmManagerClient.canHandle(path, null)) {
                mIsDrm = true;
                String drmMimetype = mDrmManagerClient.getOriginalMimeType(path);
                if (drmMimetype != null) {
                    mMimeType = drmMimetype;