Jump to content

[MOD] [LibraGinger] Better screen brightness, Wifi, Bluetooth toggles for Konstat's notification power widget


Guest flshg

Recommended Posts

Made a modification to Konstat's awesome notification power widget to include a better screen brightness toggle. Works in a similar way to the standard power widget cycles : Auto brightness -> min -> 30% -> Max.

Also removed a few icons (sound and vibrate toggles) that I didn't use and rearranged the others to my liking.

Since I'm currently using Libraginger, this mod is for that rom, but might work with MMHMP, maybe others. (Might be best to get KonstaT to resign first).

Please report bugs and compatibility.

As with all mods, make a backup of important data first.

Flash in clockworkmod, then clear dalvik cache under 'advanced' option before rebooting.

*Update* version 5 now has long press on wifi and bluetooth to bring up the relevant settings pages. The page appears 'underneath' the pulldown page (since the status bar goes topmost over activities). Future work might enable auto exit from pulldown page to display the settings pages immediately.

Version 6 has long press options on wifi, data and bluetooth (the other toggles have less useful settings pages). Status bar collapses after a long press (credit to KonstaT).

LibraGingermysystemui6.zip

Edited by flshg
Link to comment
Share on other sites

Guest KonstaT

Exellent job. Thank you very much. :)

Didn't try the actual file (went straight for the smali) and it works as it should. Also this SystemUI.apk should work with M-MHMP if it is signed with test key. Which key did you use?

You know that I'm going to totally nick this for my next release. :P Are you working on something else? I'm thinking of outsourcing this to you. ;) No but seriously, I have some ideas but not so much time to play with this. It would great to have sound/vibrate options under one button and also wlan tethering button should be quite easy to make...

Link to comment
Share on other sites

Exellent job. Thank you very much. :)

Didn't try the actual file (went straight for the smali) and it works as it should. Also this SystemUI.apk should work with M-MHMP if it is signed with test key. Which key did you use?

You know that I'm going to totally nick this for my next release. :P Are you working on something else? I'm thinking of outsourcing this to you. ;) No but seriously, I have some ideas but not so much time to play with this. It would great to have sound/vibrate options under one button and also wlan tethering button should be quite easy to make...

Konstat, I used the CM7 platform key, but feel free to resign it and use the code. I think elitemovils original power widget had the sound and vibrate under one button so it should be a straight copy+paste. I dont have access to wlan tethering so am not likely to attempt work on it. By all means throw some ideas at me and I'll see if I have the patience to tackle more smali hacking.

Link to comment
Share on other sites

Guest KonstaT

Made a quick addition - long press on wifi or bluetooth button to access the relevant settings pages.

Thanks again. :)

I added this feature to all buttons in my version. Only problem I have is with mobile data switch. Can't find anywhere how to link it to correct settings menu. According to this is should be android.settings.DATA_ROAMING_SETTINGS, but that only causes force close. It now points to android.settings.WIRELESS_SETTINGS instead, which isn't exactly right.

I also quickly tried to add method that would automatically collapse (close) statusbar after long press, but couldn't get it to work. :P Will have try that again with better time. Any ideas on this?

Edit. Got the status bar collapse part working. :) Still that one thing with the mobile data switch. I think the right place for that settings would be android.phone.SETTINGS, but I still get a force close...

Edited by KonstaT
Link to comment
Share on other sites

Thanks again. :)

I added this feature to all buttons in my version. Only problem I have is with mobile data switch. Can't find anywhere how to link it to correct settings menu. According to this is should be android.settings.DATA_ROAMING_SETTINGS, but that only causes force close. It now points to android.settings.WIRELESS_SETTINGS instead, which isn't exactly right.

I also quickly tried to add method that would automatically collapse (close) statusbar after long press, but couldn't get it to work. :P Will have try that again with better time. Any ideas on this?

Edit. Got the status bar collapse part working. :) Still that one thing with the mobile data switch. I think the right place for that settings would be android.phone.SETTINGS, but I still get a force close...

The following code seems to be working:




new-instance v0, Landroid/content/Intent;


    const-string v1, "android.intent.action.MAIN"


    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V


    const-string v1, "com.android.phone"


    const-string v2, "com.android.phone.Settings"


    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;


	const/high16 v2, 0x1000


	invoke-virtual {v0, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;


    invoke-virtual {v3, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V



Link to comment
Share on other sites

Guest KonstaT

The following code seems to be working:

Thanks, that was helpful. Needed little modification outside that code, but it works now. :)

My version is actually originally based on elimovil's port, so I think it has that original sound button. It does have resources for all four modes (sound+vib, sound only, vibrate only, silent), but it only works as sound on/off switch. That's why I added the vibrate button and when you use it, you can see that the images change in the sound button according to this.

So, what's next? ;) This has been very inspiring. I think my notification power widget was semi-dead project (not sure when I would have actually came back to it) and now it's again much better with the long press (and collapsing notification bar) function. :)

Link to comment
Share on other sites

Thanks, that was helpful. Needed little modification outside that code, but it works now. :)

My version is actually originally based on elimovil's port, so I think it has that original sound button. It does have resources for all four modes (sound+vib, sound only, vibrate only, silent), but it only works as sound on/off switch. That's why I added the vibrate button and when you use it, you can see that the images change in the sound button according to this.

So, what's next? ;) This has been very inspiring. I think my notification power widget was semi-dead project (not sure when I would have actually came back to it) and now it's again much better with the long press (and collapsing notification bar) function. :)

Nothing planned as yet, will be looking around for anything exciting to hack into our blades. I'm certainly no expert in smali but I'm sure we can find something to collaborate on.

:D maybe you could have a look at this thread ?

Sounds like rather usefull and interesting...

That certainly would be a useful addition but it is definitely out of my league. I think that is more for burstlam, and even then I think it would only be possible with access to source code or in-depth info of the hardware drivers.

Link to comment
Share on other sites

Guest KonstaT

anyone know if this works on FA's blade mix rom ?

and any screenshots please ?

No, it doesn't.

Blade Mix is based on ginger stir fry (even though fallenangel refuses to say what it's based on), which is again based on the leaked gingerbread. You can find my older version (no longer developed) of the notification power widget here. It should work with all of the version the leaked ROM, but it doesn't have all the latest great features of this one. There are also some screenshots to get the idea what it (and also this) looks like.

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

Is there anyone around here who has tried it in burstlam's BladeGinger-Negaraku ROM? Any chance that it would work there?

THX

Cheers!

This should already be ported to the latest version of that rom. V2.4 has this feature AFAIK.

Link to comment
Share on other sites

Guest ZuzMaRa

This should already be ported to the latest version of that rom. V2.4 has this feature AFAIK.

Hi,

Yes, KonstaT's version is ported, but I'm not sure if it includes Ur mods.

Edited by ZuzMaRa
Link to comment
Share on other sites

Hi,

Yes, KonstaT's version is ported, but I'm not sure if it includes Ur mods.

KonstaT's latest version includes all of my mods, as should burstlams negaraku 2.4.

Link to comment
Share on other sites

Guest ZuzMaRa
<br />KonstaT's latest version includes all of my mods, as should burstlams negaraku 2.4.<br />
<br /><br /><br />

Many THX 4 Ur time and patience.

Cheers

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.