[Galaxy S II Android Development] stangdriver44:
Tracking down specific smali?

First off great guide! I've been reading this guide for the past year and finally feeling a little more comfortable with smali edits! Thank you

My question is this. How do I track down a specific smali to add a setColorFilter. I am running Tmo S5 and trying to build a color picker into my rom control for things like signalbars, data Icons and such. The problem is finding which smali they are in to begin with? Besides opening each smali file and searching via notepad++ (which as you know is 100's if not 1000's of smali) raking a very long time! Is there and easier way?

Second, once I find where some would be, how would a create a new "key" and where does it go in the existing smali?

Below is a small sample of one thing I'm trying to color.

.method public setSystemUiVisibility(II)V
.locals 15

iget v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

xor-int/lit8 v0, p2, -0x1

and-int/2addr v0, v1

and-int v3, p1, p2

or-int v2, v0, v3

xor-int v7, v2, v1

sget-boolean v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->DEBUG:Z

if-eqz v0, :cond_0

const-string v0, "PhoneStatusBar"

const-string v3, "setSystemUiVisibility vis=%s mask=%s oldVal=%s newVal=%s diff=%s"

const/4 v4, 0x5

new-array v4, v4, [Ljava/lang/Object;

const/4 v5, 0x0

invoke-static/range {p1 .. p1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

move-result-object v14

aput-object v14, v4, v5

const/4 v5, 0x1

invoke-static/range {p2 .. p2}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

move-result-object v14

aput-object v14, v4, v5

const/4 v5, 0x2

invoke-static {v1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

move-result-object v14

aput-object v14, v4, v5

const/4 v5, 0x3

invoke-static {v2}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

move-result-object v14

aput-object v14, v4, v5

const/4 v5, 0x4

invoke-static {v7}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

move-result-object v14

aput-object v14, v4, v5

invoke-static {v3, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v3

invoke-static {v0, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

:cond_0
if-eqz v7, :cond_c

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

and-int/lit16 v0, v0, 0x4000

if-lez v0, :cond_d

const/4 v13, 0x1

:goto_0
iput v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

and-int/lit8 v0, v7, 0x1

if-eqz v0, :cond_2

and-int/lit8 v0, p1, 0x1

if-eqz v0, :cond_e

const/4 v8, 0x1

:goto_1
if-eqz v8, :cond_1

invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->animateCollapsePanels()V

iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicking:Z

if-eqz v0, :cond_1

invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->haltTicker()V

:cond_1
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setAreThereNotifications()V

:cond_2
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getBarTransitions()Lcom/android/systemui/statusbar/phone/BarTransitions;

move-result-object v3

const/high16 v4, 0x4000000

const/high16 v5, 0x40000000 # 2.0f

move-object v0, p0

invoke-direct/range {v0 .. v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->computeBarMode(IILcom/android/systemui/statusbar/phone/BarTransitions;II)I

move-result v11

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNavigationBarView:Lcom/android/systemui/statusbar/phone/NavigationBarView;

if-nez v0, :cond_f

const/4 v9, -0x1

:goto_2
const/4 v0, -0x1

if-eq v11, v0, :cond_10

const/4 v12, 0x1

:goto_3
const/4 v0, -0x1

if-eq v9, v0, :cond_11

const/4 v10, 0x1

:goto_4
const/4 v6, 0x0

if-eqz v12, :cond_3

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarMode:I

if-eq v11, v0, :cond_3

iput v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarMode:I

const/4 v6, 0x1

:cond_3
if-eqz v10, :cond_4

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNavigationBarMode:I

if-eq v9, v0, :cond_4

iput v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNavigationBarMode:I

const/4 v6, 0x1

:cond_4
if-eqz v6, :cond_5

invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->checkBarModes()V

:cond_5
if-nez v12, :cond_6

if-eqz v10, :cond_8

:cond_6
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarMode:I

const/4 v3, 0x1

if-eq v0, v3, :cond_7

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNavigationBarMode:I

const/4 v3, 0x1

if-ne v0, v3, :cond_12

:cond_7
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->scheduleAutohide()V

:cond_8
:goto_5
const/high16 v0, 0x10000000

and-int v0, v0, p1

if-eqz v0, :cond_9

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

const v3, -0x10000001

and-int/2addr v0, v3

iput v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

:cond_9
const/high16 v0, 0x20000000

and-int v0, v0, p1

if-eqz v0, :cond_a

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

const v3, -0x20000001

and-int/2addr v0, v3

iput v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

:cond_a
if-eqz v13, :cond_b

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

or-int/lit16 v0, v0, 0x4000

iput v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

:cond_b
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I

invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->notifyUiVisibilityChanged(I)V

:cond_c
return-void

:cond_d
const/4 v13, 0x0

goto/16 :goto_0

:cond_e
const/4 v8, 0x0

goto/16 :goto_1

:cond_f
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNavigationBarView:Lcom/android/systemui/statusbar/phone/NavigationBarView;

invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getBarTransitions()Lcom/android/systemui/statusbar/phone/BarTransitions;

move-result-object v3

const/high16 v4, 0x8000000

const/high16 v5, -0x80000000

move-object v0, p0

invoke-direct/range {v0 .. v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->computeBarMode(IILcom/android/systemui/statusbar/phone/BarTransitions;II)I

move-result v9

goto :goto_2

:cond_10
const/4 v12, 0x0

goto :goto_3

:cond_11
const/4 v10, 0x0

goto :goto_4

:cond_12
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->cancelAutohide()V

goto :goto_5
.end method

[COLOR="Red"].method setTickerTextColor()V
.locals 3

iget-object v0, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v1, "ticker_text_color"

const v2, -0x1

invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v2, 0x7f0d0322

invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

move-result-object v1

check-cast v1, Landroid/widget/TextView;

invoke-virtual {v1, v0}, Landroid/widget/TextView;->setTextColor(I)V

iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v2, 0x7f0d0323

invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

move-result-object v1

check-cast v1, Landroid/widget/TextView;

invoke-virtual {v1, v0}, Landroid/widget/TextView;->setTextColor(I)V

return-void
.end method[/COLOR]

.method public setVisibilityWhenDone(Landroid/animation/Animator;Landroid/view/View;I)Landroid/animation/Animator;
.locals 1

new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$33;

invoke-direct {v0, p0, p2, p3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$33;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/view/View;I)V

invoke-virtual {p1, v0}, Landroid/animation/Animator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

return-object p1
.end method

The section in red is what I've added am trying to control using rom control?

I include some surrounding code to see if I placed it wrong?

I have the option showing in rom control and have added the line to the xml files. The public ids are correct, just nothing happens when I change the color?? Any help from anyone would be much appreciated!! Thank you