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

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

Snap for 4678196 from c92f8b40 to pi-release

Change-Id: Iec53d55b7e13b58ca241aa63b72fa2b376ba2616
parents 1b5e4dde c92f8b40
Loading
Loading
Loading
Loading
+2 −18
Original line number Diff line number Diff line
@@ -195,17 +195,7 @@ public class RecoveryController {
     */
    public @NonNull Map<byte[], Integer> getRecoverySnapshotVersions()
            throws InternalRecoveryServiceException {
        try {
            // IPC doesn't support generic Maps.
            @SuppressWarnings("unchecked")
            Map<byte[], Integer> result =
                    (Map<byte[], Integer>) mBinder.getRecoverySnapshotVersions();
            return result;
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        } catch (ServiceSpecificException e) {
            throw wrapUnexpectedServiceSpecificException(e);
        }
        throw new UnsupportedOperationException();
    }

    /**
@@ -337,13 +327,7 @@ public class RecoveryController {
    @NonNull
    public @KeychainProtectionParams.UserSecretType int[] getPendingRecoverySecretTypes()
            throws InternalRecoveryServiceException {
        try {
            return mBinder.getPendingRecoverySecretTypes();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        } catch (ServiceSpecificException e) {
            throw wrapUnexpectedServiceSpecificException(e);
        }
        throw new UnsupportedOperationException();
    }

    /**
+0 −2
Original line number Diff line number Diff line
@@ -67,13 +67,11 @@ interface ILockSettings {
    String getKey(String alias);
    void removeKey(String alias);
    void setSnapshotCreatedPendingIntent(in PendingIntent intent);
    Map getRecoverySnapshotVersions();
    void setServerParams(in byte[] serverParams);
    void setRecoveryStatus(in String alias, int status);
    Map getRecoveryStatus();
    void setRecoverySecretTypes(in int[] secretTypes);
    int[] getRecoverySecretTypes();
    int[] getPendingRecoverySecretTypes();
    byte[] startRecoverySession(in String sessionId,
            in byte[] verifierPublicKey, in byte[] vaultParams, in byte[] vaultChallenge,
            in List<KeyChainProtectionParams> secrets);
+18 −15
Original line number Diff line number Diff line
@@ -3359,19 +3359,22 @@
    <skip />

    <!-- Notification title when external media is being checked [CHAR LIMIT=30] -->
    <string name="ext_media_checking_notification_title">Preparing <xliff:g id="name" example="SD card">%s</xliff:g></string>
    <string name="ext_media_checking_notification_title">Checking <xliff:g id="name" example="SD card">%s</xliff:g>\u2026</string>
    <!-- Notification body when external media is being checked [CHAR LIMIT=NONE] -->
    <string name="ext_media_checking_notification_message">Checking for errors</string>
    <string name="ext_media_checking_notification_message">Reviewing current content</string>

    <!-- Notification body when new external media is detected [CHAR LIMIT=30] -->
    <string name="ext_media_new_notification_title">New <xliff:g id="name" example="SD card">%s</xliff:g></string>
    <!-- Notification body when new external media is detected [CHAR LIMIT=NONE] -->
    <string name="ext_media_new_notification_message">New <xliff:g id="name" example="SD card">%s</xliff:g> detected</string>
    <string name="ext_media_new_notification_message">Tap to set up</string>

    <!-- Notification body when external media is ready for use [CHAR LIMIT=NONE] -->
    <string name="ext_media_ready_notification_message">For transferring photos and media</string>

    <!-- Notification title when external media is unmountable (corrupt) [CHAR LIMIT=30] -->
    <string name="ext_media_unmountable_notification_title">Corrupted <xliff:g id="name" example="SD card">%s</xliff:g></string>
    <string name="ext_media_unmountable_notification_title">Issue with <xliff:g id="name" example="SD card">%s</xliff:g></string>
    <!-- Notification body when external media is unmountable (corrupt) [CHAR LIMIT=NONE] -->
    <string name="ext_media_unmountable_notification_message"><xliff:g id="name" example="SD card">%s</xliff:g> is corrupt. Tap to fix.</string>
    <string name="ext_media_unmountable_notification_message">Tap to fix</string>
    <!-- TV-specifiv notification body when external media is unmountable (corrupt) [CHAR LIMIT=NONE] -->
    <string name="ext_media_unmountable_notification_message" product="tv"><xliff:g id="name" example="SD card">%s</xliff:g> is corrupt. Select to fix.</string>

@@ -3385,17 +3388,17 @@
    <!-- Notification title when external media is unsafely removed [CHAR LIMIT=30] -->
    <string name="ext_media_badremoval_notification_title"><xliff:g id="name" example="SD card">%s</xliff:g> unexpectedly removed</string>
    <!-- Notification body when external media is unsafely removed [CHAR LIMIT=NONE] -->
    <string name="ext_media_badremoval_notification_message">Unmount <xliff:g id="name" example="SD card">%s</xliff:g> before removing to avoid data loss</string>
    <string name="ext_media_badremoval_notification_message">Eject media before removing to avoid losing content</string>

    <!-- Notification title when external media is missing [CHAR LIMIT=30] -->
    <string name="ext_media_nomedia_notification_title">Removed <xliff:g id="name" example="SD card">%s</xliff:g></string>
    <string name="ext_media_nomedia_notification_title"><xliff:g id="name" example="SD card">%s</xliff:g> removed</string>
    <!-- Notification body when external media is missing [CHAR LIMIT=NONE] -->
    <string name="ext_media_nomedia_notification_message"><xliff:g id="name" example="SD card">%s</xliff:g> removed; insert a new one</string>
    <string name="ext_media_nomedia_notification_message">Some functionality may not work properly. Insert new storage.</string>

    <!-- Notification title when external media is unmounting [CHAR LIMIT=30] -->
    <string name="ext_media_unmounting_notification_title">Still ejecting <xliff:g id="name" example="SD card">%s</xliff:g>\u2026</string>
    <string name="ext_media_unmounting_notification_title">Ejecting <xliff:g id="name" example="SD card">%s</xliff:g></string>
    <!-- Notification body when external media is unmounting [CHAR LIMIT=NONE] -->
    <string name="ext_media_unmounting_notification_message">Don\'t remove</string>
    <string name="ext_media_unmounting_notification_message">Don\u2019t remove</string>

    <!-- Notification action to setup external media [CHAR LIMIT=20] -->
    <string name="ext_media_init_action">Set up</string>
@@ -3407,7 +3410,7 @@
    <!-- Notification title when external media is missing [CHAR LIMIT=30] -->
    <string name="ext_media_missing_title"><xliff:g id="name" example="SD card">%s</xliff:g> missing</string>
    <!-- Notification body when external media is missing [CHAR LIMIT=30] -->
    <string name="ext_media_missing_message">Reinsert this device</string>
    <string name="ext_media_missing_message">Insert device again</string>

    <!-- Notification title when moving an application to external storage [CHAR LIMIT=30] -->
    <string name="ext_media_move_specific_title">Moving <xliff:g id="name" example="Calculator">%s</xliff:g></string>
@@ -3415,14 +3418,14 @@
    <string name="ext_media_move_title">Moving data</string>

    <!-- Notification title when moving data to external storage [CHAR LIMIT=32] -->
    <string name="ext_media_move_success_title">Move complete</string>
    <string name="ext_media_move_success_title">Content transfer is done</string>
    <!-- Notification title when moving data to external storage [CHAR LIMIT=64] -->
    <string name="ext_media_move_success_message">Data moved to <xliff:g id="name" example="SD card">%s</xliff:g></string>
    <string name="ext_media_move_success_message">Content moved to <xliff:g id="name" example="SD card">%s</xliff:g></string>

    <!-- Notification title when moving data to external storage failed [CHAR LIMIT=32] -->
    <string name="ext_media_move_failure_title">Couldn\'t move data</string>
    <string name="ext_media_move_failure_title">Couldn\u2019t move content</string>
    <!-- Notification title when moving data to external storage failed [CHAR LIMIT=64] -->
    <string name="ext_media_move_failure_message">Data left at original location</string>
    <string name="ext_media_move_failure_message">Try moving content again</string>

    <!-- Short summary of storage media status when removed [CHAR LIMIT=32] -->
    <string name="ext_media_status_removed">Removed</string>
+46 −37
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.media;

import static android.media.MediaPlayerBase.BUFFERING_STATE_UNKNOWN;

import android.annotation.CallbackExecutor;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -166,13 +168,16 @@ public class MediaController2 implements AutoCloseable {
                float speed) { }

        /**
         * Called when the player's buffering position
         * Called to report buffering events for a data source.
         * <p>
         * Use {@link #getBufferedPosition()} for current buffering position.
         *
         * @param controller the controller for this event
         * @param positionMs buffering position in millis
         * @param item the media item for which buffering is happening.
         * @param state the new buffering state.
         */
        public void onBufferedPositionChanged(@NonNull MediaController2 controller,
                long positionMs) { }
        public void onBufferingStateChanged(@NonNull MediaController2 controller,
                @NonNull MediaItem2 item, @MediaPlayerBase.BuffState int state) { }

        /**
         * Called when a error from
@@ -193,7 +198,7 @@ public class MediaController2 implements AutoCloseable {
         * @param controller the controller for this event
         * @param item new item
         * @see #onPositionChanged(MediaController2, long, long)
         * @see #onBufferedPositionChanged(MediaController2, long)
         * @see #onBufferingStateChanged(MediaController2, MediaItem2, int)
         */
        // TODO(jaewan): Use this (b/74316764)
        public void onCurrentMediaItemChanged(@NonNull MediaController2 controller,
@@ -203,43 +208,37 @@ public class MediaController2 implements AutoCloseable {
         * Called when a playlist is changed.
         *
         * @param controller the controller for this event
         * @param playlistAgent playlist agent for this event
         * @param list new playlist
         * @param metadata new metadata
         */
        public void onPlaylistChanged(@NonNull MediaController2 controller,
                @NonNull MediaPlaylistAgent playlistAgent, @NonNull List<MediaItem2> list,
                @Nullable MediaMetadata2 metadata) { }
                @NonNull List<MediaItem2> list, @Nullable MediaMetadata2 metadata) { }

        /**
         * Called when a playlist metadata is changed.
         *
         * @param controller the controller for this event
         * @param playlistAgent playlist agent for this event
         * @param metadata new metadata
         */
        public void onPlaylistMetadataChanged(@NonNull MediaController2 controller,
                @NonNull MediaPlaylistAgent playlistAgent, @Nullable MediaMetadata2 metadata) { }
                @Nullable MediaMetadata2 metadata) { }

        /**
         * Called when the shuffle mode is changed.
         *
         * @param controller the controller for this event
         * @param playlistAgent playlist agent for this event
         * @param shuffleMode repeat mode
         * @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
         * @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
         * @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
         */
        public void onShuffleModeChanged(@NonNull MediaController2 controller,
                @NonNull MediaPlaylistAgent playlistAgent,
                @MediaPlaylistAgent.ShuffleMode int shuffleMode) { }

        /**
         * Called when the repeat mode is changed.
         *
         * @param controller the controller for this event
         * @param playlistAgent playlist agent for this event
         * @param repeatMode repeat mode
         * @see MediaPlaylistAgent#REPEAT_MODE_NONE
         * @see MediaPlaylistAgent#REPEAT_MODE_ONE
@@ -247,7 +246,6 @@ public class MediaController2 implements AutoCloseable {
         * @see MediaPlaylistAgent#REPEAT_MODE_GROUP
         */
        public void onRepeatModeChanged(@NonNull MediaController2 controller,
                @NonNull MediaPlaylistAgent playlistAgent,
                @MediaPlaylistAgent.RepeatMode int repeatMode) { }
    }

@@ -450,9 +448,11 @@ public class MediaController2 implements AutoCloseable {
    }

    /**
     * Revisit this API later.
     * @hide
     */
    public void skipForward() {
        // TODO(jaewan): (Post-P) Discuss this API later.
        // To match with KEYCODE_MEDIA_SKIP_FORWARD
    }

@@ -460,6 +460,7 @@ public class MediaController2 implements AutoCloseable {
     * @hide
     */
    public void skipBackward() {
        // TODO(jaewan): (Post-P) Discuss this API later.
        // To match with KEYCODE_MEDIA_SKIP_BACKWARD
    }

@@ -605,16 +606,15 @@ public class MediaController2 implements AutoCloseable {
    }

    /**
     * Get the lastly cached position from
     * {@link ControllerCallback#onPositionChanged(MediaController2, long, long)}.
     * Gets the current playback position.
     * <p>
     * This returns the calculated value of the position, based on the difference between the
     * update time and current time.
     *
     * @return position
     */
    public long getPosition() {
        return mProvider.getPosition_impl();
    public long getCurrentPosition() {
        return mProvider.getCurrentPosition_impl();
    }

    /**
@@ -634,9 +634,22 @@ public class MediaController2 implements AutoCloseable {
        // TODO(jaewan): implement this (b/74093080)
    }


    /**
     * Gets the current buffering state of the player.
     * During buffering, see {@link #getBufferedPosition()} for the quantifying the amount already
     * buffered.
     * @return the buffering state.
     */
    public @MediaPlayerBase.BuffState int getBufferingState() {
        // TODO(jaewan): Implement.
        return BUFFERING_STATE_UNKNOWN;
    }

    /**
     * Get the lastly cached buffered position from
     * {@link ControllerCallback#onBufferedPositionChanged(MediaController2, long)}.
     * Gets the lastly cached buffered position from the session when
     * {@link ControllerCallback#onBufferingStateChanged(MediaController2, MediaItem2, int)} is
     * called.
     *
     * @return buffering position in millis
     */
@@ -683,15 +696,14 @@ public class MediaController2 implements AutoCloseable {

    /**
     * Returns the cached playlist from
     * {@link ControllerCallback#onPlaylistChanged(MediaController2, MediaPlaylistAgent, List,
     * MediaMetadata2)}.
     * {@link ControllerCallback#onPlaylistChanged(MediaController2, List, MediaMetadata2)}.
     * <p>
     * This list may differ with the list that was specified with
     * {@link #setPlaylist(List, MediaMetadata2)} depending on the {@link MediaPlaylistAgent}
     * implementation. Use media items returned here for other playlist agent APIs such as
     * {@link MediaPlaylistAgent#skipToPlaylistItem(MediaItem2)}.
     * {@link #setPlaylist(List, MediaMetadata2)} depending on the session implementation. Use media
     * items returned here for other playlist APIs such as {@link #skipToPlaylistItem(MediaItem2)}.
     *
     * @return playlist. Can be {@code null} if the controller doesn't have enough permission.
     * @return The playlist. Can be {@code null} if the controller doesn't have enough permission or
     *         the session hasn't set any playlist.
     */
    public @Nullable List<MediaItem2> getPlaylist() {
        return mProvider.getPlaylist_impl();
@@ -707,8 +719,7 @@ public class MediaController2 implements AutoCloseable {
     * @param list playlist
     * @param metadata metadata of the playlist
     * @see #getPlaylist()
     * @see ControllerCallback#onPlaylistChanged(
     *      MediaController2, MediaPlaylistAgent, List, MediaMetadata2)
     * @see ControllerCallback#onPlaylistChanged(MediaController2, List, MediaMetadata2)
     */
    public void setPlaylist(@NonNull List<MediaItem2> list, @Nullable MediaMetadata2 metadata) {
        mProvider.setPlaylist_impl(list, metadata);
@@ -725,10 +736,8 @@ public class MediaController2 implements AutoCloseable {

    /**
     * Gets the lastly cached playlist playlist metadata either from
     * {@link ControllerCallback#onPlaylistMetadataChanged(
     * MediaController2, MediaPlaylistAgent, MediaMetadata2)} or
     * {@link ControllerCallback#onPlaylistChanged(
     * MediaController2, MediaPlaylistAgent, List, MediaMetadata2)}.
     * {@link ControllerCallback#onPlaylistMetadataChanged(MediaController2,  MediaMetadata2)} or
     * {@link ControllerCallback#onPlaylistChanged(MediaController2, List, MediaMetadata2)}.
     *
     * @return metadata metadata of the playlist, or null if none is set
     */
@@ -788,7 +797,7 @@ public class MediaController2 implements AutoCloseable {
    /**
     * Skips to the previous item in the playlist.
     * <p>
     * This calls {@link MediaPlaylistAgent#skipToPreviousItem()}.
     * This calls {@link MediaSession2#skipToPreviousItem()} if the session allows.
     */
     public void skipToPreviousItem() {
         mProvider.skipToPreviousItem_impl();
@@ -797,7 +806,7 @@ public class MediaController2 implements AutoCloseable {
    /**
     * Skips to the next item in the playlist.
     * <p>
     * This calls {@link MediaPlaylistAgent#skipToNextItem()}.
     * This calls {@link MediaSession2#skipToNextItem()} if the session allows.
     */
    public void skipToNextItem() {
        mProvider.skipToNextItem_impl();
@@ -806,7 +815,7 @@ public class MediaController2 implements AutoCloseable {
    /**
     * Skips to the item in the playlist.
     * <p>
     * This calls {@link MediaPlaylistAgent#skipToPlaylistItem(MediaItem2)}.
     * This calls {@link MediaSession2#skipToPlaylistItem(MediaItem2)} if the session allows.
     *
     * @param item The item in the playlist you want to play
     */
@@ -816,7 +825,7 @@ public class MediaController2 implements AutoCloseable {

    /**
     * Gets the cached repeat mode from the {@link ControllerCallback#onRepeatModeChanged(
     * MediaController2, MediaPlaylistAgent, int)}.
     * MediaController2, int)}.
     *
     * @return repeat mode
     * @see MediaPlaylistAgent#REPEAT_MODE_NONE
@@ -843,7 +852,7 @@ public class MediaController2 implements AutoCloseable {

    /**
     * Gets the cached shuffle mode from the {@link ControllerCallback#onShuffleModeChanged(
     * MediaController2, MediaPlaylistAgent, int)}.
     * MediaController2, int)}.
     *
     * @return The shuffle mode
     * @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
+7 −0
Original line number Diff line number Diff line
@@ -337,6 +337,13 @@ public abstract class MediaPlayerBase implements AutoCloseable {
         */
        public void onBufferingStateChanged(@NonNull MediaPlayerBase mpb,
                @NonNull DataSourceDesc dsd, @BuffState int state) { }

        /**
         * Called to indicate that the playback speed has changed.
         * @param mpb the player that is buffering
         * @param speed the new playback speed.
         */
        public void onPlaybackSpeedChanged(@NonNull MediaPlayerBase mpb, float speed) { }
    }

}
Loading