导航菜单

页面标题

页面副标题

Minits v4.9.3.32 - AuthorizationManagementActivity.java 源代码

正在查看: Minits v4.9.3.32 应用的 AuthorizationManagementActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package net.openid.appauth;

import Cb.C0041d;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import net.openid.appauth.a;
import net.openid.appauth.b;
import org.json.JSONException;

public final class AuthorizationManagementActivity extends Activity {
    public boolean l;
    public Intent m;
    public C0041d n;

    public static Intent a(Context context) {
        Intent intent = new Intent(context, (Class<?>) AuthorizationManagementActivity.class);
        if (context instanceof Application) {
            intent.addFlags(268435456);
        }
        return intent;
    }

    public static Intent b(Context context, Uri uri) {
        Intent a = a(context);
        a.setData(uri);
        a.addFlags(603979776);
        return a;
    }

    public static Intent c(Context context, C0041d c0041d, Intent intent) {
        return d(context, c0041d, intent);
    }

    public static Intent d(Context context, C0041d c0041d, Intent intent) {
        Intent a = a(context);
        a.putExtra("authIntent", intent);
        a.putExtra("authRequest", c0041d.f());
        return a;
    }

    public final Intent e(Uri uri) {
        if (uri.getQueryParameterNames().contains("error")) {
            return a.f(uri).k();
        }
        b a = new b.a(this.n).b(uri).a();
        String str = this.n.i;
        return ((str != null || a.b == null) && (str == null || str.equals(a.b))) ? a.f() : a.C0022a.j.k();
    }

    public final void f(Bundle bundle) {
        if (bundle == null) {
            finish();
            return;
        }
        this.m = (Intent) bundle.getParcelable("authIntent");
        this.l = bundle.getBoolean("authStarted", false);
        try {
            String string = bundle.getString("authRequest");
            this.n = string != null ? C0041d.c(string) : null;
        } catch (JSONException e) {
            throw new IllegalStateException("Unable to deserialize authorization request", e);
        }
    }

    public final void g() {
        setResult(0, a.h(a.b.b, null).k());
    }

    public final void h() {
        Uri data = getIntent().getData();
        if (data == null) {
            return;
        }
        Intent e = e(data);
        e.setData(data);
        setResult(-1, e);
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (bundle == null) {
            f(getIntent().getExtras());
        } else {
            f(bundle);
        }
    }

    @Override
    public void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setIntent(intent);
    }

    @Override
    public void onResume() {
        super.onResume();
        if (!this.l) {
            startActivity(this.m);
            this.l = true;
        } else {
            if (getIntent().getData() != null) {
                h();
            } else {
                g();
            }
            finish();
        }
    }

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putBoolean("authStarted", this.l);
        bundle.putParcelable("authIntent", this.m);
        bundle.putString("authRequest", this.n.f());
    }
}