Skip to content

Commit

Permalink
Merge pull request google#1970 from google/dev-v2-r2.0.4
Browse files Browse the repository at this point in the history
r2.0.4
  • Loading branch information
ojw28 authored Oct 20, 2016
2 parents 08256ee + c7824c4 commit d79f8f6
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 21 deletions.
19 changes: 12 additions & 7 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
# Release notes #

### r2.0.3 ###
### r2.0.4 ###

This release contains important bug fixes. Users of r2.0.0, r2.0.1 and r2.0.2
This release contains important bug fixes. Users of earlier r2.0.x versions
should proactively update to this version.

* Fix crash on Jellybean devices when using playback controls
([#1965](https://github.com/google/ExoPlayer/issues/1965)).

### r2.0.3 ###

* Fixed NullPointerException in ExtractorMediaSource
([#1914](https://github.com/google/ExoPlayer/issues/1914).
([#1914](https://github.com/google/ExoPlayer/issues/1914)).
* Fixed NullPointerException in HlsMediaPeriod
([#1907](https://github.com/google/ExoPlayer/issues/1907).
([#1907](https://github.com/google/ExoPlayer/issues/1907)).
* Fixed memory leak in PlaybackControlView
([#1908](https://github.com/google/ExoPlayer/issues/1908).
([#1908](https://github.com/google/ExoPlayer/issues/1908)).
* Fixed strict mode violation when using
SimpleExoPlayer.setVideoPlayerTextureView().
* Fixed L3 Widevine provisioning
([#1925](https://github.com/google/ExoPlayer/issues/1925).
([#1925](https://github.com/google/ExoPlayer/issues/1925)).
* Fixed hiding of controls with use_controller="false"
([#1919](https://github.com/google/ExoPlayer/issues/1919).
([#1919](https://github.com/google/ExoPlayer/issues/1919)).
* Improvements to Cronet network stack extension.
* Misc bug fixes.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ allprojects {
releaseRepoName = 'exoplayer'
releaseUserOrg = 'google'
releaseGroupId = 'com.google.android.exoplayer'
releaseVersion = 'r2.0.3'
releaseVersion = 'r2.0.4'
releaseWebsite = 'https://github.com/google/ExoPlayer'
}
}
4 changes: 2 additions & 2 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.exoplayer2.demo"
android:versionCode="2003"
android:versionName="2.0.3">
android:versionCode="2004"
android:versionName="2.0.4">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface ExoPlayerLibraryInfo {
/**
* The version of the library, expressed as a string.
*/
String VERSION = "2.0.3";
String VERSION = "2.0.4";

/**
* The version of the library, expressed as an integer.
Expand All @@ -32,7 +32,7 @@ public interface ExoPlayerLibraryInfo {
* corresponding integer version 1002003 (001-002-003), and "123.45.6" has the corresponding
* integer version 123045006 (123-045-006).
*/
int VERSION_INT = 2000003;
int VERSION_INT = 2000004;

/**
* Whether the library was compiled with {@link com.google.android.exoplayer2.util.Assertions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
private static final int SUFFIX_SEI_NUT = 40;

private TrackOutput output;
private SampleReader sampleReader;
private SeiReader seiReader;

// State that should not be reset on seek.
Expand All @@ -56,7 +57,6 @@
private final NalUnitTargetBuffer pps;
private final NalUnitTargetBuffer prefixSei;
private final NalUnitTargetBuffer suffixSei; // TODO: Are both needed?
private final SampleReader sampleReader;
private long totalBytesWritten;

// Per packet state that gets reset at the start of each packet.
Expand All @@ -72,7 +72,6 @@ public H265Reader() {
pps = new NalUnitTargetBuffer(PPS_NUT, 128);
prefixSei = new NalUnitTargetBuffer(PREFIX_SEI_NUT, 128);
suffixSei = new NalUnitTargetBuffer(SUFFIX_SEI_NUT, 128);
sampleReader = new SampleReader(output);
seiWrapper = new ParsableByteArray();
}

Expand All @@ -91,6 +90,7 @@ public void seek() {
@Override
public void init(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) {
output = extractorOutput.track(idGenerator.getNextId());
sampleReader = new SampleReader(output);
seiReader = new SeiReader(extractorOutput.track(idGenerator.getNextId()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package com.google.android.exoplayer2.ui;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.SystemClock;
Expand Down Expand Up @@ -75,6 +76,7 @@ public interface VisibilityListener {
private ExoPlayer player;
private VisibilityListener visibilityListener;

private boolean isAttachedToWindow;
private boolean dragging;
private int rewindMs;
private int fastForwardMs;
Expand Down Expand Up @@ -264,7 +266,7 @@ private void hideAfterTimeout() {
removeCallbacks(hideAction);
if (showTimeoutMs > 0) {
hideAtMs = SystemClock.uptimeMillis() + showTimeoutMs;
if (isAttachedToWindow()) {
if (isAttachedToWindow) {
postDelayed(hideAction, showTimeoutMs);
}
} else {
Expand All @@ -279,7 +281,7 @@ private void updateAll() {
}

private void updatePlayPauseButton() {
if (!isVisible() || !isAttachedToWindow()) {
if (!isVisible() || !isAttachedToWindow) {
return;
}
boolean playing = player != null && player.getPlayWhenReady();
Expand All @@ -291,7 +293,7 @@ private void updatePlayPauseButton() {
}

private void updateNavigation() {
if (!isVisible() || !isAttachedToWindow()) {
if (!isVisible() || !isAttachedToWindow) {
return;
}
Timeline currentTimeline = player != null ? player.getCurrentTimeline() : null;
Expand All @@ -315,7 +317,7 @@ private void updateNavigation() {
}

private void updateProgress() {
if (!isVisible() || !isAttachedToWindow()) {
if (!isVisible() || !isAttachedToWindow) {
return;
}
long duration = player == null ? 0 : player.getDuration();
Expand Down Expand Up @@ -350,13 +352,18 @@ private void updateProgress() {
private void setButtonEnabled(boolean enabled, View view) {
view.setEnabled(enabled);
if (Util.SDK_INT >= 11) {
view.setAlpha(enabled ? 1f : 0.3f);
setViewAlphaV11(view, enabled ? 1f : 0.3f);
view.setVisibility(VISIBLE);
} else {
view.setVisibility(enabled ? VISIBLE : INVISIBLE);
}
}

@TargetApi(11)
private void setViewAlphaV11(View view, float alpha) {
view.setAlpha(alpha);
}

private String stringForTime(long timeMs) {
if (timeMs == C.TIME_UNSET) {
timeMs = 0;
Expand Down Expand Up @@ -426,6 +433,7 @@ private void fastForward() {
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
isAttachedToWindow = true;
if (hideAtMs != C.TIME_UNSET) {
long delayMs = hideAtMs - SystemClock.uptimeMillis();
if (delayMs <= 0) {
Expand All @@ -440,6 +448,7 @@ public void onAttachedToWindow() {
@Override
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
isAttachedToWindow = false;
removeCallbacks(updateProgressAction);
removeCallbacks(hideAction);
}
Expand Down
4 changes: 2 additions & 2 deletions playbacktests/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.playbacktests"
android:versionCode="2003"
android:versionName="2.0.3">
android:versionCode="2004"
android:versionName="2.0.4">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
Expand Down

0 comments on commit d79f8f6

Please sign in to comment.