So, did it work? Yeah if you have a move already there, you dont really need to keep adding more, unless you were a newbie like me when I started making those roms. But essentially that is the idea, each mod needs to be invoked somehow. Glad I could help out
Yup, you can see the results in the ss
I guess to make it *ahem*, more formal. Here are the steps (and just to clarify, this is NOT MY TUTORIAL, I just took what @thereassaad said in this tutorial and modified it to MM, graceUX in specific):
Decompile SystemUI
Navigate to smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
Under #Virtual Methods, add this (and pay attention to the note in RED):
Code:
.method setNotiSettDoneBottomColor()V
.locals 5
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "eragon_expanded_switch_bg" # rc key switch
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/4 v4, 0x1
if-ne v1, v4, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Red"]0x7f0e0098 ## search for <public type="id" name="block_and_clear_button_background" id="0x7f0e0098" /> in public[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "not_setti_done_bottom_bg" ## rc key color
const v1, -0x171718
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->setBackgroundColor(I)V
:cond_0
return-void
.end method
After that, in the same smali, look for
Search for:
so you will know that you are on right placeCode:"display_battery_percentage"
add blue line and be sure green line also there. if not add it too
Code:const-string v5, "display_battery_percentage" invoke-static {v5}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri; move-result-object v5 const/4 v6, 0x0 move-object/from16 v0, p0 iget-object v8, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver; invoke-virtual {v4, v5, v6, v8}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V .line 1791 move-object/from16 v0, p0 iget-object v4, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver; const/4 v5, 0x0 invoke-virtual {v4, v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;->onChange(Z)V [COLOR="SeaGreen"]move-object/from16 v0, p0[/COLOR] [COLOR="DeepSkyBlue"] invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotiSettDoneBottomColor()V[/COLOR]
Add in ROM control in XML of your choosing
Code:
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Block and Clear bg color Switch" android:key="eragon_expanded_switch_bg" android:defaultValue="false" android:summaryOn="enabled" android:summaryOff="disabled" />
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:title="Block and Clear BG Color" android:key="not_setti_done_bottom_bg" android:dependency="eragon_expanded_switch_bg" android:defaultValue="\#ffffffff" />
Thanks for the help!
As for the observer, I will try to add it later, for now this will be enough for me and my brain that needs its rest lol
It's overly excited that it worked xD
Attachments
Last edited: