下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、我们要实现特效的添加,首先需要做的是反编译services.jar文件之后打开/com/android/server/PowerManagerService.smali文件找到getPreferredBrightness()I这行在上面添加:.method static synthetic getContextZZ(Lcom/android/server/PowerManagerService;)Landroid/content/Context; .registers 2 .parameter x0 .prologue iget-object v0, p0, Lcom/android/serv
2、er/PowerManagerService;-mContext:Landroid/content/Context; return-object v0.end method复制代码打开/com/android/server/PowerManagerService$BrightnessState.smali文件找到# virtual methods这行在上面添加:.method private getScreenAnimationMode(Landroid/content/Context;)I .registers 7 .parameter context .prologue const v0,
3、 0 x0 const v3, 0 x1 const v4, 0 x10 invoke-virtual p1, Landroid/content/Context;-getContentResolver()Landroid/content/ContentResolver; move-result-object v1 const-string v2, config_beam_screen_on invoke-static v1, v2, v3, Landroid/provider/Settings$System;-getInt(Landroid/content/ContentResolver;Lj
4、ava/lang/String;I)I move-result v2 if-eqz v2, :cond_22 const v0, 0 x1 :goto_18 const-string v2, config_beam_screen_off invoke-static v1, v2, v3, Landroid/provider/Settings$System;-getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I move-result v2 if-eqz v2, :cond_21 add-int/2addr v0, v4 :c
5、ond_21 return v0 :cond_22 const v0, 0 x0 goto :goto_18.end method复制代码继续3中修改的文件找到.method public run()V从这一行删除到下面第一个.end method那一行,也就是删除run这个函数然后添加:.method public run()V .registers 10 .prologue const/4 v8, 0 x0 .line 2076 iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this
6、$0:Lcom/android/server/PowerManagerService; invoke-static v4, Lcom/android/server/PowerManagerService;-getContextZZ(Lcom/android/server/PowerManagerService;)Landroid/content/Context; move-result-object v4 invoke-direct p0, v4, Lcom/android/server/PowerManagerService$BrightnessState;-getScreenAnimati
7、onMode(Landroid/content/Context;)I move-result v4 if-nez v4, :cond_3b iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManagerService; iget-boolean v4, v4, Lcom/android/server/PowerManagerService;-mAnimateScreenLights:Z if-eqz v4, :cond_3b
8、.line 2077 iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManagerService; invoke-static v4, Lcom/android/server/PowerManagerService;-access$500(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$LockList; mov
9、e-result-object v4 monitor-enter v4 .line 2078 :try_start_1a invoke-static , Landroid/os/SystemClock;-uptimeMillis()J move-result-wide v2 .line 2079 .local v2, now:J iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManagerService; invoke-st
10、atic v5, Lcom/android/server/PowerManagerService;-access$4500(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState; move-result-object v5 invoke-virtual v5, Lcom/android/server/PowerManagerService$BrightnessState;-stepLocked()Z move-result v1 .line 2080 .l
11、ocal v1, more:Z if-eqz v1, :cond_36 .line 2081 iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManagerService; invoke-static v5, Lcom/android/server/PowerManagerService;-access$1800(Lcom/android/server/PowerManagerService;)Landroid/os/Hand
12、ler; move-result-object v5 const-wide/16 v6, 0 x10 add-long/2addr v6, v2 invoke-virtual v5, p0, v6, v7, Landroid/os/Handler;-postAtTime(Ljava/lang/Runnable;J)Z .line 2083 :cond_36 monitor-exit v4 .line 2098 .end local v1 #more:Z .end local v2 #now:J :goto_37 return-void .line 2083 :catchall_38 move-
13、exception v5 monitor-exit v4 :try_end_3a .catchall :try_start_1a . :try_end_3a :catchall_38 throw v5 .line 2085 :cond_3b iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManagerService; invoke-static v4, Lcom/android/server/PowerManagerServ
14、ice;-access$500(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$LockList; move-result-object v4 monitor-enter v4 .line 2087 :try_start_42 iget-boolean v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;-animating:Z if-eqz v5, :cond_6b iget v5, p0, Lcom/a
15、ndroid/server/PowerManagerService$BrightnessState;-targetValue:I if-nez v5, :cond_6b const/4 v5, 0 x1 move v0, v5 .line 2088 .local v0, animate:Z :goto_4c if-eqz v0, :cond_5d .line 2091 iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManag
16、erService; iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManagerService; invoke-static v6, Lcom/android/server/PowerManagerService;-access$4300(Lcom/android/server/PowerManagerService;)I move-result v6 const/4 v7, 0 x4 if-ne v6, v7, :con
17、d_6d move v6, v8 :goto_5a invoke-static v5, v6, Lcom/android/server/PowerManagerService;-access$4600(Lcom/android/server/PowerManagerService;I)V .line 2095 :cond_5d iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManagerService; invoke-sta
18、tic v5, Lcom/android/server/PowerManagerService;-access$4500(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState; move-result-object v5 invoke-virtual v5, Lcom/android/server/PowerManagerService$BrightnessState;-jumpToTargetLocked()V .line 2096 monitor-ex
19、it v4 goto :goto_37 .end local v0 #animate:Z :catchall_68 move-exception v5 monitor-exit v4 :try_end_6a .catchall :try_start_42 . :try_end_6a :catchall_68 throw v5 :cond_6b move v0, v8 .line 2087 goto :goto_4c .line 2091 .restart local v0 #animate:Z :cond_6d :try_start_6d iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;-this$0:Lcom/android/server/PowerManagerService; invoke-static v6, Lc
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 吉首大学《电工与电子技术》2021-2022学年期末试卷
- 《机床夹具设计》试题14
- 吉林艺术学院《影视概念设计解析》2021-2022学年第一学期期末试卷
- 吉林艺术学院《视唱Ⅱ》2021-2022学年第一学期期末试卷
- 吉林艺术学院《和声Ⅱ》2021-2022学年第一学期期末试卷
- 珠海离婚协议书范文
- 2024年多方合作合同范本
- 吉林师范大学《信息动画设计》2021-2022学年第一学期期末试卷
- 2022年公务员多省联考《申论》真题(重庆二卷)及答案解析
- 女婿与女婿离婚协议书范文模板
- 优秀工作总结范文:阀门专业技术工作总结
- 按键外观及可靠性测试检验标准
- 安防监控系统室外施工安装规范标准
- 胸痛鉴别诊断
- 元明粉比重表
- 房地产估价理论与方法重要公式整理
- 房地产项目投资成本测算参考表
- 提高护士对抢救药品知晓率PDCA案例精编版
- 大学英语四级改错题12篇
- 正余弦定理知识点权威总结18页
- 浅议小升初数学教学衔接
评论
0/150
提交评论