yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S 5 Unified Development] remuntada78:
yes i have toggle color but it work in a strange way for me, i explain to you :i have also toggles style with 2 style(stock and lg g3 style), and when i change toggles icon color i need to change toggles style too to see the different color for icon, it's strange because toggles style work with QSPanel.smali:confused:
[Samsung Galaxy S 5 Unified Development] est_yasser:
Thank you for your awesome guide !

but I'm stuck at two points..

1. how to add an observer for PhoneStatusBarPolicy.smali ?

2. How to invoke an original <(f.e) PhoneStatusBar> method under method public onChange of SettingsObserver smali?

Cuz whenever I try to do that I get SystemUI FC and the logcat always says

[SIZE="2"]java.lang.IncompatibleClassChangeError: [B][COLOR="Red"][SIZE="4"]The method[/SIZE][/COLOR][/B] 'void com.android.systemui.statusbar.phone.PhoneStatusBar.updateNotificationShade()' [B][COLOR="red"][SIZE="4"]was expected to be of type virtual but instead was found to be of type direct[/SIZE][/COLOR][/B] (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
at com.android.systemui.statusbar.phone.PhoneStatusBar$SettingsObserver.onChange(PhoneStatusBar.java)[/SIZE]
[Samsung Galaxy S 5 Unified Development] tdunham:
I run into this sometimes so this question is very useful.

You can only run invoke-virtual from the settingsobserver so if the method you are trying to invoke is expecting invoke-direct, it has to done a little differently.

So for instance, see this example.

How to invoke a direct method from settingsobserver in the parent smali:

Add a new method to the parent smali that can be 'invoked' from the settingsobserver:

.method updateToggles()V
.locals 0

[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->updateTextResources()V
[/COLOR]
## ^^^ Your invoke-direct goes here.

return-void
.end method

And in settingsobserver for onchange method:

invoke-virtual {v0}, Lcom/android/keyguard/sec/SecKeyguardStatusView;->updateToggles()V
[Samsung Galaxy S 5 Unified Development] tdunham:
For your other issue about phonestatusbarpolicy.smali, I haven't figured out to add a settingsobserver here because these methods are missing and seem necessary to add settingsobserver:

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

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

If there is an alternate way, I would love to find it but for now I leave that smali as needing a SystemUI reset for the icon toggles.
[Samsung Galaxy S 5 Unified Development] tdunham:
[MENTION=5292754]remuntada78[/MENTION]

Have you found an alternate method for settingsobserver yet if those methods are missing?
[Samsung Galaxy S 5 Unified Development] est_yasser:
to be honest, I didn't understand well..

but I'm sure I will understand it later when I learn more about smali in this guid

anyways I'm working on this guide by you it would be appreciated if you told me how to create a method for it to invoke it virtual from settingsobserver.

but it's okay if not, I'm planning to learn smali from the guide above after the first release of the rom I'm cooking..

take care :)

---------- Post added at 04:38 PM ---------- Previous post was at 04:28 PM ----------

for this one I've actually tried it under this method

.method public constructor <init>(Landroid/content/Context;Lcom/android/systemui/statusbar/policy/CastController;)V

but the problem was it seems like some of these lines

new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy$SettingsObserver;

[B]new-instance v2, Landroid/os/Handler;

invoke-direct {v2}, Landroid/os/Handler;-><init>()V[/B]

invoke-direct {v1, p0, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy$SettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;Landroid/os/Handler;)V

invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy$SettingsObserver;->observe()V

are declared in another place of the smali, specially the bloded ones

didn't spent much effort on how to resolve it, but will do later, maybe tomorrow

Good luck :good:
[Samsung Galaxy S 5 Unified Development] tdunham:
I've tried adding settingsobserver to just the

.method public constructor <init>(Landroid/content/Context;Lcom/android/systemui/statusbar/policy/CastController;)V

But the problem lies in that it only runs once for when UI is reset in the public constructor I think so that is why I was looking for an alternative method to get around the missing method for attributeset like I suggested in the previous post.
[Samsung Galaxy S 5 Unified Development] remuntada78:
when i was on jellybean with a s2 i tried with .method protected onAttachedToWindow()V and it worked, but some files have that method other not
[Samsung Galaxy S 5 Unified Development] renzetti.s:
Thanks for this 3d and for the discussion too

At the end I was able to let setting observer work for my mod. What I can share to you is that on the guide isn't mention the part about flag. In the examples posted all the files have flag 4 but in my case work with 0 .

Can someone explain for what is it and how to know right set?
[Samsung Galaxy S 5 Unified Development] kin201303:
Deleted

Wrong thread. Sorry
[Samsung Galaxy S 5 Unified Development] @DSttr:
Nice broo keep it up
[Samsung Galaxy S 5 Unified Development] remuntada78:
in your .method public onChange(Z)V on NetworkControllerImpl$SettingsObserver you can't call a method that return an integer(you could, but not in this form or in this case)

invoke-virtual {v0}, Lcom/android/systemui/statusbar/policy/NetworkControllerImpl;->GetSignalStyle()[COLOR="Red"]I[/COLOR]

you need to call a method that return a void, so try to call updateStatusBarNetworkSettings()V
[Samsung Galaxy S 5 Unified Development] sieuan:
I tried with updateStatusBarNetworkSettings()V as your guide but i got systemUI FC when change "on the fly"

Here is logcat:

E/AndroidRuntime(25122): FATAL EXCEPTION: main

E/AndroidRuntime(25122): Process: com.android.systemui, PID: 25122

E/AndroidRuntime(25122): java.lang.IncompatibleClassChangeError: The method 'void com.android.systemui.statusbar.policy.NetworkControllerImpl.updateStatusBarNetworkSettings()' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)

