[Galaxy S6 General] sac23:
How to add toggles color back round ( without settings observer )

guys this ones my second guide so ill try to do the best i can

also thanks to aceqott and remuntada78 original guide

also ikrom

i hope works for u guys also

SystemUI

\smali\com\android\systemui\qs\QSTileView.smali

Find .method public constructor <init>(Landroid/content/Context;)V

and add

invoke-virtual {p0, v5}, Lcom/android/systemui/qs/QSTileView;->setLongClickable(Z)V

invoke-direct {p0}, Lcom/android/systemui/qs/QSTileView;->updateTopPadding()V

invoke-virtual {p0}, Lcom/android/systemui/qs/QSTileView;->set_toggles()V

then

next were going to add the files in the zip below to res/drawable and drawable-xxxhdpi-v4

then recompile and decompile to get the right hex needed for next step

then we add this method and replace all hex with yours

.method set_toggles()V
.locals 6

iget-object v4, p0, Lcom/android/systemui/qs/QSTileView;->mIcon:Landroid/view/View;

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

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

move-result-object v1

const-string v2, "toggle_buttons_background"

const/4 v3, 0x0

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

move-result v1

const v2, 0x1

if-eq v1, v2, :cond_0

const v2, 0x2

if-eq v1, v2, :cond_1

const v2, 0x3

if-eq v1, v2, :cond_2

const v2, 0x4

if-eq v1, v2, :cond_3

const v2, 0x5

if-eq v1, v2, :cond_4

const v2, 0x6

if-eq v1, v2, :cond_5

const v2, 0x7

if-eq v1, v2, :cond_6

const v2, 0x8

const v0, 0x7f020630 ## add your public to match <public type="drawable" name="tw_quick_panel_quick_setting_button_round_bg" />

goto :goto_0

:cond_0
const v0, 0x0

goto :goto_0

:cond_1
const v0, 0x7f020741 ## add your public to match "tw_quick_panel_quick_setting_button_round_bg_01"

goto :goto_0

:cond_2
const v0, 0x7f020742 ## add your public to match "tw_quick_panel_quick_setting_button_round_bg_02"

goto :goto_0

:cond_3
const v0, 0x7f020743 ## add your public to match "tw_quick_panel_quick_setting_button_round_bg_03"

goto :goto_0

:cond_4
const v0, 0x7f020744 ## add your public to match "tw_quick_panel_quick_setting_button_round_bg_04"

goto :goto_0

:cond_5
const v0, 0x7f020745 ## add your public to match "tw_quick_panel_quick_setting_button_round_bg_05"

goto :goto_0

:cond_6
const v0, 0x7f020746 ## add your public to match "tw_quick_panel_quick_setting_button_round_bg_06"

goto :goto_0

:goto_0
invoke-virtual {v4, v0}, Landroid/view/View;->setBackgroundResource(I)V

invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

move-result-object v5

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

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

move-result-object v1

const-string v2, "toggle_buttons_background_color"

const v3, -0x1

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

move-result v1

sget-object v3, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

invoke-virtual {v5, v1, v3}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V

return-void
.end method

save

then well be heading to QSPanel.smali

find

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

add

iput-object v0, p0, Lcom/android/systemui/qs/QSPanel;->mDefaultDisplay:Landroid/view/Display;

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

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

then right underneath that add this code

.method static synthetic access$000(Lcom/android/systemui/qs/QSPanel;Lcom/android/systemui/qs/QSPanel$TileRecord;Lcom/android/systemui/qs/QSTile$State;)V
.locals 0

.prologue
.line 83
invoke-direct {p0}, Lcom/android/systemui/qs/QSPanel;->refreshAllTiles()V

return-void
.end method

then find .method public refreshAllTiles()V

next part guys please watch your variables associated with it may be different.

change locals from 3 to 7

.local v1, "r":Lcom/android/systemui/qs/QSPanel$TileRecord;

iget-object v2, v1, Lcom/android/systemui/qs/QSPanel$TileRecord;->tile:Lcom/android/systemui/qs/QSTile;

invoke-virtual {v2}, Lcom/android/systemui/qs/QSTile;->refreshState()V

under this please add

iget-object v3, v1, Lcom/android/systemui/qs/QSPanel$TileRecord;->tile:Lcom/android/systemui/qs/QSTile;

invoke-virtual {v3}, Lcom/android/systemui/qs/QSTile;->getState()Lcom/android/systemui/qs/QSTile$State;

move-result-object v3

iget-object v4, v1, Lcom/android/systemui/qs/QSPanel$TileRecord;->tileView:Lcom/android/systemui/qs/QSTileView;

invoke-virtual {v4, v3}, Lcom/android/systemui/qs/QSTileView;->handleStateChanged(Lcom/android/systemui/qs/QSTile$State;)V

invoke-virtual {v4}, Lcom/android/systemui/qs/QSTileView;->set_toggles()V

Rom Control

add

<com.wubydax.romcontrol.prefs.ColorPickerPreference android:title="Toggle Circle Color" android:key="toggle_buttons_background_color" android:summary="Choose the color to toggle style Stock" />

ok so for more features toggle backround icon change try this

Add To RC

<com.wubydax.romcontrol.prefs.MyListPreference android:entries="@array/toggle_buttons_background_entries" android:title="Toggle buttons background" android:key="toggle_buttons_background" android:summary="%s" android:entryValues="@array/toggle_buttons_background_values" />

ARRAYS Add

<string-array name="toggle_buttons_background_entries">
<item>Default</item>
<item>Convex</item>
<item>Concave</item>
<item>Glass</item>
<item>Convex square</item>
<item>Concave square</item>
<item>Glass square</item>
</string-array>
<string-array name="toggle_buttons_background_values">
<item>0</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
</string-array>

Done Enjoy