1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License
15  */
16 
17 package com.android.incallui.videotech.empty;
18 
19 import android.content.Context;
20 import com.android.dialer.common.Assert;
21 import com.android.incallui.video.protocol.VideoCallScreen;
22 import com.android.incallui.video.protocol.VideoCallScreenDelegate;
23 import com.android.incallui.videotech.VideoTech;
24 import com.android.incallui.videotech.utils.SessionModificationState;
25 
26 /** Default video tech that is always available but doesn't do anything. */
27 public class EmptyVideoTech implements VideoTech {
28 
29   @Override
isAvailable(Context context)30   public boolean isAvailable(Context context) {
31     return false;
32   }
33 
34   @Override
isTransmittingOrReceiving()35   public boolean isTransmittingOrReceiving() {
36     return false;
37   }
38 
39   @Override
isSelfManagedCamera()40   public boolean isSelfManagedCamera() {
41     return false;
42   }
43 
44   @Override
shouldUseSurfaceView()45   public boolean shouldUseSurfaceView() {
46     return false;
47   }
48 
49   @Override
createVideoCallScreenDelegate( Context context, VideoCallScreen videoCallScreen)50   public VideoCallScreenDelegate createVideoCallScreenDelegate(
51       Context context, VideoCallScreen videoCallScreen) {
52     throw Assert.createUnsupportedOperationFailException();
53   }
54 
55   @Override
onCallStateChanged(Context context, int newState)56   public void onCallStateChanged(Context context, int newState) {}
57 
58   @Override
getSessionModificationState()59   public int getSessionModificationState() {
60     return SessionModificationState.NO_REQUEST;
61   }
62 
63   @Override
upgradeToVideo()64   public void upgradeToVideo() {}
65 
66   @Override
acceptVideoRequest()67   public void acceptVideoRequest() {}
68 
69   @Override
acceptVideoRequestAsAudio()70   public void acceptVideoRequestAsAudio() {}
71 
72   @Override
declineVideoRequest()73   public void declineVideoRequest() {}
74 
75   @Override
isTransmitting()76   public boolean isTransmitting() {
77     return false;
78   }
79 
80   @Override
stopTransmission()81   public void stopTransmission() {}
82 
83   @Override
resumeTransmission()84   public void resumeTransmission() {}
85 
86   @Override
pause()87   public void pause() {}
88 
89   @Override
unpause()90   public void unpause() {}
91 
92   @Override
setCamera(String cameraId)93   public void setCamera(String cameraId) {}
94 
95   @Override
setDeviceOrientation(int rotation)96   public void setDeviceOrientation(int rotation) {}
97 }
98