[Sony Cross-Device Development Themes and Apps] venkat kamesh:
Systemui ( second part )

Decompile SystemUI.apk

1. Download this View attachment 3905209 and merge to your SystemUI.apk

Now open systemui.apk/res/values/colors.xml

Add this

<color name="gesture_overlay_background_fill_color">#80000000</color>
<color name="gesture_color">@android:color/holo_blue_light</color>

2. Compile and decompile

3. Open Systemui.apk/smali/com/android/systemui/statusbar/BaseStatusBar.smali

find this

.field private mFontScale:F

after that add this

.field protected mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_FIELD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.end field

find this

# virtual methods

After that add this

.method protected addGestureAnywhereView()V
.locals 3
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_METHOD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation

.prologue
.line 2413
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;

const v1, 0x7f040059

const/4 v2, 0x0

invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

move-result-object v0

check-cast v0, Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;

iput-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;

.line 2415
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mWindowManager:Landroid/view/WindowManager;

iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;

const/4 v2, 0x3

invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/BaseStatusBar;->getGestureAnywhereViewLayoutParams(I)Landroid/view/WindowManager$LayoutParams;

move-result-object v2

invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

.line 2416
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;

invoke-virtual {v0, p0}, Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;->setStatusBar(Lcom/android/systemui/statusbar/BaseStatusBar;)V

.line 2417
return-void
.end method

Replace ids (compare from public that i gave in zip

Now look for this method

.method protected abstract getMaxKeyguardNotifications()I

After that method

Add this method

.method protected getGestureAnywhereViewLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
.locals 6
.param p1, "gravity" # I
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_METHOD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation

.prologue
.line 2427
new-instance v0, Landroid/view/WindowManager$LayoutParams;

const/4 v1, -0x2

const/4 v2, -0x1

const/16 v3, 0x7e1

const v4, 0x840068

const/4 v5, -0x3

invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V

.line 2438
.local v0, "lp":Landroid/view/WindowManager$LayoutParams;
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I

or-int/lit8 v1, v1, 0x40

iput v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I

.line 2439
or-int/lit8 v1, p1, 0x30

iput v1, v0, Landroid/view/WindowManager$LayoutParams;->gravity:I

.line 2440
const-string v1, "GestureAnywhereView"

invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V

.line 2442
return-object v0
.end method

.method public getHandler()Landroid/os/Handler;
.locals 1

.prologue
.line 344
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;

if-eqz v0, :cond_0

iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;

:goto_0
return-object v0

:cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->createHandler()Lcom/android/systemui/statusbar/BaseStatusBar$H;

move-result-object v0

goto :goto_0
.end method

save and close

4. Open SystemUI.apk/smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali

Find this method

.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

after .local xx

add this

.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->CHANGE_CODE:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation

Now find this line

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

after that add this line

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

Save and Compile

Replace the Ids by comparing with mine that i gave in zip

and replace

For final part of Settings continued in next post #3