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

Commit 26a43094 authored by RoboErik's avatar RoboErik Committed by Android Git Automerger
Browse files

am 578fbe89: Merge "Set the metadata rating correctly in RCC" into lmp-dev

* commit '578fbe89':
  Set the metadata rating correctly in RCC
parents 2f831575 578fbe89
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -535,6 +535,21 @@ import java.lang.IllegalArgumentException;
            return this;
            return this;
        }
        }


        @Override
        public synchronized MetadataEditor putObject(int key, Object object)
                throws IllegalArgumentException {
            super.putObject(key, object);
            if (mMetadataBuilder != null &&
                    (key == MediaMetadataEditor.RATING_KEY_BY_USER ||
                    key == MediaMetadataEditor.RATING_KEY_BY_OTHERS)) {
                String metadataKey = MediaMetadata.getKeyFromMetadataEditorKey(key);
                if (metadataKey != null) {
                    mMetadataBuilder.putRating(metadataKey, (Rating) object);
                }
            }
            return this;
        }

        /**
        /**
         * Clears all the metadata that has been set since the MetadataEditor instance was created
         * Clears all the metadata that has been set since the MetadataEditor instance was created
         * (with {@link RemoteControlClient#editMetadata(boolean)}).
         * (with {@link RemoteControlClient#editMetadata(boolean)}).