HTC 官方来电归属地加入教程

HTC 官方来电归属地加入教程(适用于Sense 3.6 /4.0 / 4.1)
    这个最初是用在Sense4上面的,后来发现3.6也能用,3.0之类的就不知道了。HTC比较懒,3.6和4.0中这部分代码是一样的^^

    原理是修改HTCExtension里面的一个已经写好的获得归属地信息的代码段,改一个布尔变量就行了,估计是那个"开关"吧,呵呵。
解包过程依旧不赘述,
补充锁屏来电归属地修改

   
一、Idlescreen_Base.apk修改:
com\htc\idlescreen\base\reminderview\IncomingCallView.smali
  找到: Lcom/htc/lockscreen/telephony/PhoneState;->mLocation:Ljava/lang/String;
在上一句的下面加入
  move-object/from16 v0, p0
    iget-object v0, v0, Lcom/htc/idlescreen/base/reminderview/IncomingCallView;->mContext:Landroid/content/Context;
    .local v1, info:Lcom/htc/util/phone/CityIdInfo;
    new-instance v1, Lcom/htc/util/phone/CityIdInfo;
    invoke-direct {v1}, Lcom/htc/util/phone/CityIdInfo;-><init>()V
    const/4 v2, 0x0
    invoke-virtual {v1, v0, v12, v2}, Lcom/htc/util/phone/CityIdInfo;->doLookup(Landroid/content/Context;Ljava/lang/CharSequence;Z)V
    invoke-static {v2, v1}, Lcom/htc/util/phone/CityIdInfo;->getCityIdDisplay(Landroid/widget/TextView;Lcom/htc/util/phone/CityIdInfo;)Ljava/lang/String;
    move-result-object v9  

继续往下找到  Lcom/htc/lockscreen/telephony/PhoneState;->mEventDesp:Ljava/lang/String;
  在这一句的下面两行中间加入  
  .end local v1           #info:Lcom/htc/util/phone/CityIdInfo;

以下为修改完成的
   .line 203
    move-object/from16 v0, v16
    iget-object v9, v0, Lcom/htc/lockscreen/telephony/PhoneState;->mLocation:Ljava/lang/String;
    move-object/from16 v0, p0
    iget-object v0, v0, Lcom/htc/idlescreen/base/reminderview/IncomingCallView;->mContext:Landroid/content/Context;
    .local v1, info:Lcom/htc/util/phone/CityIdInfo;
    new-instance v1, Lcom/htc/util/phone/CityIdInfo;
    invoke-direct {v1}, Lcom/htc/util/phone/CityIdInfo;-><init>()V
    const/4 v2, 0x0
    invoke-virtual {v1, v0, v12, v2}, Lcom/htc/util/phone/CityIdInfo;->doLookup(Landroid/content/Context;Ljava/lang/CharSequence;Z)V
    invoke-static {v2, v1}, Lcom/htc/util/phone/CityIdInfo;->getCityIdDisplay(Landroid/widget/TextView;Lcom/htc/util/phone/CityIdInfo;)Ljava/lang/String;
    move-result-object v9
    .line 204
    .end local v1           #info:Lcom/htc/util/phone/CityIdInfo;   
    move-object/from16 v0, v16

  
到这里锁屏修改完,打包进行替换

二、HTCExtension.jar修改
路径  com\htc\util\phone\CityIdInfo.smali

找到sput-boolean v0, Lcom/htc/util/phone/CityIdInfo;->CALL_LOCATION:Z
官方默认为V0   把0改为2

向下找到sput-boolean v0, Lcom/htc/util/phone/CityIdInfo;->EXCEPTION_PROJECTS:Z
官方默认为V0   把0改为1


现在,大家就可以拥有官方的来电归属地了。
    红色部分为修改锁屏来电归属地的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值