5,598,171 Members 44,310 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] Hidden Notification Music Controls ** MoDaCo R4 Support **

Tip us?
 
djmcnz
Old
(Last edited by djmcnz; 31st March 2011 at 12:41 AM.)
#1  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1501
Posts: 5,480
Join Date: Oct 2009
Location: Amsterdam, NL
Angry [MOD] Hidden Notification Music Controls ** MoDaCo R4 Support **

Hi everyone,

Update 31/03: Works with all 2.2.2 ROM's, including the awesome MoDaCo kitchen!

For me the notification controls for the music player are an admirable idea but ultimately useless if you don't prefer the stock music player. It would be ideal if any music player could hook into them but alas, with the current implementation that's not possible.

I found the option to turn these controls off in the Music app to be utterly unreliable. Frequently I would reboot to find the controls visible even though the option was unchecked in the Music app. I also found that if you freeze or remove the Music app the controls become visible again and there is no way to remove them.

So here's the fix:
  • Modified framework
  • Actively hides the controls every boot
  • Music app can be removed, controls remain hidden

All I have done is add the following code to framework-res.apk/res/layout/statusbar_expanded.xml in the music controls section.

Code:
android:visibility="gone"
And, since this didn't work for all users, I've now added the following so even if it wants to show it will be 0% high ~hidden.

Code:
android:layout_height="0dip"
Here an update.zip you can flash using Paul's Clockwork Recovery, please make a backup first.

Only tested on P990 with Android 2.2.2!

DOWNLOAD
Stock LG 2.2.2 ROM or MoDaCo r1, r1, r3 ROMs
Download: O2xNoMusicControls-v2-unsigned.zip (5.4MB)
MD5 Hash: 05090f6d6890f8ba6e1f5145dc46ae9e
OR
MoDaCo r4+ ROMs
Download: O2xNoMusicControls-v2-MCR-unsigned.zip (5.4MB)
MD5 Hash: 7eb25009d8773e47e886577e2b326a1e

Enjoy + Thanks = Win
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
The Following 7 Users Say Thank You to djmcnz For This Useful Post: [ Click to Expand ]
 
DocRambone
Old
#2  
Recognized Developer
Thanks Meter 2614
Posts: 6,349
Join Date: Jan 2010
Location: Stockholm

 
DONATE TO ME
Nice work, but did not make any change for me. Buttons still there if i remove the music.apk
 
Gilg@mesh
Old
#3  
Gilg@mesh's Avatar
Senior Member
Thanks Meter 257
Posts: 1,624
Join Date: Jan 2009
Location: Stockholm
did not work here either :/ really want to get rid of that

www.garaget.org/Gilgamesh

Why don't we cut you up into little pieces and feed you to your pooches? Hmm? And then we'll see how loyal a hungry dog REALLY is
 
djmcnz
Old
#4  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1501
Posts: 5,480
Join Date: Oct 2009
Location: Amsterdam, NL
Quote:
Originally Posted by DocRambone View Post
Nice work, but did not make any change for me. Buttons still there if i remove the music.apk
Quote:
Originally Posted by Gilg@mesh View Post
did not work here either :/ really want to get rid of that
Oh, really?

Well, I'll need to take another look, worked for me...

I'll do that tomorrow, thanks for the heads-up!
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
 
Gilg@mesh
Old
(Last edited by Gilg@mesh; 27th March 2011 at 11:36 PM.)
#5  
Gilg@mesh's Avatar
Senior Member
Thanks Meter 257
Posts: 1,624
Join Date: Jan 2009
Location: Stockholm
Quote:
Originally Posted by djmcnz View Post
Oh, really?

Well, I'll need to take another look, worked for me...

I'll do that tomorrow, thanks for the heads-up!
I had already deleted the music.apk before I tried this, but I tried it anyway but still it was there, then adb pushed the music.apk back and removed it through settings, but when I deleted the music.apk it was there again so adb push back and now it's gone but I keep the music.apk but hide it with Launcher Pro until this works thanks!

btw this has nothing to do with the music control, but the power widget control (wifi, bluetooth etc) I change my LCD density to 190 from 240 because 240 is way to much and looks bad, but the power widget don't fit the screen if you know what I mean (it fits but there is a little emty at the right side, hard to explain but I think you can test it for yourself it you want too), is it possible to fix it? and another thing, I just want wifi, bluetooth icon there (with my Nexus S CM7 I have wifi, bluetooth and flash but there is no flash atm) is it possible to hack it somehow?

www.garaget.org/Gilgamesh

