blob: f67c64bbd4f7a3a9f8f4fddc1a4ec901b4848827 [file] [log] [blame]
Ta-wei Yen902b9b02016-01-27 14:07:51 -08001/*
2 * Copyright (C) 2016 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
17package com.android.phone;
18
19import android.content.Context;
20import android.provider.VoicemailContract;
21import android.provider.VoicemailContract.Status;
22import android.telecom.PhoneAccountHandle;
23
24public class VoicemailUtils {
25
26 public static void setConfigurationState(Context context, PhoneAccountHandle accountHandle,
27 int configurationState) {
28 VoicemailContract.Status.setStatus(context, accountHandle,
29 configurationState,
30 Status.DATA_CHANNEL_STATE_IGNORE,
31 Status.NOTIFICATION_CHANNEL_STATE_IGNORE);
32 }
33
34 public static void setDataChannelState(Context context, PhoneAccountHandle accountHandle,
35 int dataChannelState) {
36 VoicemailContract.Status.setStatus(context, accountHandle,
37 Status.CONFIGURATION_STATE_IGNORE,
38 dataChannelState,
39 Status.NOTIFICATION_CHANNEL_STATE_IGNORE);
40 }
41
42 public static void setNotificationChannelState(Context context,
43 PhoneAccountHandle accountHandle, int notificationChannelState) {
44 VoicemailContract.Status.setStatus(context, accountHandle,
45 Status.CONFIGURATION_STATE_IGNORE,
46 Status.DATA_CHANNEL_STATE_IGNORE,
47 notificationChannelState);
48 }
49}