[Guides & Links] TOUCHWIZ UNIFIED MODS THREAD

Search This thread

remuntada78

Senior Member
Jun 2, 2013
903
964
I have not changed png, I added the mod in smali PhoneStatusBar.smali: .method setHeaderBgColor()V

but that background is not header , is qspanel background
a.jpg
for more suggestions we need more information
 

aceqott

Senior Member
Mar 6, 2013
266
252
CA
but that background is not header , is qspanel background
View attachment 3408487
for more suggestions we need more information

Yes, sorry, here referred to the method:
Code:
.method setToggleBgColor()V
    .locals 4

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

    const v1, 0x7f0d01b3

    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, "toggle_bg_color"

    const v1, -0xff5a3b

    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/view/View;->setBackgroundColor(I)V

    return-void
.end method
 

remuntada78

Senior Member
Jun 2, 2013
903
964
Yes, sorry, here referred to the method:
Code:
.method setToggleBgColor()V
    .locals 4

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

    const v1, 0x7f0d01b3

    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, "toggle_bg_color"

    const v1, -0xff5a3b

    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/view/View;->setBackgroundColor(I)V

    return-void
.end method

0x7f0d01b3 , this id to what is referred in your public.xml? have you added the call af the method in the PhoneStatusBar.smali and in PhoneStatusBar$SettingsObserver.smali?
 

aceqott

Senior Member
Mar 6, 2013
266
252
CA
0x7f0d01b3 , this id to what is referred in your public.xml? have you added the call af the method in the PhoneStatusBar.smali and in PhoneStatusBar$SettingsObserver.smali?

Yes, in my public.xml it corresponds to: # <public type="id" name="quick_settings_panel"

PhoneStatusBar.smali:
Code:
    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$EasyModeEnableObserver;->onChange(Z)V

    .line 1193
    move-object/from16 v0, p0

    [COLOR="Blue"]invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setToggleBgColor()V[/COLOR]

     iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

     const v4, 0x7f0d01b1

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/FrameLayout;

PhoneStatusBar$SettingsObserver.smali:
Code:
.method observe()V
    .locals 3
.....
    [COLOR="blue"]const-string v1, "toggle_bg_color"

    invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v0, v1, v2, p0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V[/COLOR]

Code:
.method public onChange(Z)V
    .locals 1
......
   [COLOR="Blue"]iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setToggleBgColor()V[/COLOR]
 

daxgirl

Senior Member
Jun 30, 2012
4,047
9,175
Jerusalem
I have not changed png, I added the mod in smali PhoneStatusBar.smali: .method setHeaderBgColor()V
You did something to screw it up. Retrace your steps and find what and when. No one can know other than you WHAT YOU DID. Try starting over from stock systemui and redo all your steps one by one. One of them screwed up your bg

Sent from my awesome g920f powered by 6thGear
 

remuntada78

Senior Member
Jun 2, 2013
903
964
Yes, in my public.xml it corresponds to: # <public type="id" name="quick_settings_panel"
your code looks good for me, in your place I would put the method call like this
Code:
move-object/from16 v0, p0

    iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v4, 0x7f0d01b3

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Lcom/android/systemui/qs/QSPanel;

    move-object/from16 v0, p0

    iput-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mQSPanel:Lcom/android/systemui/qs/QSPanel;
[COLOR="Red"]
    move-object/from16 v0, p0

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setToggleBgColor()V[/COLOR]
but your way is good too
 

aceqott

Senior Member
Mar 6, 2013
266
252
CA
You did something to screw it up. Retrace your steps and find what and when. No one can know other than you WHAT YOU DID. Try starting over from stock systemui and redo all your steps one by one. One of them screwed up your bg

Sent from my awesome g920f powered by 6thGear

I appreciate your help as always ...

But the problem is not in the mod, this works perfectly and makes the change in real time.
The problem is that lateral line, not on the way to the mod.

your code looks good for me, in your place I would put the method call like this
but your way is good too

Ok, thanks for your kindness always @ remuntada78

---------- Post added at 08:32 PM ---------- Previous post was at 08:25 PM ----------

I have already given the failure is due to colors.xml line: <color name = "notification_header_bg_tw">
 

daxgirl

Senior Member
Jun 30, 2012
4,047
9,175
Jerusalem
I appreciate your help as always ...

