Android 4.1以上实现归属地JA…

来源:互联网 发布:肿泡眼双眼皮手术知乎 编辑:程序博客网 时间:2024/06/05 02:01
       setGeoDescription(info, label);
java代码:    
       private void setGeoDescription(CallerInfo info,String label) {

       if(TextUtils.isEmpty(info.geoDescription))
          info.updateGeoDescription(mContext, info.phoneNumber);
           if(label!= null && !TextUtils.isEmpty(info.geoDescription))
           {
              mLabel.setText(label + "\n"+info.geoDescription);
             mLabel.setVisibility(View.VISIBLE); 
           }
           elseif(!TextUtils.isEmpty(info.geoDescription))
           {
          mPhoneNumber.setText(info.geoDescription);
          mPhoneNumber.setVisibility(View.VISIBLE);  
           
    }

调用方式:
在com/android/phone/callcard.java内:
在updateDisplayForPerson函数里的最后一句下面调用 setGeoDescription(info,label);即可

0 0
原创粉丝点击