Why don't we cut you up into little pieces and feed you to your pooches? Hmm? And then we'll see how loyal a hungry dog REALLY is
 
djmcnz
Old
#6  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1501
Posts: 5,480
Join Date: Oct 2009
Location: Amsterdam, NL
Well it's interesting, I've tested it again and it does work for me with one exception:

* When I activate the shade in landscape mode the music control comes back.

When this happens, because I have removed the Music app, I can't disable it again... But when I reboot it is gone...

So I need to look into the landscape bug... are you using landscape mode at all?

And yes, I think you can alter the toggle buttons... I'll look at that too.
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
 
MaliciousKen
Old
#7  
Senior Member
Thanks Meter 90
Posts: 121
Join Date: Aug 2007
didn't work for me too. The buttons reappears when I delete the music.apk
 
djmcnz
Old
#8  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1501
Posts: 5,480
Join Date: Oct 2009
Location: Amsterdam, NL
I've updated it guys, details in the first post, let me know how you get on.
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
 
djmcnz
Old
#9  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1501
Posts: 5,480
Join Date: Oct 2009
Location: Amsterdam, NL
Quote:
Originally Posted by Gilg@mesh View Post
btw this has nothing to do with the music control, but the power widget control (wifi, bluetooth etc) I change my LCD density to 190 from 240 because 240 is way to much and looks bad, but the power widget don't fit the screen if you know what I mean (it fits but there is a little emty at the right side, hard to explain but I think you can test it for yourself it you want too), is it possible to fix it? and another thing, I just want wifi, bluetooth icon there (with my Nexus S CM7 I have wifi, bluetooth and flash but there is no flash atm) is it possible to hack it somehow?
Yes, this is all possible:
Code:
<TableRow>
    <ImageView android:layout_gravity="top" android:id="@id/sound_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginLeft="21.0px" android:layout_marginTop="10.0px" android:layout_marginRight="17.0px" android:layout_marginBottom="0.0px" />
    <ImageView android:layout_gravity="top" android:id="@id/wifi_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginTop="10.0px" android:layout_marginRight="17.0px" android:layout_marginBottom="0.0px" />
    <ImageView android:layout_gravity="top" android:id="@id/bt_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginTop="10.0px" android:layout_marginRight="17.0px" android:layout_marginBottom="0.0px" />
    <ImageView android:layout_gravity="top" android:id="@id/gps_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginTop="10.0px" android:layout_marginRight="17.0px" android:layout_marginBottom="0.0px" />
    <ImageView android:layout_gravity="top" android:id="@id/switch_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginTop="10.0px" android:layout_marginRight="21.0px" android:layout_marginBottom="0.0px" />
</TableRow>
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
 
Gilg@mesh
Old
#10  
Gilg@mesh's Avatar
Senior Member
Thanks Meter 257
Posts: 1,624
Join Date: Jan 2009
Location: Stockholm
Quote:
Originally Posted by djmcnz View Post
Yes, this is all possible:
Code:
<TableRow>
    <ImageView android:layout_gravity="top" android:id="@id/sound_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginLeft="21.0px" android:layout_marginTop="10.0px" android:layout_marginRight="17.0px" android:layout_marginBottom="0.0px" />
    <ImageView android:layout_gravity="top" android:id="@id/wifi_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginTop="10.0px" android:layout_marginRight="17.0px" android:layout_marginBottom="0.0px" />
    <ImageView android:layout_gravity="top" android:id="@id/bt_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginTop="10.0px" android:layout_marginRight="17.0px" android:layout_marginBottom="0.0px" />
    <ImageView android:layout_gravity="top" android:id="@id/gps_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginTop="10.0px" android:layout_marginRight="17.0px" android:layout_marginBottom="0.0px" />
    <ImageView android:layout_gravity="top" android:id="@id/switch_button_toggle" android:layout_width="wrap_content" android:layout_height="74.0px" android:layout_marginTop="10.0px" android:layout_marginRight="21.0px" android:layout_marginBottom="0.0px" />
</TableRow>
Great, is it something I can do easy or does it take some "time" (maybe you can make a update.zip file)? as I said, I only need Wifi and Bluetooth (flashlight when it's possible, maybe you can make a flashlight button?) and if would be nice if the buttons fills the screen (make them wider) when using density 190

thanks!

www.garaget.org/Gilgamesh

Why don't we cut you up into little pieces and feed you to your pooches? Hmm? And then we'll see how loyal a hungry dog REALLY is

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes