aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tv/dvr/ui/browse/DvrDetailsActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/tv/dvr/ui/browse/DvrDetailsActivity.java')
-rw-r--r--src/com/android/tv/dvr/ui/browse/DvrDetailsActivity.java48
1 files changed, 19 insertions, 29 deletions
diff --git a/src/com/android/tv/dvr/ui/browse/DvrDetailsActivity.java b/src/com/android/tv/dvr/ui/browse/DvrDetailsActivity.java
index 35d21db8..0336b319 100644
--- a/src/com/android/tv/dvr/ui/browse/DvrDetailsActivity.java
+++ b/src/com/android/tv/dvr/ui/browse/DvrDetailsActivity.java
@@ -19,21 +19,16 @@ package com.android.tv.dvr.ui.browse;
import android.app.Activity;
import android.os.Bundle;
import android.support.v17.leanback.app.DetailsFragment;
-
import android.transition.Transition;
import android.transition.Transition.TransitionListener;
import android.view.View;
import com.android.tv.R;
-import com.android.tv.TvApplication;
+import com.android.tv.Starter;
import com.android.tv.dialog.PinDialogFragment;
-/**
- * Activity to show details view in DVR.
- */
+/** Activity to show details view in DVR. */
public class DvrDetailsActivity extends Activity implements PinDialogFragment.OnPinCheckedListener {
- /**
- * Name of record id added to the Intent.
- */
+ /** Name of record id added to the Intent. */
public static final String RECORDING_ID = "record_id";
/**
@@ -42,46 +37,38 @@ public class DvrDetailsActivity extends Activity implements PinDialogFragment.On
*/
public static final String HIDE_VIEW_SCHEDULE = "hide_view_schedule";
- /**
- * Name of details view's type added to the intent.
- */
+ /** Name of details view's type added to the intent. */
public static final String DETAILS_VIEW_TYPE = "details_view_type";
- /**
- * Name of shared element between activities.
- */
+ /** Name of shared element between activities. */
public static final String SHARED_ELEMENT_NAME = "shared_element";
- /**
- * CURRENT_RECORDING_VIEW refers to Current Recordings in DVR.
- */
+ /** Name of error message of a failed recording */
+ public static final String EXTRA_FAILED_MESSAGE = "failed_message";
+
+ /** CURRENT_RECORDING_VIEW refers to Current Recordings in DVR. */
public static final int CURRENT_RECORDING_VIEW = 1;
- /**
- * SCHEDULED_RECORDING_VIEW refers to Scheduled Recordings in DVR.
- */
+ /** SCHEDULED_RECORDING_VIEW refers to Scheduled Recordings in DVR. */
public static final int SCHEDULED_RECORDING_VIEW = 2;
- /**
- * RECORDED_PROGRAM_VIEW refers to Recorded programs in DVR.
- */
+ /** RECORDED_PROGRAM_VIEW refers to Recorded programs in DVR. */
public static final int RECORDED_PROGRAM_VIEW = 3;
- /**
- * SERIES_RECORDING_VIEW refers to series recording in DVR.
- */
+ /** SERIES_RECORDING_VIEW refers to series recording in DVR. */
public static final int SERIES_RECORDING_VIEW = 4;
private PinDialogFragment.OnPinCheckedListener mOnPinCheckedListener;
@Override
public void onCreate(Bundle savedInstanceState) {
- TvApplication.setCurrentRunningProcess(this, true);
+ Starter.start(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dvr_details);
long recordId = getIntent().getLongExtra(RECORDING_ID, -1);
int detailsViewType = getIntent().getIntExtra(DETAILS_VIEW_TYPE, -1);
boolean hideViewSchedule = getIntent().getBooleanExtra(HIDE_VIEW_SCHEDULE, false);
+ String failedMsg = getIntent().getStringExtra(EXTRA_FAILED_MESSAGE);
if (recordId != -1 && detailsViewType != -1 && savedInstanceState == null) {
Bundle args = new Bundle();
args.putLong(RECORDING_ID, recordId);
@@ -90,6 +77,7 @@ public class DvrDetailsActivity extends Activity implements PinDialogFragment.On
detailsFragment = new CurrentRecordingDetailsFragment();
} else if (detailsViewType == SCHEDULED_RECORDING_VIEW) {
args.putBoolean(HIDE_VIEW_SCHEDULE, hideViewSchedule);
+ args.putString(EXTRA_FAILED_MESSAGE, failedMsg);
detailsFragment = new ScheduledRecordingDetailsFragment();
} else if (detailsViewType == RECORDED_PROGRAM_VIEW) {
detailsFragment = new RecordedProgramDetailsFragment();
@@ -97,8 +85,10 @@ public class DvrDetailsActivity extends Activity implements PinDialogFragment.On
detailsFragment = new SeriesRecordingDetailsFragment();
}
detailsFragment.setArguments(args);
- getFragmentManager().beginTransaction()
- .replace(R.id.dvr_details_view_frame, detailsFragment).commit();
+ getFragmentManager()
+ .beginTransaction()
+ .replace(R.id.dvr_details_view_frame, detailsFragment)
+ .commit();
}
// This is a workaround for the focus on O device