安卓手机怎么设置才能像MIUI锁屏
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安卓手机怎么设置才能像MIUI锁屏相关的知识,希望对你有一定的参考价值。
我说的锁屏,是手机屏幕在关闭的时候,呈现上下屏幕向中间关闭。个性的很,请问这个是怎么做到的呢??
这个我只是见过小米手机有,不知道安卓手机能不能做到。。。
这里需要反编译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/server/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, 0x0
const v3, 0x1
const v4, 0x10
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;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_22
const v0, 0x1
: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
:cond_21
return v0
:cond_22
const v0, 0x0
goto :goto_18
.end method
继续3中修改的文件——找到.method public run()V
从这一行删除到下面第一个.end method那一行,也就是删除run这个函数
添加:
.method public run()V
.registers 10
.prologue
const/4 v8, 0x0
.line 2076
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$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;->getScreenAnimationMode(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
.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;
move-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-static 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
.local 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/Handler;
move-result-object v5
const-wide/16 v6, 0x10
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-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/PowerManagerService;->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/android/server/PowerManagerService$BrightnessState;->targetValue:I
if-nez v5, :cond_6b
const/4 v5, 0x1
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/PowerManagerService;
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, 0x4
if-ne v6, v7, :cond_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-static 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-exit 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, Lcom/android/server/PowerManagerService;->access$1700(Lcom/android/server/PowerManagerService;)I
:try_end_72
.catchall :try_start_6d .. :try_end_72 :catchall_68
move-result v6
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static v6, Lcom/android/server/PowerManagerService;->getContextZZ(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v6
invoke-direct p0, v6, Lcom/android/server/PowerManagerService$BrightnessState;->getScreenAnimationMode(Landroid/content/Context;)I
move-result v6
goto :goto_5a
.end method 参考技术A 可以在手机上下载一个APP,叫“小米桌面”。用它来代替系统自带的桌面,就可以使用和小米手机一样的桌面主题,包括锁屏方式。
MIUI系统是在安卓系统基础上进行深度开发形成的系统,是小米公司的代表作。比较适合中国人的审美和操作习惯。 参考技术B 你好,你可以下载小米桌面就可以使用MIUI锁屏了。 参考技术C 安装一个锁屏软件吧,这很容易做到,小米能那样锁屏,是因为它有那个应用程序,每种手机都不同。追问
我在网上找了,软件都是需要点软件才能出现,而手机的按键却无效啊。。。
参考技术D 嗨!非常抱歉,这是miui系统特有的锁屏动画,其他系统是否可以请咨询厂家。
更详细的描述问题有助于网友理解你遇到的麻烦,帮助你更准确的解决问题。谢谢你支持小米手机!
安卓手机下雪效果怎么设置?
让手机“下雪”一般有两种方法,一是楼上说的下载雪花动态壁纸,而是下载特定的天气软件,有些天气软件或者锁屏软件支持你打开屏幕或者解锁屏幕让屏幕根据当天的天气状况出现相应的动画比如下雪、下雨、太阳等等,以前MIUI2.3时代集成这个功能,看你图片是酷派的手机,酷派的天气应用是“最美天气”,但是不知道是不是要在酷派手机上才能有天气动画,我本想试一下,但是这个软件不支持安卓5.0,所以失败了,你可以试试。 参考技术A 下载下雪动态壁纸,设置成动态壁纸选择下载的那个就行了 参考技术B 有手机自带的追答或者去下载
以上是关于安卓手机怎么设置才能像MIUI锁屏的主要内容,如果未能解决你的问题,请参考以下文章