コード例 #1
0
 /// <summary>
 /// Saves the current state to bundle
 /// </summary>
 /// <param name="savedState"> the bundle we should save to </param>
 internal virtual void writeToBundle(Bundle savedState)
 {
     savedState.putString(MEDIA_URI, mMediaUri != null ? mMediaUri.ToString() : null);
     savedState.putString(COVER_URI, mAlbumArtUri != null ? mAlbumArtUri.ToString() : null);
     savedState.putString(TITLE, mTitle);
     savedState.putString(ARTIST, mArtist);
     savedState.putString(MIMETYPE, mMimeType);
     savedState.putString(PLAYER_STATE, mPlayback != null ? mPlayback.ToString() : null);
     savedState.putInt(POSITION, mPosition);
     savedState.putInt(DURATION, mDuration);
     savedState.putInt(MUTE, mMute ? 1 : 0);
     savedState.putString(DEVICE_ID, mDeviceId);
 }
コード例 #2
0
            /// <summary>
            /// Saves the current state to bundle
            /// </summary>
            /// <param name="savedState"> the bundle we should save to </param>
            internal virtual void writeToBundle(Bundle savedState)
            {
                savedState.putString(MEDIA_URI, mMediaUri.ToString());

                if (mSubtitlesUri != null)
                {
                    savedState.putString(SUBTITLES_URI, mSubtitlesUri.ToString());
                }

                savedState.putString(TITLE, mTitle);
                savedState.putString(MIME_TYPE, mMimeType);
                savedState.putString(PLAYER_STATE, mPlayback.ToString());
                savedState.putInt(POSITION, mPosition);
                savedState.putInt(DURATION, mDuration);
                savedState.putInt(MUTE, mMute?1:0);
                savedState.putString(DEVICE_ID, mDeviceId);
            }