Search in sources :

Example 11 with ReplaceCallingPkgHook

use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.

the class NotificationManagerPatch method onBindHooks.

@Override
protected void onBindHooks() {
    super.onBindHooks();
    addHook(new ReplaceCallingPkgHook("enqueueToast"));
    addHook(new ReplaceCallingPkgHook("cancelToast"));
    addHook(new StaticHook("registerListener"));
    addHook(new StaticHook("unregisterListener"));
    addHook(new StaticHook("getAppActiveNotifications"));
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
        addHook(new ReplaceCallingPkgHook("areNotificationsEnabled"));
    }
    if ("samsung".equalsIgnoreCase(Build.BRAND) || "samsung".equalsIgnoreCase(Build.MANUFACTURER)) {
        addHook(new ReplaceCallingPkgHook("removeEdgeNotification"));
    }
}
Also used : ReplaceCallingPkgHook(com.lody.virtual.client.hook.base.ReplaceCallingPkgHook) StaticHook(com.lody.virtual.client.hook.base.StaticHook)

Example 12 with ReplaceCallingPkgHook

use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.

the class RestrictionPatch method onBindHooks.

@Override
protected void onBindHooks() {
    super.onBindHooks();
    addHook(new ReplaceCallingPkgHook("getApplicationRestrictions"));
    addHook(new ReplaceCallingPkgHook("notifyPermissionResponse"));
    addHook(new ReplaceCallingPkgHook("requestPermission"));
}
Also used : ReplaceCallingPkgHook(com.lody.virtual.client.hook.base.ReplaceCallingPkgHook)

Aggregations

ReplaceCallingPkgHook (com.lody.virtual.client.hook.base.ReplaceCallingPkgHook)12 ReplaceLastPkgHook (com.lody.virtual.client.hook.base.ReplaceLastPkgHook)3 ReplaceSpecPkgHook (com.lody.virtual.client.hook.base.ReplaceSpecPkgHook)2 ResultStaticHook (com.lody.virtual.client.hook.base.ResultStaticHook)2 StaticHook (com.lody.virtual.client.hook.base.StaticHook)2 Method (java.lang.reflect.Method)2 ActivityManager (android.app.ActivityManager)1 ReplaceLastUidHook (com.lody.virtual.client.hook.base.ReplaceLastUidHook)1 ReplaceSequencePkgHook (com.lody.virtual.client.hook.base.ReplaceSequencePkgHook)1 VActivityManager (com.lody.virtual.client.ipc.VActivityManager)1 AppTaskInfo (com.lody.virtual.remote.AppTaskInfo)1 List (java.util.List)1 IActivityManager (mirror.android.app.IActivityManager)1