use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class TelephonyPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
//addHook(new ReplaceCallingPkgHook("getDeviceId"));
addHook(new ReplaceCallingPkgHook("getNeighboringCellInfo"));
addHook(new ReplaceCallingPkgHook("getAllCellInfo"));
addHook(new ReplaceCallingPkgHook("getCellLocation"));
addHook(new ReplaceCallingPkgHook("isOffhook"));
addHook(new ReplaceLastPkgHook("getLine1NumberForDisplay"));
addHook(new ReplaceLastPkgHook("isOffhookForSubscriber"));
addHook(new ReplaceLastPkgHook("isRingingForSubscriber"));
addHook(new ReplaceCallingPkgHook("call"));
addHook(new ReplaceCallingPkgHook("isRinging"));
addHook(new ReplaceCallingPkgHook("isIdle"));
addHook(new ReplaceLastPkgHook("isIdleForSubscriber"));
addHook(new ReplaceCallingPkgHook("isRadioOn"));
addHook(new ReplaceLastPkgHook("isRadioOnForSubscriber"));
addHook(new ReplaceLastPkgHook("isSimPinEnabled"));
addHook(new ReplaceLastPkgHook("getCdmaEriIconIndex"));
addHook(new ReplaceLastPkgHook("getCdmaEriIconIndexForSubscriber"));
addHook(new ReplaceCallingPkgHook("getCdmaEriIconMode"));
addHook(new ReplaceLastPkgHook("getCdmaEriIconModeForSubscriber"));
addHook(new ReplaceCallingPkgHook("getCdmaEriText"));
addHook(new ReplaceLastPkgHook("getCdmaEriTextForSubscriber"));
addHook(new ReplaceLastPkgHook("getNetworkTypeForSubscriber"));
addHook(new ReplaceCallingPkgHook("getDataNetworkType"));
addHook(new ReplaceLastPkgHook("getDataNetworkTypeForSubscriber"));
addHook(new ReplaceLastPkgHook("getVoiceNetworkTypeForSubscriber"));
addHook(new ReplaceCallingPkgHook("getLteOnCdmaMode"));
addHook(new ReplaceLastPkgHook("getLteOnCdmaModeForSubscriber"));
addHook(new ReplaceLastPkgHook("getCalculatedPreferredNetworkType"));
addHook(new ReplaceLastPkgHook("getPcscfAddress"));
addHook(new ReplaceLastPkgHook("getLine1AlphaTagForDisplay"));
addHook(new ReplaceCallingPkgHook("getMergedSubscriberIds"));
addHook(new ReplaceLastPkgHook("getRadioAccessFamily"));
addHook(new ReplaceCallingPkgHook("isVideoCallingEnabled"));
}
use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class TelephonyRegistryPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ReplaceCallingPkgHook("listen"));
addHook(new ReplaceSequencePkgHook("listenForSubscriber", 1));
}
use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class UserManagerPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ReplaceCallingPkgHook("setApplicationRestrictions"));
addHook(new ReplaceCallingPkgHook("getApplicationRestrictions"));
addHook(new ReplaceCallingPkgHook("getApplicationRestrictionsForUser"));
addHook(new ResultStaticHook("getProfileParent", null));
addHook(new ResultStaticHook("getUserIcon", null));
addHook(new ResultStaticHook("getUserInfo", null));
addHook(new ResultStaticHook("getDefaultGuestRestrictions", null));
addHook(new ResultStaticHook("setDefaultGuestRestrictions", null));
addHook(new ResultStaticHook("removeRestrictions", null));
addHook(new ResultStaticHook("getUsers", Collections.EMPTY_LIST));
addHook(new ResultStaticHook("createUser", null));
addHook(new ResultStaticHook("createProfileForUser", null));
addHook(new ResultStaticHook("getProfiles", Collections.EMPTY_LIST));
}
use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class VibratorPatch method onBindHooks.
@Override
protected void onBindHooks() {
//Samsung
addHook(new ReplaceCallingPkgHook("vibrateMagnitude") {
@Override
public boolean beforeCall(Object who, Method method, Object... args) {
if (args[0] instanceof Integer) {
args[0] = getRealUid();
}
return super.beforeCall(who, method, args);
}
});
//Samsung
addHook(new ReplaceCallingPkgHook("vibratePatternMagnitude") {
@Override
public boolean beforeCall(Object who, Method method, Object... args) {
if (args[0] instanceof Integer) {
args[0] = getRealUid();
}
return super.beforeCall(who, method, args);
}
});
addHook(new ReplaceCallingPkgHook("vibrate") {
@Override
public boolean beforeCall(Object who, Method method, Object... args) {
if (args[0] instanceof Integer) {
args[0] = getRealUid();
}
return super.beforeCall(who, method, args);
}
});
addHook(new ReplaceCallingPkgHook("vibratePattern") {
@Override
public boolean beforeCall(Object who, Method method, Object... args) {
if (args[0] instanceof Integer) {
args[0] = getRealUid();
}
return super.beforeCall(who, method, args);
}
});
}
use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class GraphicsStatsPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ReplaceCallingPkgHook("requestBufferForProcess"));
}
Aggregations