But the problem is not in the mod, this works perfectly and makes the change in real time.
The problem is that lateral line, not on the way to the mod.



Ok, thanks for your kindness always @ remuntada78

---------- Post added at 08:32 PM ---------- Previous post was at 08:25 PM ----------

I have already given the failure is due to colors.xml line: <color name = "notification_header_bg_tw">
Something you did made it that way. That's why I said: retrace your steps. Find where you screwed up.

Sent from my awesome g920f powered by 6thGear
 

aceqott

Senior Member
Mar 6, 2013
266
252
CA
Good again, I feel the discomfort.

I have been these peleándome days with a mod that I can not solve.

To change the background brightness bar, I get that change in the system, but not the screen lock and appears transparent.

The mod in .smali not see well and I repitado steps several times, but I think I need something to change in .layout ...
 

Attachments

  • Screenshot_2015-07-18-14-18-00.jpg
    Screenshot_2015-07-18-14-18-00.jpg
    167.4 KB · Views: 341
  • Screenshot_2015-07-18-14-15-22.png
    Screenshot_2015-07-18-14-15-22.png
    250.8 KB · Views: 333

evilvoice

Senior Member
May 4, 2008
923
569
Conyers GA
@ikrom
From the original post:
[Guide] Extended Weather on the LockScreen

As I'm doing more work with this mod, I noticed the colorizer for the current location is missing from your customsettings toggles list (I think someone asked about this too). The code is already there, just needed to add the line to customsettings. Would you mind updating the guide for customsettings part of this to reflect the missing colorizer? :)

I didn't bother adding a string and this is my line:
Code:
<com.ficeto.colorpicker.ColorPickerPreference android:title="Lockscreen current location text color" android:key="lockscreen_city_weather_text_color" android:summary="Choose color" android:defaultValue="0xffffffff" alphaSlider="true" />

I already had this (3rd line in the preferences edit)
Code:
            <com.ficeto.colorpicker.ColorPickerPreference android:title="@string/lockscreen_city_weather_text_color_title" android:key="lockscreen_city_weather_text_color" android:summary="@string/lockscreen_city_weather_text_color_summary" android:defaultValue="0xffffffff" alphaSlider="true" />
 
  • Like
Reactions: ikrom

OvrDriVE

Senior Member
Sep 8, 2012
3,750
11,769
Fresno
@ikrom
From the original post:
[Guide] Extended Weather on the LockScreen

As I'm doing more work with this mod, I noticed the colorizer for the current location is missing from your customsettings toggles list (I think someone asked about this too). The code is already there, just needed to add the line to customsettings. Would you mind updating the guide for customsettings part of this to reflect the missing colorizer? :)

I didn't bother adding a string and this is my line:
Code:
<com.ficeto.colorpicker.ColorPickerPreference android:title="Lockscreen current location text color" android:key="lockscreen_city_weather_text_color" android:summary="Choose color" android:defaultValue="0xffffffff" alphaSlider="true" />

isn't that already there @tdunhbam?

Code:
<com.ficeto.colorpicker.ColorPickerPreference android:title="@string/lockscreen_city_weather_text_color_title" android:key="lockscreen_city_weather_text_color" android:summary="@string/lockscreen_city_weather_text_color_summary" android:defaultValue="0xffffffff" alphaSlider="true" />
 
  • Like
Reactions: rompnit and ikrom

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay

I already had this (3rd line in the preferences edit)
Code:
            <com.ficeto.colorpicker.ColorPickerPreference android:title="@string/lockscreen_city_weather_text_color_title" android:key="lockscreen_city_weather_text_color" android:summary="@string/lockscreen_city_weather_text_color_summary" android:defaultValue="0xffffffff" alphaSlider="true" />

isn't that already there @tdunhbam?

Code:
<com.ficeto.colorpicker.ColorPickerPreference android:title="@string/lockscreen_city_weather_text_color_title" android:key="lockscreen_city_weather_text_color" android:summary="@string/lockscreen_city_weather_text_color_summary" android:defaultValue="0xffffffff" alphaSlider="true" />
Thanks another blonde moment :rolleyes:. Request deleted.
I must've missed it since it wasn't grouped in with the sunrise/sunset stuff.
 

ikrom

