1 /* 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 17 package com.android.incallui.bindings; 18 19 import android.content.Context; 20 import android.content.Intent; 21 import android.support.annotation.Nullable; 22 import com.android.dialer.common.ConfigProvider; 23 24 /** Default implementation for InCallUi bindings. */ 25 public class InCallUiBindingsStub implements InCallUiBindings { 26 private ConfigProvider configProvider; 27 28 @Override 29 @Nullable newPhoneNumberService(Context context)30 public PhoneNumberService newPhoneNumberService(Context context) { 31 return null; 32 } 33 34 @Override 35 @Nullable getUiReadyBroadcastIntent(Context context)36 public Intent getUiReadyBroadcastIntent(Context context) { 37 return null; 38 } 39 40 @Override 41 @Nullable getCallStateButtonBroadcastIntent(Context context)42 public Intent getCallStateButtonBroadcastIntent(Context context) { 43 return null; 44 } 45 46 @Override 47 @Nullable newDistanceHelper(Context context, DistanceHelper.Listener listener)48 public DistanceHelper newDistanceHelper(Context context, DistanceHelper.Listener listener) { 49 return null; 50 } 51 52 @Override 53 @Nullable getContactUtilsInstance(Context context)54 public ContactUtils getContactUtilsInstance(Context context) { 55 return null; 56 } 57 58 @Override getConfigProvider()59 public ConfigProvider getConfigProvider() { 60 if (configProvider == null) { 61 configProvider = 62 new ConfigProvider() { 63 @Override 64 public String getString(String key, String defaultValue) { 65 return defaultValue; 66 } 67 68 @Override 69 public long getLong(String key, long defaultValue) { 70 return defaultValue; 71 } 72 73 @Override 74 public boolean getBoolean(String key, boolean defaultValue) { 75 return defaultValue; 76 } 77 }; 78 } 79 return configProvider; 80 } 81 } 82