Skip to content

Commit

Permalink
Show auth progress
Browse files Browse the repository at this point in the history
  • Loading branch information
xwz committed Sep 23, 2015
1 parent c7d70bb commit 147a0f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.View;
import android.widget.MediaController;
import android.widget.Toast;

import com.google.android.exoplayer.ExoPlayer;
Expand Down Expand Up @@ -100,6 +99,11 @@ public void onReceive(Context context, Intent intent) {
if (ContentManagerBase.CONTENT_AUTH_ERROR.equals(action)) {
authFailed(intent);
}
if (ContentManagerBase.CONTENT_AUTH_FETCHING.equals(action)) {
if (videoPlayerView != null) {
videoPlayerView.showStatusText("Preparing...");
}
}
}
};

Expand Down Expand Up @@ -193,6 +197,7 @@ public void onVisibleBehindCanceled() {
private void registerReceiver() {
Log.i(TAG, "Register receiver");
IntentFilter filter = new IntentFilter();
filter.addAction(ContentManagerBase.CONTENT_AUTH_FETCHING);
filter.addAction(ContentManagerBase.CONTENT_AUTH_START);
filter.addAction(ContentManagerBase.CONTENT_AUTH_DONE);
filter.addAction(ContentManagerBase.CONTENT_AUTH_ERROR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import java.util.Arrays;
import java.util.List;

import io.github.xwz.base.R;
import io.github.xwz.base.api.EpisodeBaseModel;
import io.github.xwz.base.player.VideoPlayer;
import io.github.xwz.base.R;

public class VideoPlayerView {
private static final String TAG = "VideoPlayerView";
Expand Down Expand Up @@ -289,7 +289,7 @@ private void hideStatusText() {
statusTextView.setVisibility(View.GONE);
}

private void showStatusText(String text) {
public void showStatusText(String text) {
statusTextView.setVisibility(View.VISIBLE);
statusTextView.setText(text);
}
Expand Down

0 comments on commit 147a0f2

Please sign in to comment.