[Sony Cross-Device Development Themes and Apps] venkat kamesh:
Hello guys

Happy new Year for first :P

This is my first tut in This new year 2016 :p :D

All you need is Deodexed SystemUI.apk and Settings.apk

1. Decompile SystemUI.apk

2. Open SystemUI.apk/smali/com/android/systemui/qs/QSPanel.smali

3. Find this code

.field private mBrightnessPaddingTop:I

Below that add this code

.field private mBrightnessSliderEnabled:Z

4. Search for this Method

.method private setDetailRecord(Lcom/android/systemui/qs/QSPanel$Record;)V

and above that method add this complete method

.method private isBrightnessSliderEnabled()I
.locals 4

const/4 v3, 0x0

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

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

move-result-object v0

const-string v1, "brightness_slider_show"

const/4 v2, 0x1

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

move-result v0

if-eqz v0, :cond_0

const/4 v3, 0x1

:cond_0
iput-boolean v3, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessSliderEnabled:Z

return v3
.end method

5. Search for this method

.method private showDetail(ZLcom/android/systemui/qs/QSPanel$Record;)V

Above that method, add this method

.method private showBrightnessSlider()Z
.locals 5

const/16 v3, 0x8

const/4 v2, 0x0

const v1, 0x7f10012e

invoke-direct {p0}, Lcom/android/systemui/qs/QSPanel;->isBrightnessSliderEnabled()I

move-result v4

invoke-virtual {p0, v1}, Lcom/android/systemui/qs/QSPanel;->findViewById(I)Landroid/view/View;

move-result-object v0

check-cast v0, Lcom/android/systemui/settings/ToggleSlider;

if-eqz v4, :cond_0

iget-boolean v1, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessSliderEnabled:Z

if-eqz v1, :cond_0

iget-object v1, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessView:Landroid/view/View;

invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V

invoke-virtual {v0, v2}, Lcom/android/systemui/settings/ToggleSlider;->setVisibility(I)V

:goto_0
invoke-virtual {p0}, Lcom/android/systemui/qs/QSPanel;->updateResources()V

iget-boolean v1, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessSliderEnabled:Z

return v1

:cond_0
iget-object v1, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessView:Landroid/view/View;

invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V

invoke-virtual {v0, v3}, Lcom/android/systemui/settings/ToggleSlider;->setVisibility(I)V

goto :goto_0
.end method

6. Now Look for this Code

if-eqz p1, :[COLOR="red"]cond_3[/COLOR]

.line 216
iget-object [COLOR="Red"]v2[/COLOR], p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessController:Lcom/android/systemui/settings/BrightnessController;

Add the code above the .line 216 ( this .line 216 will not be same with all devices )

invoke-direct {p0}, Lcom/android/systemui/qs/QSPanel;->showBrightnessSlider()Z

move-result [COLOR="red"]v2[/COLOR]

if-eqz [COLOR="red"]v2[/COLOR], :[COLOR="red"]cond_3[/COLOR]

Finally it looks like

if-eqz p1, [COLOR="blue"]:cond_3[/COLOR]

[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/qs/QSPanel;->showBrightnessSlider()Z

move-result [COLOR="blue"]v2[/COLOR]

if-eqz [COLOR="blue"]v2[/COLOR], [COLOR="blue"]:cond_3[/COLOR][/COLOR]
.line 216
iget-object [COLOR="Blue"]v2[/COLOR], p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessController:Lcom/android/systemui/settings/BrightnessController;

After adding that

replace this Public id

<public type="id" name="brightness_slider" id="0x7f10012e" />

6. Now compile the SystemUI.apk and sign it and replace

Now time to add in the settings :p look for post #2