194b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng/*
2fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Cheng * Copyright (C) 2013 The Android Open Source Project
394b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng *
494b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng * Licensed under the Apache License, Version 2.0 (the "License");
594b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng * you may not use this file except in compliance with the License.
694b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng * You may obtain a copy of the License at
794b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng *
894b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng *      http://www.apache.org/licenses/LICENSE-2.0
994b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng *
1094b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng * Unless required by applicable law or agreed to in writing, software
1194b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng * distributed under the License is distributed on an "AS IS" BASIS,
1294b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1394b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng * See the License for the specific language governing permissions and
14fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Cheng * limitations under the License
1594b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng */
1694b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng
1794b10b530c0fc297e2974e57e094c500d3ee6003Chiao Chengpackage com.android.dialer.calllog;
1894b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng
1994b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng/**
2024ec319f8d410be8a1923c4033f927165876cbabYorke Lee * Modified version of {@link com.android.dialer.calllog.PhoneNumberDisplayHelper} to be used in tests
21fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Cheng * that allows injecting the voicemail number.
2294b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng */
23fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Chengpublic final class TestPhoneNumberUtilsWrapper extends PhoneNumberUtilsWrapper {
2494b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng    private CharSequence mVoicemailNumber;
2594b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng
26fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Cheng    public TestPhoneNumberUtilsWrapper(CharSequence voicemailNumber) {
2794b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng        mVoicemailNumber = voicemailNumber;
2894b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng    }
2994b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng
30fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Cheng    @Override
31fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Cheng    public boolean isVoicemailNumber(CharSequence number) {
32fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Cheng        return mVoicemailNumber.equals(number);
33fb0a934ad90f1855787563eb80f2c8fff7f640acChiao Cheng    }
3494b10b530c0fc297e2974e57e094c500d3ee6003Chiao Cheng}
35