翰林优商.apk(点击下载) / g.java


package com.kwad.sdk.core.f.kwai;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import com.kwad.sdk.core.f.a.e;
import java.util.concurrent.LinkedBlockingQueue;

public final class g {
    private final LinkedBlockingQueue<IBinder> aXS = new LinkedBlockingQueue<>(1);
    private ServiceConnection aXT = new ServiceConnection() {
        /* class com.kwad.sdk.core.f.kwai.g.AnonymousClass1 */

        public final void onServiceConnected(ComponentName componentName, IBinder iBinder) {
            try {
                g.this.aXS.put(iBinder);
            } catch (Exception unused) {
            }
        }

        public final void onServiceDisconnected(ComponentName componentName) {
        }
    };
    private Context mContext;

    public g(Context context) {
        this.mContext = context;
    }

    public final String getOAID() {
        Context context;
        String str = "";
        try {
            Intent intent = new Intent();
            intent.setClassName("com.samsung.android.deviceidservice", "com.samsung.android.deviceidservice.DeviceIdService");
            if (this.mContext.bindService(intent, this.aXT, 1)) {
                try {
                    str = new e.a(this.aXS.take()).getID();
                    context = this.mContext;
                } catch (Exception unused) {
                    context = this.mContext;
                } catch (Throwable th) {
                    this.mContext.unbindService(this.aXT);
                    throw th;
                }
                context.unbindService(this.aXT);
            }
        } catch (Exception unused2) {
        }
        return str;
    }
}