E/AndroidRuntime(25122):	at com.android.systemui.statusbar.policy.NetworkControllerImpl$SettingsObserver.onChange(NetworkControllerImpl.java)

E/AndroidRuntime(25122):	at android.database.ContentObserver.onChange(ContentObserver.java:130)

E/AndroidRuntime(25122):	at android.database.ContentObserver.onChange(ContentObserver.java:145)

E/AndroidRuntime(25122):	at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:216)

E/AndroidRuntime(25122):	at android.os.Handler.handleCallback(Handler.java:739)

E/AndroidRuntime(25122):	at android.os.Handler.dispatchMessage(Handler.java:95)

E/AndroidRuntime(25122):	at android.os.Looper.loop(Looper.java:145)

E/AndroidRuntime(25122):	at android.app.ActivityThread.main(ActivityThread.java:5942)

E/AndroidRuntime(25122):	at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime(25122):	at java.lang.reflect.Method.invoke(Method.java:372)

E/AndroidRuntime(25122):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)

E/AndroidRuntime(25122):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
[Samsung Galaxy S 5 Unified Development] remuntada78:
ok sorry, updateStatusBarNetworkSettings()V was a direct method not a virtual ,try to change in

[COLOR="Red"]invoke-direct[/COLOR]{v0}, Lcom/android/systemui/statusbar/policy/NetworkControllerImpl;->updateStatusBarNetworkSettings()V
[Samsung Galaxy S 5 Unified Development] sieuan:
Ok, will try when go to home and report you later. Thanks mate! [emoji3]
[Samsung Galaxy S 5 Unified Development] sieuan:
Tried and stiil got FC when change "on the fly" mate :(

Here is log:

E/AndroidRuntime(11174): FATAL EXCEPTION: main

E/AndroidRuntime(11174): Process: com.android.systemui, PID: 11174

E/AndroidRuntime(11174): java.lang.IllegalAccessError: Method 'void com.android.systemui.statusbar.policy.NetworkControllerImpl.updateStatusBarNetworkSettings()' is inaccessible to class 'com.android.systemui.statusbar.policy.NetworkControllerImpl$SettingsObserver' (declaration of 'com.android.systemui.statusbar.policy.NetworkControllerImpl$SettingsObserver' appears in /system/priv-app/SystemUI/SystemUI.apk)

E/AndroidRuntime(11174):	at com.android.systemui.statusbar.policy.NetworkControllerImpl$SettingsObserver.onChange(NetworkControllerImpl.java)

E/AndroidRuntime(11174):	at android.database.ContentObserver.onChange(ContentObserver.java:130)

E/AndroidRuntime(11174):	at android.database.ContentObserver.onChange(ContentObserver.java:145)

E/AndroidRuntime(11174):	at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:216)

E/AndroidRuntime(11174):	at android.os.Handler.handleCallback(Handler.java:739)

E/AndroidRuntime(11174):	at android.os.Handler.dispatchMessage(Handler.java:95)

E/AndroidRuntime(11174):	at android.os.Looper.loop(Looper.java:145)

