Example usage for android.media.tv TvInputManager registerCallback

List of usage examples for android.media.tv TvInputManager registerCallback

Introduction

In this page you can find the example usage for android.media.tv TvInputManager registerCallback.

Prototype

public void registerCallback(@NonNull TvInputCallback callback, @NonNull Handler handler) 

Source Link

Document

Registers a TvInputCallback .

Usage

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);

}