TIF: Enable inflating class android.media.tv.TvView on non-TV devices
Needed to pass the CTS for those devices. Bug: 17455222 Change-Id: Ief9a76835418906d9e8e06d4e5ddc71a3370055d
This commit is contained in:
@@ -709,7 +709,9 @@ public final class TvInputManager {
|
||||
}
|
||||
};
|
||||
try {
|
||||
mService.registerCallback(mManagerCallback, mUserId);
|
||||
if (mService != null) {
|
||||
mService.registerCallback(mManagerCallback, mUserId);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "mService.registerCallback failed: " + e);
|
||||
}
|
||||
|
||||
@@ -312,7 +312,9 @@ public class TvView extends ViewGroup {
|
||||
// is newly assigned for every createSession request and compared with
|
||||
// MySessionCreateCallback.this.
|
||||
mSessionCallback = new MySessionCallback(inputId, channelUri, params);
|
||||
mTvInputManager.createSession(inputId, mSessionCallback, mHandler);
|
||||
if (mTvInputManager != null) {
|
||||
mTvInputManager.createSession(inputId, mSessionCallback, mHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user