E/AndroidRuntime(11174):	at android.app.ActivityThread.main(ActivityThread.java:5942)

E/AndroidRuntime(11174):	at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime(11174):	at java.lang.reflect.Method.invoke(Method.java:372)

E/AndroidRuntime(11174):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)

E/AndroidRuntime(11174):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

V/ApplicationPolicy( 3056): isApplicationStateBlocked userId 0 pkgname com.android.systemui

W/ActivityManager( 3056): Process com.android.systemui has crashed too many times: killing!
[Samsung Galaxy S 5 Unified Development] thereassaad:
[MENTION=5198767]ikrom[/MENTION] thanks mate for this ,

Can u take a look what i did wrong here

Here my log

I: Using Apktool 2.1.1-dirty

I: Smaling smali folder into classes.dex...

..\_WorkArea1\_working\SystemUIMi.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali[23,2] no viable alternative at input 'Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;'

Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/android/systemui/statusbar/phone/PhoneStatusBar.smali

at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:67)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:51)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)

at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:364)

at brut.androlib.Androlib.buildSources(Androlib.java:295)

at brut.androlib.Androlib.build(Androlib.java:278)

at brut.androlib.Androlib.build(Androlib.java:254)

at brut.apktool.Main.cmdBuild(Main.java:224)

at brut.apktool.Main.main(Main.java:84)
[Samsung Galaxy S 5 Unified Development] tdunham:
Here, try my way to add the observer call from PhoneWindowStatusbar.smali.

I haven't had time yet to review the other method [MENTION=5198767]ikrom[/MENTION] posted.

There are probably several spots the routine can be added. This is just where I placed mine.

It's good to have choices. Whatever works... :)

I think this is the only part that matters for observer besides the line that gets added under annotations for memberclasses at the very beginning. I think those are the only two changes to get it working.

To find this, search for setMobileDataController there is only one in the whole smali I think

iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNetworkController:Lcom/android/systemui/statusbar/policy/NetworkControllerImpl;

invoke-virtual {v5}, Lcom/android/systemui/statusbar/policy/NetworkControllerImpl;->getMobileDataController()Lcom/android/systemui/statusbar/policy/NetworkController$MobileDataController;

move-result-object v5

invoke-virtual {v4, v5}, Lcom/android/systemui/statusbar/phone/DataUsageView;->[COLOR="Red"]setMobileDataController[/COLOR](Lcom/android/systemui/statusbar/policy/NetworkController$MobileDataController;)V

:cond_15
## add settingsobserver call here

[COLOR="Blue"] new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;

new-instance v3, Landroid/os/Handler;

invoke-direct {v3}, Landroid/os/Handler;-><init>()V

