package io.gavinhungry.xposed.noplaymusicfor;

import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;

public class NoPlayMusicFor implements IXposedHookLoadPackage {
  public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
    if (lpparam.packageName.equals("com.google.android.music")) {
      try {

        XposedHelpers.findAndHookMethod("com.google.android.music.utils.ConfigUtils", lpparam.classLoader,
          "isConciergeListenNowEnabled", new XC_MethodHook() {

          @Override
          protected void afterHookedMethod(MethodHookParam param) throws Throwable {
            param.setResult(false);
          }
        });

      } catch(Throwable t) {
        XposedBridge.log(t);
      }
    }
  }
}

@@ -80,24 +80,69 @@
 osedBridge;%0A
+import de.robv.android.xposed.XposedHelpers;%0A
 import de.ro
@@ -299,57 +299,19 @@
 thod
-Hook;%0Aimport de.robv.android.xposed.XposedHelpers
+Replacement
 ;%0A%0Ap
@@ -696,20 +696,27 @@
 C_Method
-Hook
+Replacement
 () %7B%0A%0A  
@@ -757,18 +757,22 @@
 ted 
-void after
+Object replace
 Hook
@@ -838,30 +838,20 @@
     
-param.setResult(
+return 
 false
-)
 ;%0A  

Replace method instead of replacing return value