(安卓)修改欧朋浏览器夜间亮度

2013-07-13 09:37:01 -0400
1. 先用 apktool.bat 解包2. 解包后到 \smali\com\opera\mini\android\Browser$2.smali 文件中,来到下面代码位置进行修改(已作注释)..# virtual methods.method public final run()V.locals 4.prologue.line 676iget-object v0, p0, Lcom/opera/mini/android/Browser$2;->Codeandroid/app/Activity;invoke-virtual {v0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;move-result-object v1.line 677invoke-virtual {v1}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;move-result-object v2.line 678iget v0, p0, Lcom/opera/mini/android/Browser$2;->I:Iif-gez v0, :cond_0 //删掉这句的话,它就设置成系统亮度.const/high16 v0, -0x4080:goto_0iput v0, v2, Landroid/view/WindowManager$LayoutParams;->screenBrightness:F.line 681invoke-virtual {v1, v2}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V.line 682return-void.line 678:cond_0iget v0, p0, Lcom/opera/mini/android/Browser$2;->I:Iint-to-float v0, v0invoke-static {v0}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;move-result-object v0invoke-virtual {v0}, Ljava/lang/Float;->floatValue()Fmove-result v0const/high16 v3, 0x437f //亮度运算的一个值, 值越大就越暗. 反之就越亮.(根据你个人需求修改吧)!div-float/2addr v0, v3 //和上面那行的数值进行除法运算得到最终亮度设置值.goto :goto_0.end method修改版本 7.6 其它版本未测试
«Newer      Older»
Comment:
Name:

Back to home

Subscribe | Register | Login | N