invoke-direct {v2, v0, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V

invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->observe()V

[/COLOR] move-object/from16 v0, p0

iget-object v4, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

return-object v4

:cond_16
const-string v4, "KTT"
[Samsung Galaxy S 5 Unified Development] tdunham:
Oh, now that I look, I think might have forgotten the comma in the annotations line right above the new one for settingsobser.
[Samsung Galaxy S 5 Unified Development] thereassaad:
I add the comma like this & its solved recompiling

Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;,

Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;

Thank u td ,,
[Samsung Galaxy S 5 Unified Development] stangdriver44:
I haven't tried ikrom's method to add the observer so I can't say anything about it.

But I can confirm [MENTION=1042140]tdunham[/MENTION] your placement of the observer lines are working perfectly for my TMO S6 running 6.0.1.

Now the fun begins!!! On-the-fly controlled mods are the best.

I am working on adding some observers to a few other files that are working mods for me but need systemui restart to work. I have a good idea what's needed. When I get them working I'll post some news.

TMO finally graced us with the MM update and I started my build 2 days ago! Great fun let me tell you!!!

I think this MM base has some major potential though.

Also, I'm going to have to go back to my original systemui, but has ticker been removed or did I loose it somehow by mistake?

I don't have any reference to ticker smali in my xml and no smali files in my folders either?

I'm going back now to check my original apk.

Also THANK YOU you all who have been updating guides for MM. Much appreciated for sure.
[Samsung Galaxy S 5 Unified Development] tdunham:
Unfortunately, quite a bit was removed.

Statusbar Ticker -- > GONE

Lockscreen Weather -- > GONE

- just about everything LS related has been removed including Album Art too

Those are the two most obvious for me, probably more I've already forgotten about and accepted... :rolleyes:
[Samsung Galaxy S 5 Unified Development] stangdriver44:
OK, well I'm glad I'm not going crazy and also that I didn't mess something during my mod edits.

I wonder if we can add it back. I'll will try a few things and see.

I actually liked the ticker info for my music tracks, text msgs and what not.

Do you are anyone that's on MM running V4A have a fix for the convolver's not playing because or MM new file directory (storage/emulated/legacy/) that V4A is looking for?
[Samsung Galaxy S 5 Unified Development] micky387:
Hi.

I want to know if it's possible to add settingsobserver for all smali or not ??

I try to add for a.smali in SecContact* but always the same issue

thanks.Regards
[Samsung Galaxy S 5 Unified Development] tdunham:
I see I tried to do one for that smali but I couldn't tell you if it worked. It was several versions of android ago I think.
[Samsung Galaxy S 5 Unified Development] bunnys7679:
Search for either one of these methods:

Code:

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

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

I find none of these both lines

Bräuchte because sometimes help
[Samsung Galaxy S 5 Unified Development] nguyentankiet:
How to add QSPanel$SettingsObserver?
[Samsung Galaxy S 5 Unified Development] ikrom:
read the op by [MENTION=1042140]tdunham[/MENTION], attached a file archive and read this post http://xdaforums.com/showpost.php?p=63070135&postcount=60
[Samsung Galaxy S 5 Unified Development] Dong_RSC:
Hi, How to add a SettingsObserver to android nougat?

Thank.
[Xperia Z1 Compact Q&A, Help & Troubleshooting] Giro54:
I recently got my amami (D5503) a week ago and really enjoying it :laugh: (except for the heating issue). I also updated it to Lollipop (14.5.A.0.242) last week. As of now, I want to unlock the bootloader (to satisfy my flashing needs) and I need to back up the DRM keys and the TA first. My problem is that I haven't successfully rooted my amami yet. I have already used Easy Root Tool, DooMLoRD's Easy Rooting Toolkit, and Flashtool. I regret updating this phone to Lollipop :(. Rooting it (to back up those DRM keys and TA) would have been easier if it still was on Jellybean.

What should I do now? :confused:

(A) Wait for somebody to successfully root the firmware and hope that they will post it...

(B) I missed out a thread that already fixed my problem... (If your answer is B, please provide a link.)

(C) You'll reply a helpful suggestion to me...

I would really appreciate useful suggestions. Good day!
[Xperia Z1 Compact Q&A, Help & Troubleshooting] konsi:
Hey, maybe you saw that I had a similar issue, which I described here:

http://xdaforums.com/sony-xperia-z1-compact/help/recovery-root-xposed-270-t3138956

Since you dont have and are unable to do a nandroid backup, you should use some backup app from the play store for your contacts, messages etc. Afterwards, if you follow the steps i took, you get a rooted 4.4 kitkat with recovery. Then you take some prerooted lollipop zip, like the one from this thread (maybe check localization, I'm from germany so i supposed that was the right one for me):

http://xdaforums.com/sony-xperia-z1-compact/general/stock-14-5-0-270-customized-t3115946

and flash it over kitkat. Restore your stuff and your done.

Hope, I could help! ;)
[G2 Q&A, Help & Troubleshooting] rawiswar2001:
I am having charging issue with my LG G2..... whenever i plug in my charger i can hear charging notification sound but it does not charge at all... Please tell me how i can fix this problem....
[General Questions and Answers] ratty1394-1:
I had this problem with my Motorola Atrix HD and looked for a solution online but there is so little information about this error.

In any case I was going out of my mind trying to solve this even tough the SIM card was new, the phone unlocked but I finally got it right.

Solution might not apply to everyone having this error message but it is something. On a closer look at the SIM card slot (for those familiar with the Atrix HD) witch is quite hard to see, I found that one of the SIM card reading pins (1 of 3) was pushed in a bit too far so I had to use a needle to straighten it out, after that no more error message, so think always about hardware problems as well. Cheers for those trying to get it right !
[HTC One Mini 2] Txjacob:
Does anyone have the stock rom for the HTC One Remix? I'm trying to install the OTA, but having trouble.
[8525, TyTN, MDA Vario II, JasJam ROM Development] BrigateGB:
Hi Guys, i have a question...

If i flash my WM5 TyTN (Ita) to a WM6 English Version how can i do to have a right KeyBoard layout?

Thx
[8525, TyTN, MDA Vario II, JasJam ROM Development] mzahiri:
dont worry about the keyboard layout too much. just READ the forums and you will see that there are keyboard fixes for all of the known layout issues. some like the ROMs from Custel even allow you to change the layout through a built in application in the setting.
[8525, TyTN, MDA Vario II, JasJam ROM Development] BrigateGB:
well thx for the answer... I search and i found not so much just: http://xdaforums.com/showthread.php?t=313814&highlight=keyboard+layout+fix

Is it the right way or does exist a .cab file?
[8525, TyTN, MDA Vario II, JasJam ROM Development] spastico:
Just install Shadowmites HTCustom1.5

It allows you to choose different kb layouts.

http://xdaforums.com/showthread.php?p=1271619

It does sound like you need to do some more reading though.
[8525, TyTN, MDA Vario II, JasJam ROM Development] BrigateGB:
well there is always something to learn

Thx a Lot
[8525, TyTN, MDA Vario II, JasJam ROM Development] BrigateGB:
Well on this file you told me to download there are a lot of intrestin language but NO ITALIAN :(
[8525, TyTN, MDA Vario II, JasJam ROM Development] spastico:
I'm sorry :oops

I 'll see if I can find something.
[8525, TyTN, MDA Vario II, JasJam ROM Development] spastico:
Will this help:

http://wiki.xda-developers.com/index.php?pagename=Hermes_Registry

Under the Heading:

"Restore local language support for sliding keyboard after upgrade to a different language ROM"
[8525, TyTN, MDA Vario II, JasJam ROM Development] takaki:
a program called "HTCustom" would help
[8525, TyTN, MDA Vario II, JasJam ROM Development] spastico:
I guess not.

See the posts above. :)
[8525, TyTN, MDA Vario II, JasJam ROM Development] BrigateGB:
Well at the end i lear to READ and i discover this:

http://xdaforums.com/showthread.php?t=297763
[8525, TyTN, MDA Vario II, JasJam ROM Development] massimo729:
Italian layout

Does the Skizzo's cab work for you?

I installed it and now the spellchecker and the dictionary are in italian but the keyboard layout is still without the èòàù etc etc.

Wha cab did you use?

thanks M
[8525, TyTN, MDA Vario II, JasJam ROM Development] BrigateGB:
yes for it was working great....

have you try to install other italian input .cab files?
[8525, TyTN, MDA Vario II, JasJam ROM Development] massimo729:
No, just the one called : Italian Settings.cab on the first post of Skizzo's thread.
[8525, TyTN, MDA Vario II, JasJam ROM Development] BrigateGB:
well yesterday and today i try 3 different ROM WWE and in all 3 i use that file for re-map the keyboard layout and all work great...every 3 times...

Bytheway what kind of TyTN are you using? I use a NO Brand Italian one...
[Nexus 4 Q&A, Help & Troubleshooting] theplagueisback:
I tried stock Android 4.2, 4.3, 4.4, 5.1, several CM versions and even Ubuntu but the clock still gets late after a few hours.

It will only fix itself when I reboot the phone.
[Huawei Ascend P7] QA Bot:
Q&A for b615 unlocked boot.img

Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.

Before posting, please use the forum search and read through the discussion thread for b615 unlocked boot.img. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.

Thanks for understanding and for helping to keep XDA neat and tidy! :)
[Huawei Ascend P7] maurolm:
Cannot connect P7 to HiSuite in fastboot mode

Hi there folks , having the same problem as described by Islamabad:

I booted into fastboot but adb cant find my device and when I open pc hisuite it wont show connection with device , just keep searching indefinitly for drivers, so I cant flash any image in this way . For whatever reason the phone now is in a bootloop, but before that I was able to connect ok to Hisuite. Any help on how to have hisuite recognize the phone in fastboot/rescue mode is appreciated!

tks&rgds, Mauro
[Sony Smartwatch 3] tuffluck:
after the first charge my rubber cover for the battery looks bent. i guess i pried it out and to the left instead of backwards towards the strap and that's how this happened. i have big fingers and it wasn't easy for me to pry it open at all. i tried to bend it back the other direction and it almost sits flush now. it doesn't appear the seal around the actual micro-usb port is damaged, just the outer rim standing up you see. wondering if this is normal, and if it will have any negative effects when it comes to waterproofing.
[Sony Smartwatch 3] onatepp:
Yes...exactly the same.