[Xposed Framework Modules] The_Steph:
thomashofmann,

I faced a bug since for a quite long time now and I just found the reason. Unfortunately, this issue is not purely XMSO related but android.process.media as well.

Now here is my issue and how I solved it.

I, like nicesoni_ash, received android.process.media fc each time I triggered media scanning by XMSO.

In my logcat, I got:

E/AndroidRuntime( 1216): Process: android.process.media, PID: 1216

E/AndroidRuntime( 1216): android.app.RemoteServiceException: Bad notification posted from package com.android.providers.media: Couldn't create icon: StatusBarIcon(pkg=com.android.providers.mediauser=0 id=0x7f02ff01 level=0 visible=true num=0 )

And in Xposed I had:

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Processing volume external, subText null

XMSO: Searching directories to scan in /storage/sdcard0

XMSO: Finished searching directories to scan in /storage/sdcard0. Time: 0:03

XMSO: Searching directories to scan in /storage/sdcard1

XMSO: Finished searching directories to scan in /storage/sdcard1. Time: 0:00

XMSO: Searching directories to scan in /storage/usbdisk

XMSO: Finished searching directories to scan in /storage/usbdisk. Time: 0:00

XMSO: The following directories will be scanned by MediaScanner: [/storage/sdcard1/Musique]

XMSO: Changing thread priority in MediaScanner constructor

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Scanning /storage/sdcard1/Musique, subText null

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Postscan, subText null

XMSO: scan(String[] directories, String volumeName) has finished scanning external

XMSO: createBigTextStyleNotification with title Media Scanner Optimizer, text Scan directories time 0:02, subText Volume external (Expand for details), inboxSummary Volume external

XMSO: stopSelf is called on MediaScannerService

I looked for package com.android.providers.mediauser and there was not a single one in my ROM (Nameless ROM).

I suspected then that the notification was the root of the issue so I disabled Notificaiton in the application settings and restarted the process. This time I got in logcat:

11-28 14:06:17.523 D/XMSO ( 1168): Executing hook MediaScanner#isNoMediaFile called with values /storage/sdcard1/Musique/Temp/Klangkarussell - 2014 - Netzwerk/04 - We Want Your Soul.mp3

11-28 14:06:17.523 D/XMSO ( 1168): Not restricting scan to certain media types

11-28 14:06:17.523 D/XMSO ( 1168): MediaScanner#isNoMediaFile returns with null

11-28 14:06:17.553 D/ExtendedUtils( 223): extended extractor not needed, return default

11-28 14:06:17.553 D/XMSO ( 1168): Executing hook MediaScanner#isNoMediaFile called with values /storage/sdcard1/Musique/Temp/Klangkarussell - 2014 - Netzwerk/06 - Symmetry.mp3

11-28 14:06:17.553 D/XMSO ( 1168): Not restricting scan to certain media types

11-28 14:06:17.553 D/XMSO ( 1168): MediaScanner#isNoMediaFile returns with null

11-28 14:06:17.583 D/ExtendedUtils( 223): extended extractor not needed, return default

And in Xposed:

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Processing volume external, subText null

XMSO: Searching directories to scan in /storage/sdcard0

XMSO: Finished searching directories to scan in /storage/sdcard0. Time: 0:02

XMSO: Searching directories to scan in /storage/sdcard1

XMSO: Finished searching directories to scan in /storage/sdcard1. Time: 0:00

XMSO: Searching directories to scan in /storage/usbdisk

XMSO: Finished searching directories to scan in /storage/usbdisk. Time: 0:00

XMSO: The following directories will be scanned by MediaScanner: [/storage/sdcard1/Musique]

XMSO: Changing thread priority in MediaScanner constructor

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Scanning /storage/sdcard1/Musique, subText null

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Postscan, subText null

XMSO: scan(String[] directories, String volumeName) has finished scanning external

XMSO: createBigTextStyleNotification with title Media Scanner Optimizer, text Scan directories time 0:39, subText Volume external (Expand for details), inboxSummary Volume external

XMSO: stopSelf is called on class com.android.providers.media.MediaScannerService

Which means that everything is now working properly but I am not notified of it!!

The point is, can you do something at some point for the notification to be shown differently?

For any user that is still facing FC from android.process.media, please can you try to disable the notification in the applicaiton settings to see if it helps (can be seen in logcat and Xposed logs) ?