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

Search This thread

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
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 :D
 
Last edited:

Gilg@mesh

Senior Member
Jan 15, 2009
2,664
702
Stockholm
Oh, really?

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

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? :D
 
Last edited:

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
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.
 

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
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? :D

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>
 

Gilg@mesh

Senior Member
Jan 15, 2009
2,664
702
Stockholm
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 :D

thanks!
 

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
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 :D

thanks!

lol - the problem is the testing... I don't have my density set like that so couldn't test and the changes are very fine-grained which means there would be lots and lots of testing...

It's not hard to change but you need to first understand adb, apktool, framework-res and layout.xml stuff... it's all on the forums though!

If you get up and running with adb and apktool (http://code.google.com/p/android-apktool/ & http://xdaforums.com/showthread.php?t=640592) - verified and tested - then I'll show you where to start making changes.
 

Gilg@mesh

Senior Member
Jan 15, 2009
2,664
702
Stockholm
lol - the problem is the testing... I don't have my density set like that so couldn't test and the changes are very fine-grained which means there would be lots and lots of testing...

It's not hard to change but you need to first understand adb, apktool, framework-res and layout.xml stuff... it's all on the forums though!

If you get up and running with adb and apktool (http://code.google.com/p/android-apktool/ & http://xdaforums.com/showthread.php?t=640592) - verified and tested - then I'll show you where to start making changes.

ok, I already have adb, I downloaded apktool and copied the files to the Windows directory, now what? :D
 

Korumera

Senior Member
Mar 8, 2011
1,124
1,781
RockCity
www.xdafileserver.nl
This patch isn't working anymore after the FR4 release. I tried it and it kept rebooting my phone, after installing FR4 without this patch it works like a charm. Is it possible you update it so that it works agan? :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    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 :D
    1
    This patch isn't working anymore after the FR4 release. I tried it and it kept rebooting my phone, after installing FR4 without this patch it works like a charm. Is it possible you update it so that it works agan? :)

    Yep, got that, updated first post with a warning. It's because of the key change.

    I'll update the mod shortly.
    1
    MoDaCo R4 Support

    Updated for r4 guys, see first post and download the appropriate version.
    1
    i cant donwload why?

    Try again, I can get it.
    1
    yeh i tried that already, but the result is the same,
    i basiclly select the project,
    a. i tried to decomplie with option 9 and 10 the results are the same
    b. then i compile with option 11

    i also tried to zipaling the files still the same.
    attached below is the versions, are they o.k?

    About
    -----
    Apk Manager v4.9
    ApkTool v1.3.2
    7za v4.6.5
    Roptipng v0.6.3
    Sox v14.3.1
    Android Asset Packaging Tool v0.2

    Thanks in advance

    You need to change your version of apktool - either down to 1.3.1 or up to 1.4.x

    1.3.2 is broken.