aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/moe/yuuta/ext/IResultListener.java
diff options
context:
space:
mode:
authorYuutaW <17158086+trumeet@users.noreply.github.com>2019-05-16 16:03:24 -0700
committerYuutaW <17158086+Trumeet@users.noreply.github.com>2019-05-16 16:03:24 -0700
commit1ae04c3850eb876c7f4d1956089741e747691b3a (patch)
tree0f6f2e105fe170613d9eac6d2bdec055b5cf0a8a /app/src/main/java/moe/yuuta/ext/IResultListener.java
parent757fe89c745fc404259bda6653c046c13a4e617f (diff)
downloadWorkMode-1ae04c3850eb876c7f4d1956089741e747691b3a.tar
WorkMode-1ae04c3850eb876c7f4d1956089741e747691b3a.tar.gz
WorkMode-1ae04c3850eb876c7f4d1956089741e747691b3a.tar.bz2
WorkMode-1ae04c3850eb876c7f4d1956089741e747691b3a.zip
refactor: remove #Anti-Crack
Signed-off-by: YuutaW <17158086+Trumeet@users.noreply.github.com>
Diffstat (limited to 'app/src/main/java/moe/yuuta/ext/IResultListener.java')
-rw-r--r--app/src/main/java/moe/yuuta/ext/IResultListener.java102
1 files changed, 0 insertions, 102 deletions
diff --git a/app/src/main/java/moe/yuuta/ext/IResultListener.java b/app/src/main/java/moe/yuuta/ext/IResultListener.java
deleted file mode 100644
index 706b34a..0000000
--- a/app/src/main/java/moe/yuuta/ext/IResultListener.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package moe.yuuta.ext;
-
-import android.os.Binder;
-import android.os.IBinder;
-import android.os.IInterface;
-import android.os.Parcel;
-import android.os.RemoteException;
-
-import androidx.annotation.NonNull;
-
-import moe.yuuta.gplicense.util.Base64;
-import moe.yuuta.gplicense.util.Base64DecoderException;
-
-public interface IResultListener extends IInterface {
- abstract class Stub extends Binder implements IResultListener {
- private static final String DESCRIPTOR;
-
- static {
- try {
- // Base64 encoded -
- // com.android.vending.licensing.ILicenseResultListener
- DESCRIPTOR = new String(Base64.decode(
- "Y29tLmFuZHJvaWQudmVuZGluZy5saWNlbnNpbmcuSUxpY2Vuc2VSZXN1bHRMaXN0ZW5lcg=="));
- } catch (Base64DecoderException e) {
- throw new RuntimeException(e);
- }
- }
-
- protected Stub() {
- this.attachInterface(this, DESCRIPTOR);
- }
-
- static IResultListener asInterface(IBinder obj) {
- if ((obj == null)) {
- return null;
- }
- IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
- if (iin instanceof IResultListener) {
- return (IResultListener) iin;
- }
- return new Stub.Proxy(obj);
- }
-
- @Override
- public IBinder asBinder() {
- return this;
- }
-
- @Override
- public boolean onTransact(int code, @NonNull Parcel data, Parcel reply, int flags) throws RemoteException {
- switch (code) {
- case INTERFACE_TRANSACTION: {
- reply.writeString(DESCRIPTOR);
- return true;
- }
- case TRANSACTION: {
- data.enforceInterface(DESCRIPTOR);
- int responseCode = data.readInt();
- String signedData = data.readString();
- String signature = data.readString();
- this.exec(responseCode, signedData, signature);
- return true;
- }
- default: {
- return super.onTransact(code, data, reply, flags);
- }
- }
- }
-
- private static class Proxy implements IResultListener {
- private IBinder mRemote;
-
- Proxy(IBinder remote) {
- mRemote = remote;
- }
-
- @Override
- public IBinder asBinder() {
- return mRemote;
- }
-
- @Override
- public void exec(int responseCode, String signedData, String signature) throws RemoteException {
- Parcel args = Parcel.obtain();
- try {
- args.writeInterfaceToken(DESCRIPTOR);
- args.writeInt(responseCode);
- args.writeString(signedData);
- args.writeString(signature);
- mRemote.transact(TRANSACTION, args, null, IBinder.FLAG_ONEWAY);
- } finally {
- args.recycle();
- }
- }
- }
-
- static final int TRANSACTION = IBinder.FIRST_CALL_TRANSACTION;
- }
-
- // verifyLicense
- void exec(int responseCode, String signedData, String signature) throws RemoteException;
-} \ No newline at end of file