2.找到# virtual methods
在它的后面添加:
## MEUI Me Creation Team
.method public getWiFiString(Landroid/content/Context;)Ljava/lang/String;
.locals 1
.parameter
.prologue
.line 22
const-string v0, "wifi"
invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/wifi/WifiManager;
iput-object v0, p0, Lcom/lidroid/systemui/quickpanel/WifiButton;->mWiFiManager:Landroid/net/wifi/WifiManager;
.line 24
iget-object v0, p0, Lcom/lidroid/systemui/quickpanel/WifiButton;->mWiFiManager:Landroid/net/wifi/WifiManager;
invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;
move-result-object v0
iput-object v0, p0, Lcom/lidroid/systemui/quickpanel/WifiButton;->mWiFiInfo:Landroid/net/wifi/WifiInfo;
.line 25
iget-object v0, p0, Lcom/lidroid/systemui/quickpanel/WifiButton;->mWiFiManager:Landroid/net/wifi/WifiManager;
invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/lidroid/systemui/quickpanel/WifiButton;->mWiFiInfo:Landroid/net/wifi/WifiInfo;
invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getIpAddress()I
move-result v0
if-eqz v0, :cond_0
.line 26
iget-object v0, p0, Lcom/lidroid/systemui/quickpanel/WifiButton;->mWiFiInfo:Landroid/net/wifi/WifiInfo;
invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getSSID()Ljava/lang/String;
move-result-object v0
.line 31
:goto_0
return-object v0
.line 28
:cond_0
const-string v0, "WLAN"
goto :goto_0
.end method
.method protected updateText()V
.locals 4
.prologue
.line 118
iget-object v2, p0, Lcom/lidroid/systemui/quickpanel/PowerButton;->mView:Landroid/view/View;
#相对PowerButton上一行有改
invoke-virtual {v2}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v3
if-eqz v2, :cond_0
.line 119
const v0, 0x7f0a0055
.line 120
.local v0, buttonText:I
iget-object v2, p0, Lcom/lidroid/systemui/quickpanel/PowerButton;->mView:Landroid/view/View;
invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/TextView;
.line 121
.local v1, text:Landroid/widget/TextView;
# 下一行原来P0
invoke-virtual {p0, v3}, Lcom/lidroid/systemui/quickpanel/WifiButton;->getWiFiString(Landroid/content/Context;)Ljava/lang/String;
# 原来没有OBJECT
move-result-object v2
invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 123
.end local v0 #buttonText:I
.end local v1 #text:Landroid/widget/TextView;
:cond_0
return-void
.end method
# END