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.utils;
18 
19 import android.support.annotation.IntDef;
20 import java.lang.annotation.Retention;
21 import java.lang.annotation.RetentionPolicy;
22 
23 /**
24  * Defines different states of session modify requests, which are used to upgrade to video, or
25  * downgrade to audio.
26  */
27 @Retention(RetentionPolicy.SOURCE)
28 @IntDef({
29   SessionModificationState.NO_REQUEST,
30   SessionModificationState.WAITING_FOR_UPGRADE_TO_VIDEO_RESPONSE,
31   SessionModificationState.REQUEST_FAILED,
32   SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST,
33   SessionModificationState.UPGRADE_TO_VIDEO_REQUEST_TIMED_OUT,
34   SessionModificationState.UPGRADE_TO_VIDEO_REQUEST_FAILED,
35   SessionModificationState.REQUEST_REJECTED,
36   SessionModificationState.WAITING_FOR_RESPONSE
37 })
38 public @interface SessionModificationState {
39   int NO_REQUEST = 0;
40   int WAITING_FOR_UPGRADE_TO_VIDEO_RESPONSE = 1;
41   int REQUEST_FAILED = 2;
42   int RECEIVED_UPGRADE_TO_VIDEO_REQUEST = 3;
43   int UPGRADE_TO_VIDEO_REQUEST_TIMED_OUT = 4;
44   int UPGRADE_TO_VIDEO_REQUEST_FAILED = 5;
45   int REQUEST_REJECTED = 6;
46   int WAITING_FOR_RESPONSE = 7;
47 }
48