android 陌生人电话不显示其归属地

时间:2014-09-25 10:11:39   收藏:0   阅读:298

  修改DefaultCallLogInsertionHelper.java (alps\packages\providers\contactsprovider\src\com\android\providers\contacts)

    @Override

    public void addComputedValues(ContentValues values) {

        // Insert the current country code, so we know the country the number belongs to.

        String countryIso = getCurrentCountryIso();

        /// M: @{

        Log.d(TAG, "addComputedValues() countryIso == [" + countryIso +"]");

        Log.d(TAG, "addComputedValues() geocoded == [" + getGeocodedLocationFor(values.getAsString(Calls.NUMBER), countryIso) +"]");

        /// @}

        values.put(Calls.COUNTRY_ISO, countryIso);

        // Insert the geocoded location, so that we do not need to compute it on the fly.

        //mtk add

        String name = values.getAsString(Calls.NAME);

        if(name == null || name.equals("")){

            return;

        }

        //mtk add end     

        values.put(Calls.GEOCODED_LOCATION,

                getGeocodedLocationFor(values.getAsString(Calls.NUMBER), countryIso));

    }

原文:http://blog.csdn.net/sergeycao/article/details/39395369

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!