Senior Member
Mar 31, 2013
302
1,321
Namangan
Unlock items in the volume panel
All credits to @sagitt67

Edit SystemUI.apk
SystemUI\smali\com\android\systemui\volume\VolumePanel$StreamResources.smali
Code:
[COLOR="DarkGreen"]
[B][I]search methods[/I][/B][/COLOR]
# direct methods
[B].method static constructor <clinit>()V[/B]
 .locals 15

 const/4 v14, 0x3

 const/4 v13, 0x2

 const v12, 0x1080a5a

 const/4 [COLOR="Blue"]v11[/COLOR], 0x1[B] # for information[/B] [B][COLOR="Blue"]on[/COLOR][/B].

 const/4 [COLOR="Red"]v2[/COLOR], 0x0 [B]# for information[/B] [B][COLOR="Red"]off[/COLOR][/B].

[COLOR="DarkGreen"]
[I]search for further...[/I][/COLOR]

const-string v1, "BluetoothSCOStream"

 const/4 v3, 0x6

 const v4, 0x10404ac

 const v5, 0x1080a52

 const v6, 0x1080a52

 [B]move v7, [COLOR="red"]v2[/COLOR]   # [COLOR="Green"]change[/COLOR] [COLOR="Blue"]v11[/COLOR][/B]

[COLOR="DarkGreen"]
[I]search for further...[/I][/COLOR]

const-string v4, "VoiceStream"

 const v7, 0x10404ae

 move v5, v13

 move v6, v2

 move v8, v12

 move v9, v12
[B]
 move v10,[COLOR="Red"] v2 [/COLOR] # [COLOR="Green"]change[/COLOR] [COLOR="Blue"]v11[/COLOR][/B]

[COLOR="DarkGreen"]
[I]search for further...[/I][/COLOR]

const-string v4, "AlarmStream"

 const/4 v6, 0x4

 const v7, 0x10404a9

 const v8, 0x1080a50

 const v9, 0x7f0200da

 move v5, v14

 [B]move v10,[COLOR="Red"]  v2[/COLOR] # [COLOR="Green"]change[/COLOR] [COLOR="Blue"]v11[/COLOR]
[/B]
 

Attachments

  • Screenshot_2015-07-18-21-07-22.jpg
    Screenshot_2015-07-18-21-07-22.jpg
    176.6 KB · Views: 1,693
  • Screenshot_2015-07-18-21-05-26.jpg
    Screenshot_2015-07-18-21-05-26.jpg
    153 KB · Views: 1,732

BongOfWar

Senior Member
May 28, 2015
192
415
Telford
This is an tutorial about how to set multi notification panel custom background and set his color in real time

Love this mod have applied it to my custom rom TYVM there was just one thing that bugged me though, the fact that it set the background to the Face background when doing a new install so i edited it slightly to change this

Code:
.method setNotificationPanelBackground()V
    .locals 6

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

    invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

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

    move-result-object v1

    const-string v2, "notification_panel_background_images"
	
    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 v3, 0x7f09001f    change this id in according with your system_bar_background_transparent in public.xml

    goto :goto_0

    :cond_0	
    const v3, 0x7f0206eb   change this id in according with yuor face in public.xml

    goto :goto_0

    :cond_1
    const v3, 0x7f0206ec    change this id in according with yuor joy_division in public.xml

    goto :goto_0

    :cond_2
    const v3, 0x7f0206ed     change this id in according with yuor spiral in public.xml

    goto :goto_0

    :cond_3
    const v3, 0x7f0206ee     change this id in according with yuor the_scream in public.xml

    :goto_0
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;

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

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

    move-result-object v4

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

    invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

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

    move-result-object v1

    const-string v2, "notification_panel_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 v5, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

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

    return-void
.end method

CustomSettings changes

Code:
<string-array name="notification_panel_background_images_entries">
	<item>Empty</item>
        <item>Face</item>
        <item>Joy Division</item>
        <item>Spiral</item>
        <item>The Scream</item>
    </string-array>
    <string-array name="notification_panel_background_images_values">
        <item>0</item>
        <item>1</item>
        <item>2</item>
        <item>3</item>
	<item>4</item>
    </string-array>

now on a new install it should select the default system_bar_background_transparent and the phone will look normal until the user actually selects an alternate option
 

Top Liked Posts