本站长期提供ROM下载,可以定制多国语言刷机包和和刷机方案。点击这里给我发消息

CM10归属地添加教程

ROM相关 半夏月 375℃ 0评论

1,提取system/app/Phone.apk,在用解压软件打开提取里面的classes.dex

使用Notepad++打开com/android/phone/CallCard.smali文件

查找
.method private static final showCachedImage(Landroid/widget/ImageView;Lcom/android/internal/telephony/CallerInfo;)Z

在这个代码上面加上以下代码

.method private setGeoDescription(Lcom/android/internal/telephony/CallerInfo;)V
.registers 5
.parameter “info”

.prologue
const/16 v2, 0x8

.line 36
if-nez p1, :cond_5

.line 51
:cond_4
:goto_4
return-void

.line 38
:cond_5
iget-object v0, p0, Lcom/android/phone/CallCard;->mCallTypeLabel:Landroid/widget/TextView;

invoke-virtual {v0}, Landroid/widget/TextView;->getVisibility()I

move-result v0

if-ne v0, v2, :cond_4

.line 39
iget-object v0, p1, Lcom/android/internal/telephony/CallerInfo;->geoDescription:Ljava/lang/String;

invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

move-result v0

if-eqz v0, :cond_1e

.line 40
invoke-virtual {p0}, Lcom/android/phone/CallCard;->getContext()Landroid/content/Context;

move-result-object v0

iget-object v1, p1, Lcom/android/internal/telephony/CallerInfo;->phoneNumber:Ljava/lang/String;

invoke-virtual {p1, v0, v1}, Lcom/android/internal/telephony/CallerInfo;->updateGeoDescription(Landroid/content/Context;Ljava/lang/String;)V

.line 42
:cond_1e
iget-object v0, p1, Lcom/android/internal/telephony/CallerInfo;->geoDescription:Ljava/lang/String;

invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

move-result v0

if-nez v0, :cond_4

.line 43
iget-object v0, p0, Lcom/android/phone/CallCard;->mCallTypeLabel:Landroid/widget/TextView;

const/4 v1, 0x0

invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

.line 44
iget-object v0, p0, Lcom/android/phone/CallCard;->mCallTypeLabel:Landroid/widget/TextView;

iget-object v1, p1, Lcom/android/internal/telephony/CallerInfo;->geoDescription:Ljava/lang/String;

invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

.line 45
iget-object v0, p0, Lcom/android/phone/CallCard;->mCallTypeLabel:Landroid/widget/TextView;

iget v1, p0, Lcom/android/phone/CallCard;->mTextColorCallTypeSip:I

invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

.line 46
iget-object v0, p1, Lcom/android/internal/telephony/CallerInfo;->geoDescription:Ljava/lang/String;

iget-object v1, p0, Lcom/android/phone/CallCard;->mPhoneNumber:Landroid/widget/TextView;

invoke-virtual {v1}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

move-result-object v1

invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_4

.line 47
iget-object v0, p0, Lcom/android/phone/CallCard;->mPhoneNumber:Landroid/widget/TextView;

invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

goto :goto_4
.end method

再查找代码

invoke-direct {p0, p4}, Lcom/android/phone/CallCard;->updateCallTypeLabel(Lcom/android/internal/telephony/Call;)V

在这段代码下面添加以下代码

move-object/from16 v0, p1

invoke-direct {p0, v0}, Lcom/android/phone/CallCard;->setGeoDescription(Lcom/android/internal/telephony/CallerInfo;)V

然后回编译,替换回phone.apk里

 

提取system/framework/ext.jar 用解压软件打开,然后打开com/android/i18n/phonenumbers/geocoding/data/ 
数据库文件添加进去

数据库下载

转载请注明:半夏月 » CM10归属地添加教程

喜欢 (1)or分享 (0)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(1)个小伙伴在吐槽
  1. 不错的教程
    顏熙熙2012-12-22 21:45 回复