@TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override public boolean beforeCall(Object who, Method method, Object... args) { ShortcutInfo shortcutInfo = findFirstShortcutInfo(args); replaceShortcutInfo(shortcutInfo, getHostPkg(), getPM()); return super.beforeCall(who, method, args); }
@Override protected void onBindMethods() { super.onBindMethods(); addMethodProxy(new ReplaceCallingPkgMethodProxy("getManifestShortcuts")); // TODO: 18/3/3 Support dynamic shortcut ? addMethodProxy(new ReplaceCallingPkgMethodProxy("getDynamicShortcuts")); addMethodProxy(new ReplacePkgAndShortcutListMethodProxy("setDynamicShortcuts")); addMethodProxy(new ReplaceCallingPkgMethodProxy("addDynamicShortcuts")); addMethodProxy(new ReplaceCallingPkgMethodProxy("createShortcutResultIntent")); addMethodProxy(new ReplaceCallingPkgMethodProxy("disableShortcuts")); addMethodProxy(new ReplaceCallingPkgMethodProxy("enableShortcuts")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getRemainingCallCount")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getRateLimitResetTime")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getIconMaxDimensions")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getMaxShortcutCountPerActivity")); addMethodProxy(new ReplaceCallingPkgMethodProxy("reportShortcutUsed")); addMethodProxy(new ReplaceCallingPkgMethodProxy("onApplicationActive")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getPinnedShortcuts")); addMethodProxy(new ReplacePkgAndShortcutMethodProxy("requestPinShortcut")); }
@TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override public boolean beforeCall(Object who, Method method, Object... args) { ShortcutInfo shortcutInfo = findFirstShortcutInfo(args); replaceShortcutInfo(shortcutInfo, getHostPkg(), getPM()); return super.beforeCall(who, method, args); }
@Override protected void onBindMethods() { super.onBindMethods(); addMethodProxy(new ReplaceCallingPkgMethodProxy("getManifestShortcuts")); // TODO: 18/3/3 Support dynamic shortcut ? addMethodProxy(new ReplaceCallingPkgMethodProxy("getDynamicShortcuts")); addMethodProxy(new ReplacePkgAndShortcutListMethodProxy("setDynamicShortcuts")); addMethodProxy(new ReplaceCallingPkgMethodProxy("addDynamicShortcuts")); addMethodProxy(new ReplaceCallingPkgMethodProxy("createShortcutResultIntent")); addMethodProxy(new ReplaceCallingPkgMethodProxy("disableShortcuts")); addMethodProxy(new ReplaceCallingPkgMethodProxy("enableShortcuts")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getRemainingCallCount")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getRateLimitResetTime")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getIconMaxDimensions")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getMaxShortcutCountPerActivity")); addMethodProxy(new ReplaceCallingPkgMethodProxy("reportShortcutUsed")); addMethodProxy(new ReplaceCallingPkgMethodProxy("onApplicationActive")); addMethodProxy(new ReplaceCallingPkgMethodProxy("getPinnedShortcuts")); addMethodProxy(new ReplacePkgAndShortcutMethodProxy("requestPinShortcut")); }