summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/InCallPresenter.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/incallui/InCallPresenter.java')
-rw-r--r--java/com/android/incallui/InCallPresenter.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java
index 3f87a592d..4cc03f3dd 100644
--- a/java/com/android/incallui/InCallPresenter.java
+++ b/java/com/android/incallui/InCallPresenter.java
@@ -1682,18 +1682,23 @@ public class InCallPresenter implements CallList.Listener {
VideoSurfaceTexture getLocalVideoSurfaceTexture() {
if (mLocalVideoSurfaceTexture == null) {
- mLocalVideoSurfaceTexture =
- VideoSurfaceBindings.createLocalVideoSurfaceTexture(
- mContext.getPackageManager().hasSystemFeature(PIXEL2017_SYSTEM_FEATURE));
+ boolean isPixel2017 = false;
+ if (mContext != null) {
+ isPixel2017 = mContext.getPackageManager().hasSystemFeature(PIXEL2017_SYSTEM_FEATURE);
+ }
+ mLocalVideoSurfaceTexture = VideoSurfaceBindings.createLocalVideoSurfaceTexture(isPixel2017);
}
return mLocalVideoSurfaceTexture;
}
VideoSurfaceTexture getRemoteVideoSurfaceTexture() {
if (mRemoteVideoSurfaceTexture == null) {
+ boolean isPixel2017 = false;
+ if (mContext != null) {
+ isPixel2017 = mContext.getPackageManager().hasSystemFeature(PIXEL2017_SYSTEM_FEATURE);
+ }
mRemoteVideoSurfaceTexture =
- VideoSurfaceBindings.createRemoteVideoSurfaceTexture(
- mContext.getPackageManager().hasSystemFeature(PIXEL2017_SYSTEM_FEATURE));
+ VideoSurfaceBindings.createRemoteVideoSurfaceTexture(isPixel2017);
}
return mRemoteVideoSurfaceTexture;
}