Skip to content

Commit

Permalink
ignore create shortcut dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
swift_gan committed Apr 11, 2019
1 parent a294016 commit e6a6bf9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import com.lody.virtual.client.hook.base.BinderInvocationProxy;
import com.lody.virtual.client.hook.base.ReplaceCallingPkgMethodProxy;
import com.lody.virtual.client.hook.base.ResultStaticMethodProxy;

import mirror.android.content.pm.ILauncherApps;
import mirror.android.content.pm.IShortcutService;

/**
* @author Lody
Expand All @@ -12,7 +13,7 @@ public class ShortcutServiceStub extends BinderInvocationProxy {


public ShortcutServiceStub() {
super(ILauncherApps.Stub.asInterface, "shortcut");
super(IShortcutService.Stub.asInterface, "shortcut");
}

@Override
Expand All @@ -25,7 +26,8 @@ protected void onBindMethods() {
super.onBindMethods();
addMethodProxy(new ReplaceCallingPkgMethodProxy("getManifestShortcuts"));
addMethodProxy(new ReplaceCallingPkgMethodProxy("getDynamicShortcuts"));
addMethodProxy(new ReplaceCallingPkgMethodProxy("setDynamicShortcuts"));
//ignore set shortcut
addMethodProxy(new ResultStaticMethodProxy("setDynamicShortcuts", false));
addMethodProxy(new ReplaceCallingPkgMethodProxy("addDynamicShortcuts"));
addMethodProxy(new ReplaceCallingPkgMethodProxy("createShortcutResultIntent"));
addMethodProxy(new ReplaceCallingPkgMethodProxy("disableShortcuts"));
Expand All @@ -36,5 +38,8 @@ protected void onBindMethods() {
addMethodProxy(new ReplaceCallingPkgMethodProxy("getMaxShortcutCountPerActivity"));
addMethodProxy(new ReplaceCallingPkgMethodProxy("reportShortcutUsed"));
addMethodProxy(new ReplaceCallingPkgMethodProxy("onApplicationActive"));
//ignore pin shortcut
addMethodProxy(new ResultStaticMethodProxy("requestPinShortcut", false));
addMethodProxy(new ReplaceCallingPkgMethodProxy("getPinnedShortcuts"));
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package mirror.android.content.pm;

import android.os.IBinder;
import android.os.IInterface;

import mirror.MethodParams;
import mirror.RefClass;
import mirror.RefStaticMethod;

Expand All @@ -12,7 +14,8 @@
public class IShortcutService {

public static final class Stub {
public static Class<?> TYPE = RefClass.load(IShortcutService.class, "android.content.pm.IShortcutService$Stub");
public static Class<?> TYPE = RefClass.load(IShortcutService.Stub.class, "android.content.pm.IShortcutService$Stub");
@MethodParams({IBinder.class})
public static RefStaticMethod<IInterface> asInterface;
}
}

0 comments on commit e6a6bf9

Please sign in to comment.