【开发者教程】通话开启双向录音功能

前言:
大家好,从今天开始现实的你我都将会把HTC ONE\M7 SENSE5系列的教程公布出来,供大家学习参考,共同提升。如有不详细之处,请大神指导。。。(非常感谢现实的你我分享的教程!原帖:http://lt.imobile.com.cn/thread-10343220-1-1.html)

直接开场(这里所使用的工具、修改方法等基础性的请自行百度)

反编译 phone.apk

\smali\com\android\phone\util\VoiceRecorderHelper.smali

搜索

.method static constructor 
<clinit>()V
    .locals 6
    const/16 v5, 0xd8
    const/4 v4, 0x2
    const/4 v2, 0x1
    const/4 v1, 0x0
    sget-short v0, 
Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
    const/16 v3, 0x26
    if-ne v0, v3, 
:cond_0

把下面这句

    sput-boolean v1, 
Lcom/android/phone/util/VoiceRecorderHelper;->IS_INCALL_RECORDING_ENABLE:Z

改为

sput-boolean v2, 
Lcom/android/phone/util/VoiceRecorderHelper;->IS_INCALL_RECORDING_ENABLE:Z

搜索

    
:cond_1
    sget-short v0, 
Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
    
const/16 v3, 0xaa

    if-ne v0, v3, :cond_2
    
sget-short v0, 
Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_PROJECT_flag:S
    
if-ne v0, v5, :cond_2

    sget-short v0, 
Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_LANGUAGE_flag:S
    
if-eq v0, v4, :cond_3

    :cond_2
    
sget-short v0, 
Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_PROJECT_flag:S
    
if-ne v0, v5, :cond_4

    sget-short v0, 
Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_LANGUAGE_flag:S
    
if-ne v0, v4, :cond_4

    :cond_3
    
move v0, v2

    :goto_2

把下面这句

sput-boolean v0, 
Lcom/android/phone/util/VoiceRecorderHelper;->IS_INCALL_RECORDING_ENABLE:Z

改为

sput-boolean v2, 
Lcom/android/phone/util/VoiceRecorderHelper;->IS_INCALL_RECORDING_ENABLE:Z



保存回编译

原文链接:,转发请注明来源!

发表评论

要发表评论,您必须先登录