[Xposed Framework Modules] SergioSanchezR:
Hey, am i again.

I am the developer of Google play music notification seekbar and youtube notification seekbar.

I was playing yesterday with your module. Sometimes, if my module GpmNs changes first the notification, your module does not detect the media notification style.

To fix that, here is an small improvement:

- Class: de.Maxr1998.xposed.mnts.TrackSelector

- Code (your code with 2 improvements):

private static final String GPM_PACKAGE_NAME = "com.google.android.music";
private static final String GPM_NOTIF_EXPANDED_NAME = "notification_template_material_big_media_narrow";
private static final String GPM_NOTIF_CUSTOM_TAG = "xgpmMedia";
...
findAndHookMethod("android.widget.RemoteViews", lPParam.classLoader, "performApply", View.class, ViewGroup.class, findClass("android.widget.RemoteViews.OnClickHandler", lPParam.classLoader), new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
View notificationView = (View) param.args[0];
ApplicationInfo aux = (ApplicationInfo) getObjectField(param.thisObject, "mApplication"); //Try catch
if (aux.packageName.equalsIgnoreCase(GPM_PACKAGE_NAME)) { //the notification belongs to Gpm
if (notificationView instanceof RelativeLayout) { //Optional -> && notificationView.getResources().getResourceName((int)getObjectField(param.thisObject, "mLayoutId")).endsWith(GPM_NOTIF_EXPANDED_NAME)
final RelativeLayout root = (RelativeLayout) notificationView;

Object rootTag = root.getTag();
if (rootTag != null && rootTag instanceof String && ((String) rootTag).equalsIgnoreCase(GPM_NOTIF_CUSTOM_TAG))
return;

root.setTag(GPM_NOTIF_CUSTOM_TAG);

...

//I use an Id (because you only can set one tag to the view (if other module sets a custom tag it will not work)
//if (mView.findViewById(GPM_ID_SR) != null)
//return;

If you want (just if you want, obviously) to make your module compatible with my module, you could make something like: if the notification belongs to Gpm add the tracklist, and if not, check if is a media notification style.

=================================================

I don know if you have noticed that sometimes when you close the playlist you can see a blink (the notification becomes white for 0.1 seconds aprox). With cm13 the probability for this to occur is small, but with cm12.1 is bigger.

An easy way to fix that is set a custom duration for the CircularRevealAnimation and an smaller duration for the Animation (expand and collapse).

For example, i set it to 500 (circular) and 400 (expand/collapse animation).

=================================================

Another possible improvement is set the animations on a new thread (and reuse that thread to make it efficient; don't make a new thread every time that the user shows/hides the tracklist). It is quite noticeable.

=================================================

I will publish the code of my modules soon; before i want to implement a few small improvements and update lock screen clock mods and lock screen widgets....

Here is a screenshot with XGpm and GpmNs:

[IMG="GpmNs and Xgpm"]http://oi67.tinypic.com/nwh209.jpg[/IMG]

If you know this before, ignore this message.

And i should say it again, congrats for your excellent work and have a nice day!