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

Commit 89c61586 authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

Merge "Color aspects keys information stored database"

am: e4c918ba

Change-Id: I86084365ec7d0bc5cd8790cc9b5911c8c3fed63e
parents 6e4f0f3e e4c918ba
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -2090,6 +2090,27 @@ public final class MediaStore {
             * <P>Type: INTEGER</P>
             */
            public static final String BOOKMARK = "bookmark";

            /**
             * The standard of color aspects
             * <P>Type: INTEGER</P>
             * @hide
             */
            public static final String COLOR_STANDARD = "color_standard";

            /**
             * The transfer of color aspects
             * <P>Type: INTEGER</P>
             * @hide
             */
            public static final String COLOR_TRANSFER = "color_transfer";

            /**
             * The range of color aspects
             * <P>Type: INTEGER</P>
             * @hide
             */
            public static final String COLOR_RANGE = "color_range";
        }

        public static final class Media implements VideoColumns {
+21 −0
Original line number Diff line number Diff line
@@ -513,6 +513,9 @@ public class MediaScanner implements AutoCloseable {
        private boolean mScanSuccess;
        private int mWidth;
        private int mHeight;
        private int mColorStandard;
        private int mColorTransfer;
        private int mColorRange;

        public MyMediaScannerClient() {
            mDateFormatter = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
@@ -592,6 +595,9 @@ public class MediaScanner implements AutoCloseable {
            mCompilation = 0;
            mWidth = 0;
            mHeight = 0;
            mColorStandard = -1;
            mColorTransfer = -1;
            mColorRange = -1;

            return entry;
        }
@@ -760,6 +766,12 @@ public class MediaScanner implements AutoCloseable {
                mWidth = parseSubstring(value, 0, 0);
            } else if (name.equalsIgnoreCase("height")) {
                mHeight = parseSubstring(value, 0, 0);
            } else if (name.equalsIgnoreCase("colorstandard")) {
                mColorStandard = parseSubstring(value, 0, -1);
            } else if (name.equalsIgnoreCase("colortransfer")) {
                mColorTransfer = parseSubstring(value, 0, -1);
            } else if (name.equalsIgnoreCase("colorrange")) {
                mColorRange = parseSubstring(value, 0, -1);
            } else {
                //Log.v(TAG, "unknown tag: " + name + " (" + mProcessGenres + ")");
            }
@@ -906,6 +918,15 @@ public class MediaScanner implements AutoCloseable {
                    if (resolution != null) {
                        map.put(Video.Media.RESOLUTION, resolution);
                    }
                    if (mColorStandard >= 0) {
                        map.put(Video.Media.COLOR_STANDARD, mColorStandard);
                    }
                    if (mColorTransfer >= 0) {
                        map.put(Video.Media.COLOR_TRANSFER, mColorTransfer);
                    }
                    if (mColorRange >= 0) {
                        map.put(Video.Media.COLOR_RANGE, mColorRange);
                    }
                    if (mDate > 0) {
                        map.put(Video.Media.DATE_TAKEN, mDate);
                    }