Skip to content

Commit 2fc189d

Browse files
authored
Merge pull request #408 from androidx/release-1.0.2
1.0.2
2 parents 3c01488 + d77e79a commit 2fc189d

File tree

59 files changed

+1294
-372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1294
-372
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ body:
2020
label: Media3 Version
2121
description: What version of Media3 (or ExoPlayer) are you using?
2222
options:
23+
- Media3 1.1.0-alpha01
24+
- Media3 1.0.2
2325
- Media3 1.0.1
2426
- Media3 1.0.0
2527
- Media3 1.0.0-rc02
@@ -30,6 +32,8 @@ body:
3032
- Media3 1.0.0-alpha03
3133
- Media3 1.0.0-alpha02
3234
- Media3 1.0.0-alpha01
35+
- Media3 `main` branch
36+
- ExoPlayer 2.18.7
3337
- ExoPlayer 2.18.6
3438
- ExoPlayer 2.18.5
3539
- ExoPlayer 2.18.4
@@ -46,6 +50,7 @@ body:
4650
- ExoPlayer 2.14.2
4751
- ExoPlayer 2.14.1
4852
- ExoPlayer 2.14.0
53+
- ExoPlayer `dev-v2` branch
4954
- Older (unsupported)
5055
validations:
5156
required: true

RELEASENOTES.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Release notes
22

