导航菜单

页面标题

页面副标题

Meine NEW v2.0.3616 - BrokerActivity.java 源代码

正在查看: Meine NEW v2.0.3616 应用的 BrokerActivity.java JAVA 源代码文件

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


package com.microsoft.identity.client.internal.controllers;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.media.a;
import com.microsoft.identity.common.adal.internal.AuthenticationConstants;
import com.microsoft.identity.common.internal.logging.Logger;

public final class BrokerActivity extends Activity {
    public static final String BROKER_INTENT = "broker_intent";
    static final int BROKER_INTENT_REQUEST_CODE = 1001;
    static final String BROKER_INTENT_STARTED = "broker_intent_started";
    private static final String TAG = "BrokerActivity";
    private Boolean mBrokerIntentStarted = Boolean.FALSE;
    private Intent mBrokerInteractiveRequestIntent;

    @Override
    public void onActivityResult(int i, int i2, Intent intent) {
        StringBuilder sb = new StringBuilder();
        String str = TAG;
        Logger.info(a.l(sb, str, ":onActivityResult"), "Result received from Broker Request code: " + i + " Result code: " + i);
        if (i2 == 2004 || i2 == 2001 || i2 == 2002) {
            Logger.verbose(str + ":onActivityResult", "Completing interactive request ");
            intent.setAction(AuthenticationConstants.AuthorizationIntentAction.RETURN_INTERACTIVE_REQUEST_RESULT);
            intent.putExtra(AuthenticationConstants.AuthorizationIntentKey.REQUEST_CODE, 1001);
            intent.putExtra(AuthenticationConstants.AuthorizationIntentKey.RESULT_CODE, i2);
            e1.a.a(getApplicationContext()).c(intent);
        }
        finish();
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (bundle == null) {
            this.mBrokerInteractiveRequestIntent = (Intent) getIntent().getExtras().getParcelable(BROKER_INTENT);
        } else {
            this.mBrokerInteractiveRequestIntent = (Intent) bundle.getParcelable(BROKER_INTENT);
            this.mBrokerIntentStarted = Boolean.valueOf(bundle.getBoolean(BROKER_INTENT_STARTED));
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        if (this.mBrokerIntentStarted.booleanValue()) {
            return;
        }
        this.mBrokerIntentStarted = Boolean.TRUE;
        startActivityForResult(this.mBrokerInteractiveRequestIntent, 1001);
    }

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putParcelable(BROKER_INTENT, this.mBrokerInteractiveRequestIntent);
        bundle.putBoolean(BROKER_INTENT_STARTED, this.mBrokerIntentStarted.booleanValue());
    }

    @Override
    public void onStop() {
        super.onStop();
    }
}