|
@@ -17,7 +17,7 @@ public class ProtectionInjector extends ClassVisitor {
|
|
|
|
|
|
@Override
|
|
|
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
|
|
|
- String[] newInterfaces = append(interfaces, "io/nexilis/service/Callback");
|
|
|
+ String[] newInterfaces = append(interfaces, "io/nexilis/ui/Callback");
|
|
|
super.visit(version, access, name, signature, superName, newInterfaces);
|
|
|
}
|
|
|
|
|
@@ -54,12 +54,12 @@ public class ProtectionInjector extends ClassVisitor {
|
|
|
@Override
|
|
|
protected void onMethodExit(int opcode) {
|
|
|
super.onMethodExit(opcode);
|
|
|
- mv.visitLdcInsn(project != null ? project.getProperties().get("nexilis.appId") : "");
|
|
|
- mv.visitLdcInsn(project != null ? project.getProperties().get("nexilis.account") : "");
|
|
|
+ mv.visitLdcInsn(project != null ? (project.getProperties().get("nexilis.appId") == null ? "" : project.getProperties().get("nexilis.appId")) : "");
|
|
|
+ mv.visitLdcInsn(project != null ? (project.getProperties().get("nexilis.account") == null ? "" : project.getProperties().get("nexilis.account")) : "");
|
|
|
mv.visitVarInsn(ALOAD, 0);
|
|
|
- mv.visitLdcInsn(project != null ? project.getProperties().get("nexilis.floatingMode") : 0);
|
|
|
+ mv.visitLdcInsn(project != null ? (project.getProperties().get("nexilis.floatingMode") == null ? 0 : project.getProperties().get("nexilis.floatingMode")) : 0);
|
|
|
mv.visitVarInsn(ALOAD, 0);
|
|
|
- mv.visitMethodInsn(INVOKESTATIC, "io/nexilis/service/API", "connect", "(Ljava/lang/String;Ljava/lang/String;Landroid/app/Activity;Ljava/lang/Integer;Lio/nexilis/service/Callback;)V", false);
|
|
|
+ mv.visitMethodInsn(INVOKESTATIC, "io/nexilis/ui/API", "connect", "(Ljava/lang/String;Ljava/lang/String;Landroid/app/Activity;Ljava/lang/Integer;Lio/nexilis/ui/Callback;)V", false);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -68,12 +68,12 @@ public class ProtectionInjector extends ClassVisitor {
|
|
|
MethodVisitor mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "onSuccess", "(Ljava/lang/String;)V", null, null);
|
|
|
if (mv != null) {
|
|
|
mv.visitCode();
|
|
|
- mv.visitMethodInsn(Opcodes.INVOKESTATIC, "io/security/streamshield/SecurityShield", "getInstance", "()Lio/security/streamshield/SecurityShield;", false);
|
|
|
+ mv.visitMethodInsn(Opcodes.INVOKESTATIC, "io/nexilis/ss/SecurityShield", "getInstance", "()Lio/nexilis/ss/SecurityShield;", false);
|
|
|
mv.visitInsn(Opcodes.DUP);
|
|
|
mv.visitLdcInsn(project != null ? project.getProperties().get("nexilis.appId") : "");
|
|
|
mv.visitLdcInsn(project != null ? project.getProperties().get("nexilis.account") : "");
|
|
|
mv.visitVarInsn(Opcodes.ALOAD, 0);
|
|
|
- mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "io/security/streamshield/SecurityShield", "check", "(Ljava/lang/String;Ljava/lang/String;Landroid/app/Activity;)V", false);
|
|
|
+ mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "io/nexilis/ss/SecurityShield", "check", "(Ljava/lang/String;Ljava/lang/String;Landroid/app/Activity;)V", false);
|
|
|
mv.visitInsn(Opcodes.RETURN);
|
|
|
mv.visitMaxs(1, 1);
|
|
|
mv.visitEnd();
|