3+
### 1.0.2 (2023-05-18)
4+
5+
This release corresponds to the
6+
[ExoPlayer 2.18.7 release](https://github.com/google/ExoPlayer/releases/tag/r2.18.7).
7+
8+
This release contains the following changes since the
9+
[1.0.1 release](#101-2023-04-18):
10+
11+
* Core library:
12+
* Add `Buffer.isLastSample()` that denotes if `Buffer` contains flag
13+
`C.BUFFER_FLAG_LAST_SAMPLE`.
14+
* Fix issue where last frame may not be rendered if the last sample with
15+
frames is dequeued without reading the 'end of stream' sample.
16+
([#11079](https://github.com/google/ExoPlayer/issues/11079)).
17+
* Extractors:
18+
* Fix parsing of H.265 SPS in MPEG-TS files by re-using the parsing logic
19+
already used by RTSP and MP4 extractors
20+
([#303](https://github.com/androidx/media/issues/303)).
21+
* Text:
22+
* SSA: Add support for UTF-16 files if they start with a byte order mark
23+
([#319](https://github.com/androidx/media/issues/319)).
24+
* Session:
25+
* Fix issue where `MediaController` doesn't update its available commands
26+
when connected to a legacy `MediaSessionCompat` that updates its
27+
actions.
28+
* Fix bug that prevented the `MediaLibraryService` from returning null for
29+
a call from System UI to `Callback.onGetLibraryRoot` with
30+
`params.isRecent == true` on API 30
31+
([#355](https://github.com/androidx/media/issues/355)).
32+
* Fix memory leak of `MediaSessionService` or `MediaLibraryService`
33+
([#346](https://github.com/androidx/media/issues/346)).
34+
* Fix bug where a combined `Timeline` and position update in a
35+
`MediaSession` may cause a `MediaController` to throw an
36+
`IllegalStateException`.
37+
338
### 1.0.1 (2023-04-18)
439

540
This release corresponds to the

constants.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
project.ext {
15-
releaseVersion = '1.0.1'
16-
releaseVersionCode = 1_000_001_3_00
15+
releaseVersion = '1.0.2'
16+
releaseVersionCode = 1_000_002_3_00
1717
minSdkVersion = 16
1818
appTargetSdkVersion = 33
1919
// API version before restricting local file access.

core_settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ if (gradle.ext.has('androidxMediaModulePrefix')) {
2121
modulePrefix += gradle.ext.androidxMediaModulePrefix
2222
}
2323

24+
rootProject.name = gradle.ext.androidxMediaProjectName
25+
2426
include modulePrefix + 'lib-common'
2527
project(modulePrefix + 'lib-common').projectDir = new File(rootDir, 'libraries/common')
2628

demos/main/src/main/java/androidx/media3/demo/main/PlayerActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ public void onTracksChanged(Tracks tracks) {
514514

515515
private class PlayerErrorMessageProvider implements ErrorMessageProvider<PlaybackException> {
516516

517+
@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)
517518
@Override
518519
public Pair<Integer, String> getErrorMessage(PlaybackException e) {
519520
String errorString = getString(R.string.error_generic);

demos/main/src/main/java/androidx/media3/demo/main/SampleChooserActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import android.content.res.AssetManager;
2828
import android.net.Uri;
2929
import android.os.AsyncTask;
30+
import android.os.Build;
3031
import android.os.Bundle;
3132
import android.text.TextUtils;
3233
import android.util.JsonReader;
@@ -273,7 +274,7 @@ private void onSampleDownloadButtonClicked(PlaylistHolder playlistHolder) {
273274
Toast.makeText(getApplicationContext(), downloadUnsupportedStringId, Toast.LENGTH_LONG)
274275
.show();
275276
} else if (!notificationPermissionToastShown
276-
&& Util.SDK_INT >= 33
277+
&& Build.VERSION.SDK_INT >= 33
277278
&& checkSelfPermission(Api33.getPostNotificationPermissionString())
278279
!= PackageManager.PERMISSION_GRANTED) {
279280
downloadMediaItemWaitingForNotificationPermission = playlistHolder.mediaItems.get(0);

demos/session/src/main/java/androidx/media3/demo/session/PlaybackService.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package androidx.media3.demo.session
1717

18+
import android.annotation.SuppressLint
1819
import android.app.NotificationChannel
1920
import android.app.NotificationManager
2021
import android.app.PendingIntent.*
@@ -29,6 +30,7 @@ import androidx.media3.common.MediaItem
2930
import androidx.media3.common.util.Util
3031
import androidx.media3.exoplayer.ExoPlayer
3132
import androidx.media3.session.*
33+
import androidx.media3.session.LibraryResult.RESULT_ERROR_NOT_SUPPORTED
3234
import androidx.media3.session.MediaSession.ControllerInfo
3335
import com.google.common.collect.ImmutableList
3436
import com.google.common.util.concurrent.Futures
@@ -95,7 +97,7 @@ class PlaybackService : MediaLibraryService() {
9597
): MediaSession.ConnectionResult {
9698
val connectionResult = super.onConnect(session, controller)
9799
val availableSessionCommands = connectionResult.availableSessionCommands.buildUpon()
98-
customCommands.forEach { commandButton ->
100+
for (commandButton in customCommands) {
99101
// Add custom command to available session commands.
100102
commandButton.sessionCommand?.let { availableSessionCommands.add(it) }
101103
}
@@ -142,6 +144,12 @@ class PlaybackService : MediaLibraryService() {
142144
browser: ControllerInfo,
143145
params: LibraryParams?
144146
): ListenableFuture<LibraryResult<MediaItem>> {
147+
if (params != null && params.isRecent) {
148+
// The service currently does not support playback resumption. Tell System UI by returning
149+
// an error of type 'RESULT_ERROR_NOT_SUPPORTED' for a `params.isRecent` request. See
150+
// https://github.com/androidx/media/issues/355
151+
return Futures.immediateFuture(LibraryResult.ofError(RESULT_ERROR_NOT_SUPPORTED))
152+
}
145153
return Futures.immediateFuture(LibraryResult.ofItem(MediaItemTree.getRootItem(), params))
146154
}
147155

@@ -270,6 +278,7 @@ class PlaybackService : MediaLibraryService() {
270278
* by a media controller to resume playback when the {@link MediaSessionService} is in the
271279
* background.
272280
*/
281+
@SuppressLint("MissingPermission") // TODO: b/280766358 - Request this permission at runtime.
273282
override fun onForegroundServiceStartNotAllowedException() {
274283
val notificationManagerCompat = NotificationManagerCompat.from(this@PlaybackService)
275284
ensureNotificationChannel(notificationManagerCompat)

demos/session/src/main/java/androidx/media3/demo/session/PlayerActivity.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,6 @@ class PlayerActivity : AppCompatActivity() {
8888
initializeController()
8989
}
9090

91-
override fun onResume() {
92-
super.onResume()
93-
playerView.onResume()
94-
}
95-
96-
override fun onPause() {
97-
super.onPause()
98-
playerView.onPause()
99-
}
100-
10191
override fun onStop() {
10292
super.onStop()
10393
playerView.player = null

libraries/common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ rootProject.allprojects.forEach {
2323
evaluationDependsOn(':' + it.name)
2424
}
2525
}
26-
// copybara:media3-only
26+
2727
android {
2828
buildTypes {
2929
debug {

libraries/common/src/main/java/androidx/media3/common/MediaLibraryInfo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public final class MediaLibraryInfo {
2929

3030
/** The version of the library expressed as a string, for example "1.2.3" or "1.2.3-beta01". */
3131
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION_INT) or vice versa.
32-
public static final String VERSION = "1.0.1";
32+
public static final String VERSION = "1.0.2";
3333

3434
/** The version of the library expressed as {@code TAG + "/" + VERSION}. */
3535
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION) or vice versa.
36-
public static final String VERSION_SLASHY = "AndroidXMedia3/1.0.1";
36+
public static final String VERSION_SLASHY = "AndroidXMedia3/1.0.2";
3737

3838
/**
3939
* The version of the library expressed as an integer, for example 1002003300.
@@ -47,7 +47,7 @@ public final class MediaLibraryInfo {
4747
* (123-045-006-3-00).
4848
*/
4949
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION) or vice versa.
50-
public static final int VERSION_INT = 1_000_001_3_00;
50+
public static final int VERSION_INT = 1_000_002_3_00;
5151

5252
/** Whether the library was compiled with {@link Assertions} checks enabled. */
5353
public static final boolean ASSERTIONS_ENABLED = true;

0 commit comments

Comments
 (0)