List of usage examples for android.media.tv TvInputManager registerCallback
public void registerCallback(@NonNull TvInputCallback callback, @NonNull Handler handler)
From source file:com.android.tv.dvr.DvrSessionManager.java
@VisibleForTesting DvrSessionManager(Context context, TvInputManager tvInputManager, Handler handler) { SoftPreconditions.checkFeatureEnabled(context, CommonFeatures.DVR, TAG); mTvInputManager = tvInputManager;/*from w w w. j a va 2 s. c o m*/ mContext = context.getApplicationContext(); for (TvInputInfo info : tvInputManager.getTvInputList()) { if (DEBUG) { Log.d(TAG, info + " canRecord=" + info.canRecord() + " tunerCount=" + info.getTunerCount()); } if (info.canRecord()) { mRecordingTvInputs.put(info.getId(), info); } } tvInputManager.registerCallback(this, handler); }