1 /*
2  * Copyright (C) 2023 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.server.companion.datatransfer.contextsync;
18 
19 import android.annotation.IntDef;
20 import android.companion.AssociationInfo;
21 
22 import java.lang.annotation.Retention;
23 import java.lang.annotation.RetentionPolicy;
24 import java.util.Set;
25 
26 /** Callback for call metadata syncing. */
27 public abstract class CrossDeviceSyncControllerCallback {
28 
29     static final int TYPE_CONNECTION_SERVICE = 1;
30     static final int TYPE_IN_CALL_SERVICE = 2;
31     @IntDef(prefix = { "TYPE_" }, value = {
32             TYPE_CONNECTION_SERVICE,
33             TYPE_IN_CALL_SERVICE,
34     })
35     @Retention(RetentionPolicy.SOURCE)
36     public @interface Type {
37     }
38 
processContextSyncMessage(int associationId, CallMetadataSyncData callMetadataSyncData)39     void processContextSyncMessage(int associationId, CallMetadataSyncData callMetadataSyncData) {}
40 
requestCrossDeviceSync(AssociationInfo associationInfo)41     void requestCrossDeviceSync(AssociationInfo associationInfo) {}
42 
updateNumberOfActiveSyncAssociations(int userId, boolean added)43     void updateNumberOfActiveSyncAssociations(int userId, boolean added) {}
44 
45     /** Clean up any remaining state for the given calls. */
cleanUpCallIds(Set<String> callIds)46     void cleanUpCallIds(Set<String> callIds) {}
47 }
48