[MOD][GUIDE][JB] Double Tap Statusbar to Sleep - Galaxy S Advance I9070 Themes and Apps

Double Tap Statusbar to Sleep​
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
So let's begin
Decompile SystemUI.apk
Open com\android\systemui\statusbar\phone\PhoneStatusBarView.smali
Add following code after #static fields
Code:
.field static c:Landroid/content/Context;
Add this after #instance fields
Code:
.field private mDoubleTapGesture:Landroid/view/GestureDetector;
Now search for .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSetV and delete
Code:
[COLOR="Red"]const/4 v2, 0x0[/COLOR]
which comes in beginning of this method.
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code
Code:
sput-object p1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
new-instance v0, Landroid/view/GestureDetector;
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
invoke-direct {v0, v1, v2}, Landroid/view/GestureDetector;-><init>(Landroid/content/Context;Landroid/view/GestureDetector$OnGestureListener;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mDoubleTapGesture:Landroid/view/GestureDetector;
const/4 v2, 0x0
Now search for .method public onTouchEvent(Landroid/view/MotionEventZ at the starting of this method add
Code:
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mDoubleTapGesture:Landroid/view/GestureDetector;
invoke-virtual {v0, p1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z
Download attached file, extract it & put PhoneStatusBarView$1.smali to com\android\systemui\statusbar\phone
Compile back, it is done...
Click to expand...
Click to collapse
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.

Updated method. Now there won't be FC (i forget to add one line)

BOOTMGR said:
Updated method. Now there won't be FC (i forget to add one line)
Click to expand...
Click to collapse
Working GR8
Thanx

Can you do one zip file , in which we just to flash this zip to have this mod?
Gesendet von meinem GT-I9070 mit Tapatalk

You are really a great developer... @BOOTMGR
Sent from my GT-I9070 using Tapatalk

Thanks, this works on my device JB 4.1.2. Keep on sharing your mods Sir :good:

BOOTMGR said:
Updated method. Now there won't be FC (i forget to add one line)
Click to expand...
Click to collapse
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it

It looked a bit complicated at first, but IT WORKS.
You just saved my power button!

shazzl said:
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it
Click to expand...
Click to collapse
If you already have PhoneStatusBarView$1 then don't merge changes. Just rename my file to PhoneStatusBarView$2 & replace all other occurences of PhoneStatusBarView$1 with PhoneStatusBarView$2 apperaring on this tutorial.

Hello BOOTMGR,
I try on 4.2.1 ROM, but my PhoneStatusBarView.smali doesn't have "invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-...". Can you show me how to integrate? My Rom has only PhoneStatusBarView.smali file
Code:
.class public Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.super Lcom/android/systemui/statusbar/phone/PanelBar;
.source "PhoneStatusBarView.java"
# static fields
.field private static final DEBUG:Z = false
.field private static final TAG:Ljava/lang/String; = "PhoneStatusBarView"
# instance fields
.field mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.field mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mFullWidthNotifications:Z
.field mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mScrimColor:I
.field mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mSettingsPanelDragzoneFrac:F
.field mSettingsPanelDragzoneMin:F
.field private mShouldFade:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 7
.parameter "context"
.parameter "attrs"
.prologue
const/4 v3, 0x0
const/4 v6, 0x0
const/4 v2, 0x1
.line 47
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/PanelBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 41
iput-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 42
iput-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 49
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getContext()Landroid/content/Context;
move-result-object v3
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
.line 50
.local v1, res:Landroid/content/res/Resources;
const v3, 0x7f0a0003
invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
.line 51
const v3, 0x7f0e003c
invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getDimension(I)F
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
.line 53
const v3, 0x7f0e003b
const/4 v4, 0x1
const/4 v5, 0x1
:try_start_0
invoke-virtual {v1, v3, v4, v5}, Landroid/content/res/Resources;->getFraction(III)F
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
:try_end_0
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 57
:goto_0
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
cmpg-float v3, v3, v6
if-gtz v3, :cond_0
:goto_1
iput-boolean v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
.line 58
return-void
.line 54
:catch_0
move-exception v0
.line 55
.local v0, ex:Landroid/content/res/Resources$NotFoundException;
iput v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
goto :goto_0
.line 57
.end local v0 #ex:Landroid/content/res/Resources$NotFoundException;
:cond_0
const/4 v2, 0x0
goto :goto_1
.end method
# virtual methods
.method public addPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 2
.parameter "pv"
.prologue
.line 77
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->addPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 78
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getId()I
move-result v0
const v1, 0x7f090042
if-ne v0, v1, :cond_1
.line 79
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 83
:cond_0
:goto_0
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-nez v0, :cond_2
const/4 v0, 0x1
:goto_1
invoke-virtual {p1, v0}, Lcom/android/systemui/statusbar/phone/PanelView;->setRubberbandingEnabled(Z)V
.line 84
return-void
.line 80
:cond_1
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getId()I
move-result v0
const v1, 0x7f090071
if-ne v0, v1, :cond_0
.line 81
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_0
.line 83
:cond_2
const/4 v0, 0x0
goto :goto_1
.end method
.method public hasFullWidthNotifications()Z
.locals 1
.prologue
.line 65
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
return v0
.end method
.method public onAllPanelsCollapsed()V
.locals 2
.prologue
const/4 v1, 0x0
.line 156
invoke-super {p0}, Lcom/android/systemui/statusbar/phone/PanelBar;->onAllPanelsCollapsed()V
.line 158
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->makeExpandedInvisibleSoon()V
.line 159
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 160
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 161
return-void
.end method
.method public onAttachedToWindow()V
.locals 3
.prologue
.line 70
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PanelBar;->mPanels:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/android/systemui/statusbar/phone/PanelView;
.line 71
.local v1, pv:Lcom/android/systemui/statusbar/phone/PanelView;
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-nez v2, :cond_0
const/4 v2, 0x1
:goto_1
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PanelView;->setRubberbandingEnabled(Z)V
goto :goto_0
:cond_0
const/4 v2, 0x0
goto :goto_1
.line 73
.end local v1 #pv:Lcom/android/systemui/statusbar/phone/PanelView;
:cond_1
return-void
.end method
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"
.prologue
.line 181
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-nez v0, :cond_0
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public onPanelFullyOpened(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 1
.parameter "openPanel"
.prologue
.line 165
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onPanelFullyOpened(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 166
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-eq p1, v0, :cond_0
.line 167
const/16 v0, 0x20
invoke-virtual {p1, v0}, Lcom/android/systemui/statusbar/phone/PanelView;->sendAccessibilityEvent(I)V
.line 169
:cond_0
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 170
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 171
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
.line 172
return-void
.end method
.method public onPanelPeeked()V
.locals 2
.prologue
.line 138
invoke-super {p0}, Lcom/android/systemui/statusbar/phone/PanelBar;->onPanelPeeked()V
.line 139
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->makeExpandedVisible(Z)V
.line 140
return-void
.end method
.method public onRequestSendAccessibilityEvent(Landroid/view/View;Landroid/view/accessibility/AccessibilityEvent;)Z
.locals 2
.parameter "child"
.parameter "event"
.prologue
.line 93
invoke-super {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/PanelBar;->onRequestSendAccessibilityEvent(Landroid/view/View;Landroid/view/accessibility/AccessibilityEvent;)Z
move-result v1
if-eqz v1, :cond_0
.line 97
invoke-static {}, Landroid/view/accessibility/AccessibilityEvent;->obtain()Landroid/view/accessibility/AccessibilityEvent;
move-result-object v0
.line 98
.local v0, record:Landroid/view/accessibility/AccessibilityEvent;
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->onInitializeAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)V
.line 99
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->dispatchPopulateAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)Z
.line 100
invoke-virtual {p2, v0}, Landroid/view/accessibility/AccessibilityEvent;->appendRecord(Landroid/view/accessibility/AccessibilityRecord;)V
.line 101
const/4 v1, 0x1
.line 103
.end local v0 #record:Landroid/view/accessibility/AccessibilityEvent;
:goto_0
return v1
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"
.prologue
.line 176
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-nez v0, :cond_0
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public panelExpansionChanged(Lcom/android/systemui/statusbar/phone/PanelView;F)V
.locals 17
.parameter "panel"
.parameter "frac"
.prologue
.line 186
invoke-super/range {p0 .. p2}, Lcom/android/systemui/statusbar/phone/PanelBar;->panelExpansionChanged(Lcom/android/systemui/statusbar/phone/PanelView;F)V
.line 192
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
move-object/from16 v0, p1
if-ne v0, v5, :cond_0
move-object/from16 v0, p0
iget v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
if-eqz v5, :cond_0
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v5
if-eqz v5, :cond_0
.line 193
move-object/from16 v0, p0
iget-boolean v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
if-eqz v5, :cond_0
.line 194
move-object/from16 v0, p0
iget v0, v0, Lcom/android/systemui/statusbar/phone/PanelBar;->mPanelExpandedFractionSum:F
move/from16 p2, v0
.line 196
const v5, 0x3f99999a
mul-float v5, v5, p2
const v6, 0x3e4ccccd
sub-float p2, v5, v6
.line 197
const/4 v5, 0x0
cmpg-float v5, p2, v5
if-gtz v5, :cond_3
.line 215
:cond_0
:goto_0
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->getStatusBarHeight()I
move-result v1
.line 216
.local v1, H:I
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v5
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getPaddingBottom()I
move-result v6
int-to-float v6, v6
add-float v4, v5, v6
.line 217
.local v4, ph:F
const/high16 v2, 0x3f80
.line 218
.local v2, alpha:F
mul-int/lit8 v5, v1, 0x2
int-to-float v5, v5
cmpg-float v5, v4, v5
if-gez v5, :cond_1
.line 219
int-to-float v5, v1
cmpg-float v5, v4, v5
if-gez v5, :cond_4
const/4 v2, 0x0
.line 221
:goto_1
mul-float/2addr v2, v2
.line 223
:cond_1
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getAlpha()F
move-result v5
cmpl-float v5, v5, v2
if-eqz v5, :cond_2
.line 224
move-object/from16 v0, p1
invoke-virtual {v0, v2}, Lcom/android/systemui/statusbar/phone/PanelView;->setAlpha(F)V
.line 227
:cond_2
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
const/4 v6, 0x0
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateCarrierLabelVisibility(Z)V
.line 228
return-void
.line 203
.end local v1 #H:I
.end local v2 #alpha:F
.end local v4 #ph:F
:cond_3
const-wide/high16 v5, 0x3ff0
const-wide/high16 v7, 0x3fe0
const-wide/high16 v9, 0x3ff0
const-wide v11, 0x400921fa00000000L
const/high16 v13, 0x3f80
sub-float v13, v13, p2
float-to-double v13, v13
const-wide/high16 v15, 0x4000
invoke-static/range {v13 .. v16}, Ljava/lang/Math;->pow(DD)D
move-result-wide v13
mul-double/2addr v11, v13
invoke-static {v11, v12}, Ljava/lang/Math;->cos(D)D
move-result-wide v11
sub-double/2addr v9, v11
mul-double/2addr v7, v9
sub-double/2addr v5, v7
double-to-float v3, v5
.line 205
.local v3, k:F
move-object/from16 v0, p0
iget v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
ushr-int/lit8 v5, v5, 0x18
int-to-float v5, v5
mul-float/2addr v5, v3
float-to-int v5, v5
shl-int/lit8 v5, v5, 0x18
move-object/from16 v0, p0
iget v6, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
const v7, 0xffffff
and-int/2addr v6, v7
or-int/2addr v5, v6
goto :goto_0
.line 220
.end local v3 #k:F
.restart local v1 #H:I
.restart local v2 #alpha:F
.restart local v4 #ph:F
:cond_4
int-to-float v5, v1
sub-float v5, v4, v5
int-to-float v6, v1
div-float v2, v5, v6
goto :goto_1
.end method
.method public panelsEnabled()Z
.locals 2
.prologue
.line 88
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
iget v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I
const/high16 v1, 0x1
and-int/2addr v0, v1
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public selectPanelForTouch(Landroid/view/MotionEvent;)Lcom/android/systemui/statusbar/phone/PanelView;
.locals 6
.parameter "touch"
.prologue
const/4 v4, 0x0
.line 108
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v2
.line 110
.local v2, x:F
iget-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-eqz v3, :cond_2
.line 112
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-nez v3, :cond_0
move v3, v4
:goto_0
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v5
add-float/2addr v3, v5
cmpl-float v3, v3, v4
if-lez v3, :cond_1
const/4 v3, 0x0
.line 133
:goto_1
return-object v3
.line 112
:cond_0
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v3}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v3
goto :goto_0
:cond_1
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
.line 122
:cond_2
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getMeasuredWidth()I
move-result v3
int-to-float v1, v3
.line 123
.local v1, w:F
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
mul-float v0, v1, v3
.line 131
.local v0, region:F
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
cmpg-float v3, v0, v3
if-gez v3, :cond_3
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
.line 133
:cond_3
sub-float v3, v1, v2
cmpg-float v3, v3, v0
if-gez v3, :cond_4
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
:cond_4
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
.end method
.method public setBar(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "bar"
.prologue
.line 61
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.line 62
return-void
.end method
.method public startOpeningPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 1
.parameter "panel"
.prologue
.line 144
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->startOpeningPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 147
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PanelView;->isFullyExpanded()Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
.line 151
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 152
return-void
.line 147
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method

BOOTMGR said:
Double Tap Statusbar to Sleep​
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.
Click to expand...
Click to collapse
will this work on stock roms?

yeshwanthvshenoy said:
will this work on stock roms?
Click to expand...
Click to collapse
If you read whole post you will find this at the end:
"I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)..."

shut_down said:
If you read whole post you will find this at the end:
"I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)..."
Click to expand...
Click to collapse
had this doubt thatz why asked coz some stock roms dont support this feature

BOOTMGR said:
Double Tap Statusbar to Sleep​
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.
Click to expand...
Click to collapse
Sir can you help me im using a dual sim phone and it has no phonestatusbarview.smali and I already have phonestatusbarview1.smali
Hope you can help me in this mod thank you sir

shazzl said:
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it
Click to expand...
Click to collapse
Hi sir i have the same problm w/ u Im also using 4.2 and i have already phone status view 1 up to 34 .smali what did you do can you help me? hmmm

Does this still work, or is there any updated guide?

shwise said:
Does this still work, or is there any updated guide?
Click to expand...
Click to collapse
It works (at least on my i9070 running Samsung's 4.1.2 firmware).
I added this to my ROM (about a week ago) and it works just like it should.
There is an alternate guide for this too, but I never tried it..
In case you're interested, here's a link to it.

is there any easiest way to install double tap status bar to sleep for JB 4.1.2

masud0869 said:
is there any easiest way to install double tap status bar to sleep for JB 4.1.2
Click to expand...
Click to collapse
Yes. There is.
You can install this Xposed Module: http://forum.xda-developers.com/xposed/modules/mod-doubletaptosleep-v1-0-t2667177
The only requirement is that you need to have Xposed Installer installed on your phone.

Sami Kabir said:
Yes. There is.
You can install this Xposed Module: http://forum.xda-developers.com/xposed/modules/mod-doubletaptosleep-v1-0-t2667177
The only requirement is that you need to have Xposed Installer installed on your phone.
Click to expand...
Click to collapse
Is there required root first?

Related

[Q] [MIUI] Using two different battery styles

Hi,
i like the MIUI battery top bar but i want also have a percent indicator.
I have no idea how to find the related strings and values... to activate the top bar style and the battery percent style concurrently...
I hope someone of you can help me
Smali code:
Code:
.class public Lcom/android/systemui/statusbar/BatteryStatus;
.super Lcom/android/systemui/statusbar/StatusBarIconView;
.source "BatteryStatus.java"
# static fields
.field private static mBatteryStyle:I
.field static sIconUnit:I
# instance fields
.field private mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.field private mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
.field private mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 153
const/16 v0, 0x26
sput v0, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
.locals 2
.parameter "context"
.parameter "slot"
.prologue
.line 44
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/StatusBarIconView;-><init>(Landroid/content/Context;Ljava/lang/String;)V
.line 46
invoke-direct {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateBatterySettings()V
.line 47
new-instance v0, Lcom/android/systemui/statusbar/BatteryStatus$1;
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus$1;-><init>(Lcom/android/systemui/statusbar/BatteryStatus;Landroid/os/Handler;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
.line 53
return-void
.end method
.method static synthetic access$000(Lcom/android/systemui/statusbar/BatteryStatus;)V
.locals 0
.parameter "x0"
.prologue
.line 36
invoke-direct {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateBatterySettings()V
return-void
.end method
.method private extractDrawable(I)Ljava/util/ArrayList;
.locals 17
.parameter "resId"
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Ljava/util/ArrayList",
"<",
"Landroid/graphics/drawable/Drawable;",
">;"
}
.end annotation
.prologue
.line 155
new-instance v15, Ljava/util/ArrayList;
invoke-direct {v15}, Ljava/util/ArrayList;-><init>()V
.line 157
.local v15, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
move-object v4, v0
invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v14
.line 158
.local v14, res:Landroid/content/res/Resources;
move-object v0, v14
move/from16 v1, p1
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;
move-result-object v4
invoke-static {v4}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;
move-result-object v2
.line 159
.local v2, bm:Landroid/graphics/Bitmap;
if-nez v2, :cond_0
.line 175
:goto_0
return-object v15
.line 163
:cond_0
invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
div-int v16, v4, v5
.line 164
.local v16, rowCount:I
invoke-virtual {v2}, Landroid/graphics/Bitmap;->getWidth()I
move-result v4
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
div-int v10, v4, v5
.line 165
.local v10, columnCount:I
sget v4, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v4, v5
new-array v3, v4, [I
.line 166
.local v3, pixels:[I
const/4 v11, 0x0
.local v11, i:I
:goto_1
move v0, v11
move/from16 v1, v16
if-ge v0, v1, :cond_2
.line 167
const/4 v13, 0x0
.local v13, j:I
:goto_2
if-ge v13, v10, :cond_1
.line 168
const/4 v4, 0x0
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v6, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v6, v13
sget v7, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v7, v11
sget v8, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v9, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
invoke-virtual/range {v2 .. v9}, Landroid/graphics/Bitmap;->getPixels([IIIIIII)V
.line 169
const/4 v4, 0x0
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v6, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v7, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget-object v8, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
invoke-static/range {v3 .. v8}, Landroid/graphics/Bitmap;->createBitmap([IIIIILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
move-result-object v12
.line 170
.local v12, icon:Landroid/graphics/Bitmap;
new-instance v4, Landroid/graphics/drawable/BitmapDrawable;
invoke-direct {v4, v14, v12}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V
invoke-virtual {v15, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 167
add-int/lit8 v13, v13, 0x1
goto :goto_2
.line 166
.end local v12 #icon:Landroid/graphics/Bitmap;
:cond_1
add-int/lit8 v11, v11, 0x1
goto :goto_1
.line 173
.end local v13 #j:I
:cond_2
invoke-virtual {v2}, Landroid/graphics/Bitmap;->recycle()V
goto :goto_0
.end method
.method private generateAnimation(I)Landroid/graphics/drawable/LevelListDrawable;
.locals 11
.parameter "resId"
.prologue
.line 129
new-instance v7, Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {v7}, Landroid/graphics/drawable/LevelListDrawable;-><init>()V
.line 131
.local v7, result:Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->extractDrawable(I)Ljava/util/ArrayList;
move-result-object v3
.line 132
.local v3, drawables:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v1
.line 133
.local v1, count:I
if-lez v1, :cond_1
.line 135
const v8, 0x3ecccccd
.line 136
.local v8, sum:F
const/high16 v9, 0x42c8
int-to-float v10, v1
div-float v2, v9, v10
.line 137
.local v2, delta:F
const/16 v9, 0x1388
div-int v4, v9, v1
.line 138
.local v4, duration:I
const/4 v5, 0x0
.end local p0
.local v5, i:I
:goto_0
if-ge v5, v1, :cond_1
.line 139
new-instance v0, Landroid/graphics/drawable/AnimationDrawable;
invoke-direct {v0}, Landroid/graphics/drawable/AnimationDrawable;-><init>()V
.line 140
.local v0, animation:Landroid/graphics/drawable/AnimationDrawable;
invoke-virtual {v3, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
add-int/lit16 v9, v4, 0x1f4
invoke-virtual {v0, p0, v9}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V
.line 141
add-int/lit8 v6, v5, 0x1
.local v6, j:I
:goto_1
if-ge v6, v1, :cond_0
.line 142
invoke-virtual {v3, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
invoke-virtual {v0, p0, v4}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V
.line 141
add-int/lit8 v6, v6, 0x1
goto :goto_1
.line 144
:cond_0
const/4 v9, 0x0
invoke-virtual {v0, v9}, Landroid/graphics/drawable/AnimationDrawable;->setOneShot(Z)V
.line 145
float-to-int v9, v8
add-float v10, v8, v2
float-to-int v10, v10
invoke-virtual {v7, v9, v10, v0}, Landroid/graphics/drawable/LevelListDrawable;->addLevel(IILandroid/graphics/drawable/Drawable;)V
.line 146
add-float/2addr v8, v2
.line 138
add-int/lit8 v5, v5, 0x1
goto :goto_0
.line 150
.end local v0 #animation:Landroid/graphics/drawable/AnimationDrawable;
.end local v2 #delta:F
.end local v4 #duration:I
.end local v5 #i:I
.end local v6 #j:I
.end local v8 #sum:F
:cond_1
return-object v7
.end method
.method private generateIcon(I)Landroid/graphics/drawable/LevelListDrawable;
.locals 8
.parameter "resId"
.prologue
.line 111
new-instance v4, Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {v4}, Landroid/graphics/drawable/LevelListDrawable;-><init>()V
.line 113
.local v4, result:Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->extractDrawable(I)Ljava/util/ArrayList;
move-result-object v2
.line 114
.local v2, drawables:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v0
.line 115
.local v0, count:I
if-lez v0, :cond_0
.line 117
const v5, 0x3ecccccd
.line 118
.local v5, sum:F
const/high16 v6, 0x42c8
int-to-float v7, v0
div-float v1, v6, v7
.line 119
.local v1, delta:F
const/4 v3, 0x0
.end local p0
.local v3, i:I
:goto_0
if-ge v3, v0, :cond_0
.line 120
float-to-int v6, v5
add-float v7, v5, v1
float-to-int v7, v7
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
invoke-virtual {v4, v6, v7, p0}, Landroid/graphics/drawable/LevelListDrawable;->addLevel(IILandroid/graphics/drawable/Drawable;)V
.line 121
add-float/2addr v5, v1
.line 119
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 125
.end local v1 #delta:F
.end local v3 #i:I
.end local v5 #sum:F
:cond_0
return-object v4
.end method
.method private final updateBatterySettings()V
.locals 4
.prologue
const/4 v3, 0x0
.line 180
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "battery_indicator_style"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
sput v0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
.line 184
iput-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
.line 185
iput-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.line 186
new-instance v0, Lcom/android/systemui/statusbar/BatteryStatus$2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/BatteryStatus$2;-><init>(Lcom/android/systemui/statusbar/BatteryStatus;)V
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/BatteryStatus;->post(Ljava/lang/Runnable;)Z
.line 194
return-void
.end method
# virtual methods
.method protected getIcon(Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
.locals 4
.parameter "icon"
.prologue
const/4 v3, 0x0
.line 82
sget v1, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
const/4 v2, 0x2
if-ne v1, v2, :cond_0
move-object v1, v3
.line 107
:goto_0
return-object v1
.line 86
:cond_0
iget v1, p1, Lcom/android/internal/statusbar/StatusBarIcon;->iconId:I
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
iget-boolean v2, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mEnableAlternative:Z
invoke-static {v1, v2}, Lcom/android/systemui/statusbar/AlternativeIcons;->get(Ljava/lang/Integer;Z)I
move-result v0
.line 87
.local v0, iconId:I
sparse-switch v0, :sswitch_data_0
move-object v1, v3
.line 107
goto :goto_0
.line 89
:sswitch_0
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-static {v1, p1}, Lcom/android/systemui/statusbar/StatusBarIconView;->getIcon(Landroid/content/Context;Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
move-result-object v1
goto :goto_0
.line 92
:sswitch_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
if-nez v1, :cond_1
.line 93
const v1, 0x7f050001
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->generateAnimation(I)Landroid/graphics/drawable/LevelListDrawable;
move-result-object v1
iput-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.line 95
:cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
goto :goto_0
.line 98
:sswitch_2
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
if-nez v1, :cond_2
.line 99
sget v1, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
if-nez v1, :cond_3
const/high16 v1, 0x7f05
:goto_1
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->generateIcon(I)Landroid/graphics/drawable/LevelListDrawable;
move-result-object v1
iput-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
.line 104
:cond_2
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
goto :goto_0
.line 99
:cond_3
const v1, 0x7f050002
goto :goto_1
.line 87
nop
:sswitch_data_0
.sparse-switch
0x10805cc -> :sswitch_2
0x10805d4 -> :sswitch_1
0x10805db -> :sswitch_0
.end sparse-switch
.end method
.method public onAttachedToWindow()V
.locals 4
.prologue
.line 56
invoke-super {p0}, Lcom/android/systemui/statusbar/StatusBarIconView;->onAttachedToWindow()V
.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "battery_indicator_style"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
const/4 v2, 0x0
iget-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
.line 61
return-void
.end method
.method public onDetachedFromWindow()V
.locals 2
.prologue
.line 64
invoke-super {p0}, Lcom/android/systemui/statusbar/StatusBarIconView;->onDetachedFromWindow()V
.line 65
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->unregisterContentObserver(Landroid/database/ContentObserver;)V
.line 66
return-void
.end method
.method protected setIcon(Lcom/android/internal/statusbar/StatusBarIcon;)V
.locals 2
.parameter "icon"
.prologue
.line 73
const/4 v1, -0x1
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageLevel(I)V
.line 74
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->getIcon(Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
move-result-object v0
.line 75
.local v0, drawable:Landroid/graphics/drawable/Drawable;
if-nez v0, :cond_0
const/4 v1, 0x1
:goto_0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mHideForAlternative:Z
.line 76
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateVisibility()V
.line 77
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
.line 78
iget v1, p1, Lcom/android/internal/statusbar/StatusBarIcon;->iconLevel:I
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageLevel(I)V
.line 79
return-void
.line 75
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
.method protected updateNumber(Lcom/android/internal/statusbar/StatusBarIcon;)V
.locals 0
.parameter "icon"
.prologue
.line 70
return-void
.end method
thank you
greetz
You are doing way to much work. Just go to the setting menu then battery style and choose the number type there.
Sent from my SAMSUNG-SGH-I777 using Tapatalk
Waddle said:
You are doing way to much work. Just go to the setting menu then battery style and choose the number type there.
Sent from my SAMSUNG-SGH-I777 using Tapatalk
Click to expand...
Click to collapse
hi,
thanks for your answer but you missed my point so here is a photo
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i want to show the green battery indicator AND the percent indicator TOGETHER
hope you understand it and can help me
greetz
it is impossible mate..sometimes we gotta live with limitation..
Sent from my LT18i

[HOWTO] Bypassing confirmation dialog for 'Exit all', an in-depth look!

This tutorial is going to delve into the convoluted smali involved in handling dialogs, and ultimately bypassing them. I must warn you there will be a lot of tracing in this post, so if all you want is the patch, this may not be for you. The idea is to gain an intimate understanding of dialogs from smali! (This is based on LPD base)
Decompile jobmanager.apk, then search for 'Exit all', which leads to public.xml: <public type="string" name="kill_all" id="0x7f050005" />
Searching for '7f050005' leads us to RunningAppsListActivity.smali (referred to as RALA from now on), which we can now dissect. Start by looking at some of the variables at the top of
code. Two should stand out:
Code:
.field private mKillAll:Landroid/widget/Button;
...
.field private mOnClickListenerKillAll:Landroid/view/View$OnClickListener;
These represent the button and the code that executes when it's clicked. Let's find out what that code is by searching, which leads to:
Code:
.line 308
new-instance v0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;
invoke-direct {v0, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
iput-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mOnClickListenerKillAll:Landroid/view/View$OnClickListener;
So now we know RALA$6 is our executed code:
Code:
.method public onClick(Landroid/view/View;)V
.locals 2
.parameter "v"
.prologue
.line 311
iget-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const/4 v1, 0x5
invoke-virtual {v0, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->showDialog(I)V
.line 312
return-void
.end method
So what does this mean? When the button is clicked, it's calling back to RALA with a value of 0x5. Let's figure out what that means, look at '.method protected onCreateDialog'
Code:
packed-switch p1, :pswitch_data_0
(This is defined at the end of the method as)
:pswitch_data_0
.packed-switch 0x1
:pswitch_1
:pswitch_0
:pswitch_2
:pswitch_3
:pswitch_4
.end packed-switch
So our value when clicking the button is 0x5, which translates to pswitch_4
Code:
:pswitch_4
new-instance v3, Landroid/app/AlertDialog$Builder;
invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
const v4, 0x7f050005 <<<<<<<<<<<<<<<<<<<<<<<<<< Remember this #, it's our 'Exit all' string id
...
new-instance v4, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$12;
invoke-direct {v4, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$12;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
invoke-virtual {v3, v7, v4}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
This last line sets the code executed when you click 'Ok', so lets look at RALA$12, inside OnClick:
Code:
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mHandler:Landroid/os/Handler;
invoke-static {v0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$300(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Landroid/os/Handler;
move-result-object v0
const/4 v1, 0x6
invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z
So this is sending a code (0x6) to mHandler in the main RALA module, let's see what that means. mHandler is our message handler, and is defined here:
Code:
.line 331
new-instance v0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
invoke-direct {v0, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
iput-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mHandler:Landroid/os/Handler;
So RALA$7 is our next target, specifically '.method public handleMessage(Landroid/os/MessageV':
Code:
iget v3, p1, Landroid/os/Message;->what:I
packed-switch v3, :pswitch_data_0
(which is)
.line 333
:pswitch_data_0
.packed-switch 0x1
:pswitch_0
:pswitch_1
:pswitch_2
:pswitch_3
:pswitch_4
:pswitch_5
:pswitch_6
:pswitch_7
.end packed-switch
(A side note, packed-switch 0x1 means the first entry starts with 0x1, so 0x6 is pswitch_5. Let's now look at that)
:pswitch_5
const-string v3, "RunningAppsListActivity"
const-string v4, "MSG_KILL_ALL"
invoke-static {v3, v4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 410
iget-object v3, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
new-instance v4, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;
...
So finally we have reached the true code for executing KILL ALL, and it lies within RALA$7$4. If you look at '.method public run()V' in RALA$7$4, you will see the extensive code to kill all running apps. So now we that we have what we want, how do we bypass the dialog? Simple, just abort creating the dialog and execute the code instead.
Let's take a moment to review the execution entirely:
RALA assigns button -> RALA$6 which calls back RALA -> Create dlg and set OK -> RALA$12 which then calls the message handler RALA$7 with code 0x5 ->
RALA$7$4 which is the ACTUAL 'kill all' code.
So our intercept point is in RALA$6, where we can bypass the creation of the dialog and execute the code directly. Now you can't just copy/paste the code from RALA$7$4 to RALA$6, there are variables specific to each .smali. So this is the fixed code with the manual changes highlighted:
Code:
.method public onClick(Landroid/view/View;)V
.locals [COLOR="Red"]7[/COLOR]
.parameter "v"
.prologue
.line 311
iget-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const/4 v1, 0x5
[COLOR="red"]#[/COLOR] invoke-virtual {v0, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->showDialog(I)V
.line 412
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->getBaseAppList()Ljava/util/List;
move-result-object v1
.line 413
.local v1, items:Ljava/util/List;,"Ljava/util/List<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 414
.local v3, removeTarget:Ljava/util/Set;,"Ljava/util/Set<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 415
.local v2, p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->isCanKilled()Z
move-result v4
if-eqz v4, :cond_0
.line 416
const-string v4, "RunningAppsListActivity"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Kill runningApplication! "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 417
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPkgInfo:Lcom/sec/android/app/controlpanel/PackageInfo;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$400(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/PackageInfo;
move-result-object v4
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v5
const/4 v6, 0x1
invoke-virtual {v4, v5, v6}, Lcom/sec/android/app/controlpanel/PackageInfo;->killPackage(Ljava/lang/String;Z)V
.line 418
invoke-interface {v3, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 421
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_1
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 422
.restart local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
goto :goto_1
.line 424
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_2
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->setList(Ljava/util/List;)V
.line 425
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->notifyDataSetChanged()V
.line 428
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
[COLOR="red"]#[/COLOR] iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
const v6, 0x7f050028
invoke-virtual {v5, v6}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->getText(I)Ljava/lang/CharSequence;
move-result-object v5
const/4 v6, 0x0
invoke-static {v4, v5, v6}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v4
invoke-virtual {v4}, Landroid/widget/Toast;->show()V
.line 312
return-void
.end method
That is it, recompile JobManager.apk, u/l and test it out! Hope you enjoyed the tut =)
Why didn't I see this before, your holding out on us in chat.
LiLChris06 said:
Why didn't I see this before, your holding out on us in chat.
Click to expand...
Click to collapse
I finished this a few weeks back, but just got around to writing it up..I'm pretty sure you got a pastebin msg one night =)
PS - For those that just want the patch, just copy/paste that last code box into RALA$6 (replacing the existing onclick method).
Lovely piece of information, easily readable
thanks very much
Update for 4.0.4
The overall structure is still the same, but here's the updated patch based on 4.0.4 LPO. You paste this into RALA$6, replacing the existing onclick method:
Code:
.method public onClick(Landroid/view/View;)V
.locals 8
.prologue
const/4 v7, 0x0
.line 428
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->getBaseAppList()Ljava/util/List;
move-result-object v1
.line 429
.local v1, items:Ljava/util/List;,"Ljava/util/List<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 432
.local v3, removeTarget:Ljava/util/Set;,"Ljava/util/Set<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
if-eqz v1, :cond_3
.line 433
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 434
.local v2, p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->isCanKilled()Z
move-result v4
if-eqz v4, :cond_0
.line 437
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPkgInfo:Lcom/sec/android/app/controlpanel/PackageInfo;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$400(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/PackageInfo;
move-result-object v4
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v5
const/4 v6, 0x1
invoke-virtual {v4, v5, v6}, Lcom/sec/android/app/controlpanel/PackageInfo;->killPackage(Ljava/lang/String;Z)V
.line 438
invoke-interface {v3, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 441
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_1
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 442
.restart local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
goto :goto_1
.line 444
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_2
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->setList(Ljava/util/List;)V
.line 445
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->notifyDataSetChanged()V
.line 447
const/4 v4, 0x2
const/4 v5, 0x0
:try_start_0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 448
const/4 v4, 0x3
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 449
const/4 v4, 0x4
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 450
const/4 v4, 0x5
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 457
:goto_2
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
# iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const v6, 0x7f050028
invoke-virtual {v5, v6}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->getText(I)Ljava/lang/CharSequence;
move-result-object v5
invoke-static {v4, v5, v7}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v4
invoke-virtual {v4}, Landroid/widget/Toast;->show()V
.line 461
.end local v0 #i$:Ljava/util/Iterator;
:cond_3
return-void
.line 451
.restart local v0 #i$:Ljava/util/Iterator;
:catch_0
move-exception v4
goto :goto_2
.end method

[HOW-TO] Disable the E911 Icon

This comes up frequently, and the icon is annoying. If you don't know what icon I'm talking about, it looks like one of the two that are attached to the post and lives next to the signal indicator. First, I'm going to assume you know how to decompile/recompile an APK. If you don't, well, go find out how to do that first, then come back because it isn't terribly difficult, and knowledge is power Now, what you need is SystemUI and you need to decompile it into resources (images and xml) and smali (java bytecode). Once that is done, we're looking for one specific file.
In the decompiled apk, find smali/com/android/systemui/statusbar/policy/LocationController.smali and open it in your favorite text editor. Replace the entire contents of the file with the following (NOTE: This is for VRALL4, it may be slightly different if you are on a different build):
Code:
.class public Lcom/android/systemui/statusbar/policy/LocationController;
.super Landroid/content/BroadcastReceiver;
.source "LocationController.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/systemui/statusbar/policy/LocationController$1;,
Lcom/android/systemui/statusbar/policy/LocationController$StatusBarHandler;
}
.end annotation
# static fields
.field private static final EVENT_STOP_GPS_TONE:I = 0x40
.field private static final GPS_NOTIFICATION_ID:I = 0x3d8d7
.field private static final GPS_NOTI_STATUS:Ljava/lang/String; = "gps_notification_sounds"
.field private static final TAG:Ljava/lang/String; = "StatusBar.LocationController"
.field private static final sLBSImages:[I
# instance fields
.field private LBS_ENABLED:Ljava/lang/String;
.field private LBS_ENABLED_CHANGE_ACTION:Ljava/lang/String;
.field private VZW_PROVIDER:Ljava/lang/String;
.field private mContext:Landroid/content/Context;
.field private mFocusToneGenerator:Landroid/media/ToneGenerator;
.field private final mHandler:Landroid/os/Handler;
.field private mMyContext:Landroid/content/Context;
.field private mNotificationService:Landroid/app/INotificationManager;
.field private mService:Landroid/app/StatusBarManager;
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 79
const/4 v0, 0x2
new-array v0, v0, [I
fill-array-data v0, :array_0
sput-object v0, Lcom/android/systemui/statusbar/policy/LocationController;->sLBSImages:[I
return-void
nop
:array_0
.array-data 0x4
0xc6t 0x0t 0x2t 0x7ft
0xc7t 0x0t 0x2t 0x7ft
.end array-data
.end method
.method public constructor <init>(Landroid/content/Context;)V
.locals 4
.parameter "context"
.prologue
const/4 v3, 0x0
.line 87
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
.line 69
new-instance v2, Lcom/android/systemui/statusbar/policy/LocationController$StatusBarHandler;
invoke-direct {v2, p0, v3}, Lcom/android/systemui/statusbar/policy/LocationController$StatusBarHandler;-><init>(Lcom/android/systemui/statusbar/policy/LocationController;Lcom/android/systemui/statusbar/policy/LocationController$1;)V
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mHandler:Landroid/os/Handler;
.line 78
iput-object v3, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mService:Landroid/app/StatusBarManager;
.line 83
const-string v2, "com.android.internal.location.intent.action.LBS_ENABLED_CHANGE"
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->LBS_ENABLED_CHANGE_ACTION:Ljava/lang/String;
.line 84
const-string v2, "lbsEnabled"
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->LBS_ENABLED:Ljava/lang/String;
.line 85
const-string v2, "vzw_lbs"
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->VZW_PROVIDER:Ljava/lang/String;
.line 88
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
.line 89
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mMyContext:Landroid/content/Context;
.line 91
new-instance v0, Landroid/content/IntentFilter;
invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V
.line 92
.local v0, filter:Landroid/content/IntentFilter;
const-string v2, "android.location.GPS_ENABLED_CHANGE"
invoke-virtual {v0, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 93
const-string v2, "android.location.GPS_FIX_CHANGE"
invoke-virtual {v0, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 97
invoke-virtual {p1, p0, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 99
const-string v2, "notification"
invoke-virtual {p1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/app/NotificationManager;
.line 101
.local v1, nm:Landroid/app/NotificationManager;
invoke-static {}, Landroid/app/NotificationManager;->getService()Landroid/app/INotificationManager;
move-result-object v2
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mNotificationService:Landroid/app/INotificationManager;
.line 109
return-void
.end method
.method private GenerateBeep()V
.locals 13
.prologue
const/4 v12, 0x0
const/4 v11, 0x1
.line 114
iput-object v12, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
.line 115
const/4 v3, 0x0
.line 116
.local v3, MIN_VOLUME_LEV:I
const/4 v1, 0x7
.line 117
.local v1, MAX_VOLUME_LEV:I
const/16 v4, 0xe
.line 118
.local v4, VOLUME_STEP:I
const/4 v2, 0x0
.line 119
.local v2, MIN_VOLUME:I
const/16 v0, 0x64
.line 120
.local v0, MAX_VOLUME:I
move v8, v0
.line 122
.local v8, mCurVol:I
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
const-string v10, "audio"
invoke-virtual {v9, v10}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Landroid/media/AudioManager;
.line 124
.local v5, audioManager:Landroid/media/AudioManager;
invoke-virtual {v5, v11}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v8
.line 126
const-string v9, "StatusBar.LocationController"
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
const-string v11, "GenerateBeep: Volumei Level:"
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
invoke-static {v9, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 128
if-lt v8, v3, :cond_2
if-gt v8, v1, :cond_2
.line 130
if-eq v8, v1, :cond_1
.line 131
mul-int/2addr v8, v4
.line 135
:goto_0
const-string v9, "StatusBar.LocationController"
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
const-string v11, "GenerateBeep: valid Volume:"
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
invoke-static {v9, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 144
:goto_1
:try_start_0
new-instance v9, Landroid/media/ToneGenerator;
const/4 v10, 0x1
invoke-direct {v9, v10, v8}, Landroid/media/ToneGenerator;-><init>(II)V
iput-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 151
:goto_2
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
if-eqz v9, :cond_0
.line 152
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mHandler:Landroid/os/Handler;
const/16 v10, 0x40
invoke-virtual {v9, v10}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v7
.line 153
.local v7, m:Landroid/os/Message;
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
const/16 v10, 0x1c
invoke-virtual {v9, v10}, Landroid/media/ToneGenerator;->startTone(I)Z
.line 154
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mHandler:Landroid/os/Handler;
const-wide/16 v10, 0x1f4
invoke-virtual {v9, v7, v10, v11}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z
.line 157
.end local v7 #m:Landroid/os/Message;
:cond_0
return-void
.line 133
:cond_1
move v8, v0
goto :goto_0
.line 138
:cond_2
const-string v9, "StatusBar.LocationController"
const-string v10, "Error getting current volume: Setting volume as max volume"
invoke-static {v9, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 139
move v8, v0
goto :goto_1
.line 145
:catch_0
move-exception v6
.line 147
.local v6, e:Ljava/lang/Exception;
iput-object v12, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
.line 148
sget-object v9, Ljava/lang/System;->err:Ljava/io/PrintStream;
invoke-virtual {v9, v6}, Ljava/io/PrintStream;->println(Ljava/lang/Object;)V
goto :goto_2
.end method
.method static synthetic access$100(Lcom/android/systemui/statusbar/policy/LocationController;)Landroid/media/ToneGenerator;
.locals 1
.parameter "x0"
.prologue
.line 60
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
return-object v0
.end method
.method static synthetic access$102(Lcom/android/systemui/statusbar/policy/LocationController;Landroid/media/ToneGenerator;)Landroid/media/ToneGenerator;
.locals 0
.parameter "x0"
.parameter "x1"
.prologue
.line 60
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
return-object p1
.end method
.method private checkLBSStatus()Z
.locals 1
.prologue
.line 300
const/4 v0, 0x0
return v0
.end method
.method private final updateLBS(Landroid/content/Intent;)V
.locals 0
.parameter "intent"
.prologue
.line 290
return-void
.end method
# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 15
.parameter "context"
.parameter "intent"
.prologue
.line 162
invoke-virtual/range {p2 .. p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v7
.line 163
.local v7, action:Ljava/lang/String;
const-string v1, "enabled"
const/4 v2, 0x0
move-object/from16 v0, p2
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v8
.line 171
.local v8, enabled:Z
const/4 v13, 0x0
.line 172
.local v13, valueFromPrefs:Z
const-string v1, "StatusBar.LocationController"
const-string v2, "onReceive: [GPS ICON]"
invoke-static {v1, v2}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 182
const-string v1, "android.location.GPS_FIX_CHANGE"
invoke-virtual {v7, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
if-eqz v8, :cond_0
.line 184
const v10, 0x10806c7
.line 185
.local v10, iconId:I
const v12, 0x7f0a0083
.line 186
.local v12, textResId:I
const/4 v14, 0x1
.line 228
.local v14, visible:Z
:goto_0
if-eqz v14, :cond_2
.line 229
:try_start_0
new-instance v9, Landroid/content/Intent;
const-string v1, "android.settings.LOCATION_SOURCE_SETTINGS"
invoke-direct {v9, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 230
.local v9, gpsIntent:Landroid/content/Intent;
const/high16 v1, 0x1000
invoke-virtual {v9, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 231
const/4 v1, 0x0
const/4 v2, 0x0
move-object/from16 v0, p1
invoke-static {v0, v1, v9, v2}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
move-result-object v11
.line 233
.local v11, pendingIntent:Landroid/app/PendingIntent;
new-instance v1, Landroid/app/Notification$Builder;
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
invoke-direct {v1, v2}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V
invoke-virtual {v1, v10}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;
move-result-object v1
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
invoke-virtual {v2, v12}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v2
invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;
move-result-object v1
const/4 v2, 0x1
invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setOngoing(Z)Landroid/app/Notification$Builder;
move-result-object v1
invoke-virtual {v1, v11}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Notification$Builder;->getNotification()Landroid/app/Notification;
move-result-object v5
.line 241
.local v5, n:Landroid/app/Notification;
const/4 v1, 0x0
iput-object v1, v5, Landroid/app/Notification;->tickerView:Landroid/widget/RemoteViews;
.line 242
const/4 v1, 0x0
iput-object v1, v5, Landroid/app/Notification;->tickerText:Ljava/lang/CharSequence;
.line 244
const/4 v1, 0x1
iput v1, v5, Landroid/app/Notification;->priority:I
.line 246
const/4 v1, 0x1
new-array v6, v1, [I
.line 247
.local v6, idOut:[I
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mNotificationService:Landroid/app/INotificationManager;
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x0
const v4, 0x3d8d7
invoke-interface/range {v1 .. v6}, Landroid/app/INotificationManager;->enqueueNotificationWithTag(Ljava/lang/String;Ljava/lang/String;ILandroid/app/Notification;[I)V
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line 261
.end local v5 #n:Landroid/app/Notification;
.end local v6 #idOut:[I
.end local v9 #gpsIntent:Landroid/content/Intent;
.end local v11 #pendingIntent:Landroid/app/PendingIntent;
:goto_1
return-void
.line 189
.end local v10 #iconId:I
.end local v12 #textResId:I
.end local v14 #visible:Z
:cond_0
const-string v1, "android.location.GPS_ENABLED_CHANGE"
invoke-virtual {v7, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_1
if-nez v8, :cond_1
.line 191
const/4 v14, 0x0
.line 192
.restart local v14 #visible:Z
const/4 v12, 0x0
.restart local v12 #textResId:I
move v10, v12
.restart local v10 #iconId:I
goto :goto_0
.line 199
.end local v10 #iconId:I
.end local v12 #textResId:I
.end local v14 #visible:Z
:cond_1
const-string v1, "StatusBar.LocationController"
const-string v2, "onReceive: [GPS ICON] GPS is on, but not receiving fixes"
invoke-static {v1, v2}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 200
const v10, 0x7f0200c5
.line 201
.restart local v10 #iconId:I
const v12, 0x7f0a0082
.line 202
.restart local v12 #textResId:I
const/4 v14, 0x1
.restart local v14 #visible:Z
goto :goto_0
.line 254
:cond_2
:try_start_1
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mNotificationService:Landroid/app/INotificationManager;
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v2
const v3, 0x3d8d7
invoke-interface {v1, v2, v3}, Landroid/app/INotificationManager;->cancelNotification(Ljava/lang/String;I)V
:try_end_1
.catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_0
goto :goto_1
.line 258
:catch_0
move-exception v1
goto :goto_1
.end method
Save the file, rebuild SystemUI.apk and enjoy
Well this possibly be implemented in your ROM?
Thanks!
Sent from my SCH-I605 using xda premium
Jetdr said:
Well this possibly be implemented in your ROM?
Thanks!
Sent from my SCH-I605 using xda premium
Click to expand...
Click to collapse
Already is
Why do this over just renaming the image files? Seems like a lot of work for the same thing.
Its TwiX said:
Why do this over just renaming the image files? Seems like a lot of work for the same thing.
Click to expand...
Click to collapse
This gets rid of the icon in what would be a "proper" manner. If you replaced the icon with a transparent image (what many people do), it still takes up a location on the status bar, and you may see an empty space between icons, or partially hidden notifications, if you use that method. Deleting the icon entirely would make an APK that can't be recompiled since the resources are missing.
This will allow you to make the icon fully disappear without taking up any space on the status bar, and allowing for the APK to be decompiled/recompiled in the future for more modifications.
imnuts said:
Already is
Click to expand...
Click to collapse
Here comes another Rom! Love it!
well icon is still appearing after opening up maps or after opening an app that uses the gps. upon reboot its gone but it re appears after using the gps. any other ideas?
inline6power said:
well icon is still appearing after opening up maps or after opening an app that uses the gps. upon reboot its gone but it re appears after using the gps. any other ideas?
Click to expand...
Click to collapse
Are you sure that's not the regular GPS symbol you're seeing? Screenshot?
Sent from my unlocked & underclocked Galaxy Note 2
sleevasteve said:
Are you sure that's not the regular GPS symbol you're seeing? Screenshot?
Sent from my unlocked & underclocked Galaxy Note 2
Click to expand...
Click to collapse
Sent from my SCH-I605 using Tapatalk 2
---------- Post added at 05:56 PM ---------- Previous post was at 05:54 PM ----------
I habe verified I have the right code in the right location. As soon as I reboot the icon is gone but if I use any app that uses gps it pops back up
Sent from my SCH-I605 using Tapatalk 2
can anyone else comfirm if the icon reappears after using maps or navigation?
I'll look through and make sure I didn't also change something else when I made this change. I didn't think I did, but I was looking for other items when I found this too.
inline6power said:
Sent from my SCH-I605 using Tapatalk 2
---------- Post added at 05:56 PM ---------- Previous post was at 05:54 PM ----------
I habe verified I have the right code in the right location. As soon as I reboot the icon is gone but if I use any app that uses gps it pops back up
Sent from my SCH-I605 using Tapatalk 2
Click to expand...
Click to collapse
In the meantime, just changing the extension of the .PNG files to .bak will do the trick. And it didn't seem to leave a blank space for me in the status bar, the only one that did that for me was the alarm clock icon.
Sent from my unlocked & underclocked Galaxy Note 2
I fixed the issue with the icon reappearing and put the updated info in the OP. It was updated for VRALL4, but I don't think it will be much different for VRALJB.
imnuts said:
I fixed the issue with the icon reappearing and put the updated info in the OP. It was updated for VRALL4, but I don't think it will be much different for VRALJB.
Click to expand...
Click to collapse
for I605VRAMC3 you will need to change a a few ids other wise the wrong icons and strings will display for "searching for gps" and "location set by gps"
here is the updated just like the OP just replace everything thing in there with this content
LocationController.smali
Code:
.class public Lcom/android/systemui/statusbar/policy/LocationController;
.super Landroid/content/BroadcastReceiver;
.source "LocationController.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/systemui/statusbar/policy/LocationController$1;,
Lcom/android/systemui/statusbar/policy/LocationController$StatusBarHandler;
}
.end annotation
# static fields
.field private static final EVENT_STOP_GPS_TONE:I = 0x40
.field private static final GPS_NOTIFICATION_ID:I = 0x3d8d7
.field private static final GPS_NOTI_STATUS:Ljava/lang/String; = "gps_notification_sounds"
.field private static final TAG:Ljava/lang/String; = "StatusBar.LocationController"
.field private static final sLBSImages:[I
# instance fields
.field private LBS_ENABLED:Ljava/lang/String;
.field private LBS_ENABLED_CHANGE_ACTION:Ljava/lang/String;
.field private VZW_PROVIDER:Ljava/lang/String;
.field private mContext:Landroid/content/Context;
.field private mFocusToneGenerator:Landroid/media/ToneGenerator;
.field private final mHandler:Landroid/os/Handler;
.field private mMyContext:Landroid/content/Context;
.field private mNotificationService:Landroid/app/INotificationManager;
.field private mService:Landroid/app/StatusBarManager;
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 79
const/4 v0, 0x2
new-array v0, v0, [I
fill-array-data v0, :array_0
sput-object v0, Lcom/android/systemui/statusbar/policy/LocationController;->sLBSImages:[I
return-void
nop
:array_0
.array-data 0x4
0xc6t 0x0t 0x2t 0x7ft
0xc7t 0x0t 0x2t 0x7ft
.end array-data
.end method
.method public constructor <init>(Landroid/content/Context;)V
.locals 4
.parameter "context"
.prologue
const/4 v3, 0x0
.line 87
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
.line 69
new-instance v2, Lcom/android/systemui/statusbar/policy/LocationController$StatusBarHandler;
invoke-direct {v2, p0, v3}, Lcom/android/systemui/statusbar/policy/LocationController$StatusBarHandler;-><init>(Lcom/android/systemui/statusbar/policy/LocationController;Lcom/android/systemui/statusbar/policy/LocationController$1;)V
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mHandler:Landroid/os/Handler;
.line 78
iput-object v3, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mService:Landroid/app/StatusBarManager;
.line 83
const-string v2, "com.android.internal.location.intent.action.LBS_ENABLED_CHANGE"
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->LBS_ENABLED_CHANGE_ACTION:Ljava/lang/String;
.line 84
const-string v2, "lbsEnabled"
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->LBS_ENABLED:Ljava/lang/String;
.line 85
const-string v2, "vzw_lbs"
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->VZW_PROVIDER:Ljava/lang/String;
.line 88
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
.line 89
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mMyContext:Landroid/content/Context;
.line 91
new-instance v0, Landroid/content/IntentFilter;
invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V
.line 92
.local v0, filter:Landroid/content/IntentFilter;
const-string v2, "android.location.GPS_ENABLED_CHANGE"
invoke-virtual {v0, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 93
const-string v2, "android.location.GPS_FIX_CHANGE"
invoke-virtual {v0, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 97
invoke-virtual {p1, p0, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 99
const-string v2, "notification"
invoke-virtual {p1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/app/NotificationManager;
.line 101
.local v1, nm:Landroid/app/NotificationManager;
invoke-static {}, Landroid/app/NotificationManager;->getService()Landroid/app/INotificationManager;
move-result-object v2
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mNotificationService:Landroid/app/INotificationManager;
.line 109
return-void
.end method
.method private GenerateBeep()V
.locals 13
.prologue
const/4 v12, 0x0
const/4 v11, 0x1
.line 114
iput-object v12, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
.line 115
const/4 v3, 0x0
.line 116
.local v3, MIN_VOLUME_LEV:I
const/4 v1, 0x7
.line 117
.local v1, MAX_VOLUME_LEV:I
const/16 v4, 0xe
.line 118
.local v4, VOLUME_STEP:I
const/4 v2, 0x0
.line 119
.local v2, MIN_VOLUME:I
const/16 v0, 0x64
.line 120
.local v0, MAX_VOLUME:I
move v8, v0
.line 122
.local v8, mCurVol:I
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
const-string v10, "audio"
invoke-virtual {v9, v10}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Landroid/media/AudioManager;
.line 124
.local v5, audioManager:Landroid/media/AudioManager;
invoke-virtual {v5, v11}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v8
.line 126
const-string v9, "StatusBar.LocationController"
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
const-string v11, "GenerateBeep: Volumei Level:"
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
invoke-static {v9, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 128
if-lt v8, v3, :cond_2
if-gt v8, v1, :cond_2
.line 130
if-eq v8, v1, :cond_1
.line 131
mul-int/2addr v8, v4
.line 135
:goto_0
const-string v9, "StatusBar.LocationController"
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
const-string v11, "GenerateBeep: valid Volume:"
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
invoke-static {v9, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 144
:goto_1
:try_start_0
new-instance v9, Landroid/media/ToneGenerator;
const/4 v10, 0x1
invoke-direct {v9, v10, v8}, Landroid/media/ToneGenerator;-><init>(II)V
iput-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 151
:goto_2
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
if-eqz v9, :cond_0
.line 152
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mHandler:Landroid/os/Handler;
const/16 v10, 0x40
invoke-virtual {v9, v10}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v7
.line 153
.local v7, m:Landroid/os/Message;
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
const/16 v10, 0x1c
invoke-virtual {v9, v10}, Landroid/media/ToneGenerator;->startTone(I)Z
.line 154
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mHandler:Landroid/os/Handler;
const-wide/16 v10, 0x1f4
invoke-virtual {v9, v7, v10, v11}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z
.line 157
.end local v7 #m:Landroid/os/Message;
:cond_0
return-void
.line 133
:cond_1
move v8, v0
goto :goto_0
.line 138
:cond_2
const-string v9, "StatusBar.LocationController"
const-string v10, "Error getting current volume: Setting volume as max volume"
invoke-static {v9, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 139
move v8, v0
goto :goto_1
.line 145
:catch_0
move-exception v6
.line 147
.local v6, e:Ljava/lang/Exception;
iput-object v12, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
.line 148
sget-object v9, Ljava/lang/System;->err:Ljava/io/PrintStream;
invoke-virtual {v9, v6}, Ljava/io/PrintStream;->println(Ljava/lang/Object;)V
goto :goto_2
.end method
.method static synthetic access$100(Lcom/android/systemui/statusbar/policy/LocationController;)Landroid/media/ToneGenerator;
.locals 1
.parameter "x0"
.prologue
.line 60
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
return-object v0
.end method
.method static synthetic access$102(Lcom/android/systemui/statusbar/policy/LocationController;Landroid/media/ToneGenerator;)Landroid/media/ToneGenerator;
.locals 0
.parameter "x0"
.parameter "x1"
.prologue
.line 60
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mFocusToneGenerator:Landroid/media/ToneGenerator;
return-object p1
.end method
.method private checkLBSStatus()Z
.locals 1
.prologue
.line 300
const/4 v0, 0x0
return v0
.end method
.method private final updateLBS(Landroid/content/Intent;)V
.locals 0
.parameter "intent"
.prologue
.line 290
return-void
.end method
# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 15
.parameter "context"
.parameter "intent"
.prologue
.line 162
invoke-virtual/range {p2 .. p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v7
.line 163
.local v7, action:Ljava/lang/String;
const-string v1, "enabled"
const/4 v2, 0x0
move-object/from16 v0, p2
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v8
.line 171
.local v8, enabled:Z
const/4 v13, 0x0
.line 172
.local v13, valueFromPrefs:Z
const-string v1, "StatusBar.LocationController"
const-string v2, "onReceive: [GPS ICON]"
invoke-static {v1, v2}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 182
const-string v1, "android.location.GPS_FIX_CHANGE"
invoke-virtual {v7, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
if-eqz v8, :cond_0
.line 184
const v10, 0x10806c8
.line 185
.local v10, iconId:I
const v12, 0x7f0a0089
.line 186
.local v12, textResId:I
const/4 v14, 0x1
.line 228
.local v14, visible:Z
:goto_0
if-eqz v14, :cond_2
.line 229
:try_start_0
new-instance v9, Landroid/content/Intent;
const-string v1, "android.settings.LOCATION_SOURCE_SETTINGS"
invoke-direct {v9, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 230
.local v9, gpsIntent:Landroid/content/Intent;
const/high16 v1, 0x1000
invoke-virtual {v9, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 231
const/4 v1, 0x0
const/4 v2, 0x0
move-object/from16 v0, p1
invoke-static {v0, v1, v9, v2}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
move-result-object v11
.line 233
.local v11, pendingIntent:Landroid/app/PendingIntent;
new-instance v1, Landroid/app/Notification$Builder;
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
invoke-direct {v1, v2}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V
invoke-virtual {v1, v10}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;
move-result-object v1
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
invoke-virtual {v2, v12}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v2
invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;
move-result-object v1
const/4 v2, 0x1
invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setOngoing(Z)Landroid/app/Notification$Builder;
move-result-object v1
invoke-virtual {v1, v11}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Notification$Builder;->getNotification()Landroid/app/Notification;
move-result-object v5
.line 241
.local v5, n:Landroid/app/Notification;
const/4 v1, 0x0
iput-object v1, v5, Landroid/app/Notification;->tickerView:Landroid/widget/RemoteViews;
.line 242
const/4 v1, 0x0
iput-object v1, v5, Landroid/app/Notification;->tickerText:Ljava/lang/CharSequence;
.line 244
const/4 v1, 0x1
iput v1, v5, Landroid/app/Notification;->priority:I
.line 246
const/4 v1, 0x1
new-array v6, v1, [I
.line 247
.local v6, idOut:[I
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mNotificationService:Landroid/app/INotificationManager;
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x0
const v4, 0x3d8d7
invoke-interface/range {v1 .. v6}, Landroid/app/INotificationManager;->enqueueNotificationWithTag(Ljava/lang/String;Ljava/lang/String;ILandroid/app/Notification;[I)V
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line 261
.end local v5 #n:Landroid/app/Notification;
.end local v6 #idOut:[I
.end local v9 #gpsIntent:Landroid/content/Intent;
.end local v11 #pendingIntent:Landroid/app/PendingIntent;
:goto_1
return-void
.line 189
.end local v10 #iconId:I
.end local v12 #textResId:I
.end local v14 #visible:Z
:cond_0
const-string v1, "android.location.GPS_ENABLED_CHANGE"
invoke-virtual {v7, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_1
if-nez v8, :cond_1
.line 191
const/4 v14, 0x0
.line 192
.restart local v14 #visible:Z
const/4 v12, 0x0
.restart local v12 #textResId:I
move v10, v12
.restart local v10 #iconId:I
goto :goto_0
.line 199
.end local v10 #iconId:I
.end local v12 #textResId:I
.end local v14 #visible:Z
:cond_1
const-string v1, "StatusBar.LocationController"
const-string v2, "onReceive: [GPS ICON] GPS is on, but not receiving fixes"
invoke-static {v1, v2}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 200
const v10, 0x7f0200c7
.line 201
.restart local v10 #iconId:I
const v12, 0x7f0a0088
.line 202
.restart local v12 #textResId:I
const/4 v14, 0x1
.restart local v14 #visible:Z
goto :goto_0
.line 254
:cond_2
:try_start_1
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mNotificationService:Landroid/app/INotificationManager;
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/LocationController;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v2
const v3, 0x3d8d7
invoke-interface {v1, v2, v3}, Landroid/app/INotificationManager;->cancelNotification(Ljava/lang/String;I)V
:try_end_1
.catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_0
goto :goto_1
.line 258
:catch_0
move-exception v1
goto :goto_1
.end method

[HOW TO][20Mar][How to Disable Signature Checker For System App[Sammy JB]

Hi i want share this method to all step by step
in 4 step
You need knows about smali and backsmali And Notpad++....
1.Decompile Services.jar
Go to smali\com\android\server\pm
Open PackageManagerService.smali with Notpad++
2.Find this Method:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
.parameter "s1"
.parameter "s2"
.prologue
.line 3445
if-nez p0, :cond_1
.line 3446
if-nez p1, :cond_0
const/4 v6, 0x1
.line 3465
:goto_0
return v6
.line 3446
:cond_0
const/4 v6, -0x1
goto :goto_0
.line 3450
:cond_1
if-nez p1, :cond_2
.line 3451
const/4 v6, -0x2
goto :goto_0
.line 3453
:cond_2
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 3454
.local v3, set1:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p0
.local v0, arr$:[Landroid/content/pm/Signature;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_1
if-ge v1, v2, :cond_3
aget-object v5, v0, v1
.line 3455
.local v5, sig:Landroid/content/pm/Signature;
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 3454
add-int/lit8 v1, v1, 0x1
goto :goto_1
.line 3457
.end local v5 #sig:Landroid/content/pm/Signature;
:cond_3
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
.line 3458
.local v4, set2:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_2
if-ge v1, v2, :cond_4
aget-object v5, v0, v1
.line 3459
.restart local v5 #sig:Landroid/content/pm/Signature;
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 3458
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 3462
.end local v5 #sig:Landroid/content/pm/Signature;
:cond_4
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_5
.line 3463
const/4 v6, 0x0
goto :goto_0
.line 3465
:cond_5
const/4 v6, -0x3
goto :goto_0
.end method
3.Chang it to this:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const-string p0, "Biftor:"
const-string p1, "Skip signatures check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 v6, 0x0
return v6
.end method
you can chang "Biftor" to your name
Save That
4.Recompile Services.jar Again
after this you can Sign all of System App and enjoy it!
This topick For Persian user
Thanks to Wanam for first learn this to me!
Goodluck
Armin
Biftor™
Great. Thanks for sharing.
Big thanks :good:

[Guide]Disable Signature Check (Nougat)

Decompil Services.jar
Go into smali\com\android\server\pm\PackageManagerService. smali
Search for :
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 8
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v3, 0x1
const/4 v5, -0x3
const/4 v4, 0x0
.line 4751
if-nez p0, :cond_1
.line 4752
if-nez p1, :cond_0
:goto_0
return v3
.line 4754
:cond_0
const/4 v3, -0x1
goto :goto_0
.line 4757
:cond_1
if-nez p1, :cond_2
.line 4758
const/4 v3, -0x2
return v3
.line 4761
:cond_2
array-length v6, p0
array-length v7, p1
if-eq v6, v7, :cond_3
.line 4762
return v5
.line 4766
:cond_3
array-length v6, p0
if-ne v6, v3, :cond_5
.line 4767
aget-object v3, p0, v4
aget-object v6, p1, v4
invoke-virtual {v3, v6}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_4
move v3, v4
:goto_1
return v3
:cond_4
move v3, v5
.line 4769
goto :goto_1
.line 4772
:cond_5
new-instance v0, Landroid/util/ArraySet;
invoke-direct {v0}, Landroid/util/ArraySet;-><init>()V
.line 4773
.local v0, "set1":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
array-length v6, p0
move v3, v4
:goto_2
if-ge v3, v6, :cond_6
aget-object v2, p0, v3
.line 4774
.local v2, "sig":Landroid/content/pm/Signature;
invoke-virtual {v0, v2}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
.line 4773
add-int/lit8 v3, v3, 0x1
goto :goto_2
.line 4776
.end local v2 # "sig":Landroid/content/pm/Signature;
:cond_6
new-instance v1, Landroid/util/ArraySet;
invoke-direct {v1}, Landroid/util/ArraySet;-><init>()V
.line 4777
.local v1, "set2":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
array-length v6, p1
move v3, v4
:goto_3
if-ge v3, v6, :cond_7
aget-object v2, p1, v3
.line 4778
.restart local v2 # "sig":Landroid/content/pm/Signature;
invoke-virtual {v1, v2}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
.line 4777
add-int/lit8 v3, v3, 0x1
goto :goto_3
.line 4781
.end local v2 # "sig":Landroid/content/pm/Signature;
:cond_7
invoke-virtual {v0, v1}, Landroid/util/ArraySet;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_8
.line 4782
return v4
.line 4784
:cond_8
return v5
.end method
Replace:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 8
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v4, 0x0
.line 4784
return v4
.end method
Recompile Services.jar
A2017G_B05_MOD

Categories

Resources