• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 android.support.annotation.Nullable;
21 import com.android.dialer.common.Assert;
22 import com.android.incallui.video.protocol.VideoCallScreen;
23 import com.android.incallui.video.protocol.VideoCallScreenDelegate;
24 import com.android.incallui.videotech.VideoTech;
25 import com.android.incallui.videotech.utils.SessionModificationState;
26 
27 /** Default video tech that is always available but doesn't do anything. */
28 public class EmptyVideoTech implements VideoTech {
29 
30   @Override
isAvailable(Context context)31   public boolean isAvailable(Context context) {
32     return false;
33   }
34 
35   @Override
isTransmittingOrReceiving()36   public boolean isTransmittingOrReceiving() {
37     return false;
38   }
39 
40   @Override
isSelfManagedCamera()41   public boolean isSelfManagedCamera() {
42     return false;
43   }
44 
45   @Override
shouldUseSurfaceView()46   public boolean shouldUseSurfaceView() {
47     return false;
48   }
49 
50   @Override
createVideoCallScreenDelegate( Context context, VideoCallScreen videoCallScreen)51   public VideoCallScreenDelegate createVideoCallScreenDelegate(
52       Context context, VideoCallScreen videoCallScreen) {
53     throw Assert.createUnsupportedOperationFailException();
54   }
55 
56   @Override
onCallStateChanged(Context context, int newState)57   public void onCallStateChanged(Context context, int newState) {}
58 
59   @Override
onRemovedFromCallList()60   public void onRemovedFromCallList() {}
61 
62   @Override
getSessionModificationState()63   public int getSessionModificationState() {
64     return SessionModificationState.NO_REQUEST;
65   }
66 
67   @Override
upgradeToVideo()68   public void upgradeToVideo() {}
69 
70   @Override
acceptVideoRequest()71   public void acceptVideoRequest() {}
72 
73   @Override
acceptVideoRequestAsAudio()74   public void acceptVideoRequestAsAudio() {}
75 
76   @Override
declineVideoRequest()77   public void declineVideoRequest() {}
78 
79   @Override
isTransmitting()80   public boolean isTransmitting() {
81     return false;
82   }
83 
84   @Override
stopTransmission()85   public void stopTransmission() {}
86 
87   @Override
resumeTransmission()88   public void resumeTransmission() {}
89 
90   @Override
pause()91   public void pause() {}
92 
93   @Override
unpause()94   public void unpause() {}
95 
96   @Override
setCamera(@ullable String cameraId)97   public void setCamera(@Nullable String cameraId) {}
98 
99   @Override
setDeviceOrientation(int rotation)100   public void setDeviceOrientation(int rotation) {}
101 }
102