导航菜单

页面标题

页面副标题

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

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

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


package com.microsoft.identity.common.internal.providers.oauth2;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.microsoft.identity.common.adal.internal.AuthenticationConstants;
import com.microsoft.identity.common.internal.logging.DiagnosticContext;
import com.microsoft.identity.common.internal.telemetry.Telemetry;
import com.microsoft.identity.common.internal.telemetry.events.UiStartEvent;
import com.microsoft.identity.common.internal.ui.AuthorizationAgent;
import com.microsoft.identity.common.internal.ui.DualScreenActivity;
import java.util.HashMap;

public final class AuthorizationActivity extends DualScreenActivity {
    private AuthorizationFragment mFragment;

    public static Intent createStartIntent(Context context, Intent intent, String str, String str2, HashMap<String, String> hashMap, AuthorizationAgent authorizationAgent, boolean z, boolean z2) {
        Intent intent2 = new Intent(context, (Class<?>) AuthorizationActivity.class);
        intent2.putExtra(AuthenticationConstants.AuthorizationIntentKey.AUTH_INTENT, intent);
        intent2.putExtra(AuthenticationConstants.AuthorizationIntentKey.REQUEST_URL, str);
        intent2.putExtra(AuthenticationConstants.AuthorizationIntentKey.REDIRECT_URI, str2);
        intent2.putExtra(AuthenticationConstants.AuthorizationIntentKey.REQUEST_HEADERS, hashMap);
        intent2.putExtra(AuthenticationConstants.AuthorizationIntentKey.AUTHORIZATION_AGENT, authorizationAgent);
        intent2.putExtra(AuthenticationConstants.AuthorizationIntentKey.WEB_VIEW_ZOOM_CONTROLS_ENABLED, z2);
        intent2.putExtra(AuthenticationConstants.AuthorizationIntentKey.WEB_VIEW_ZOOM_ENABLED, z);
        intent2.putExtra("correlation_id", DiagnosticContext.getRequestContext().get("correlation_id"));
        return intent2;
    }

    public static AuthorizationFragment getAuthorizationFragmentFromStartIntent(Intent intent) {
        AuthorizationAgent authorizationAgent = (AuthorizationAgent) intent.getSerializableExtra(AuthenticationConstants.AuthorizationIntentKey.AUTHORIZATION_AGENT);
        Telemetry.emit(new UiStartEvent().putUserAgent(authorizationAgent));
        AuthorizationFragment webViewAuthorizationFragment = authorizationAgent == AuthorizationAgent.WEBVIEW ? new WebViewAuthorizationFragment() : new BrowserAuthorizationFragment();
        webViewAuthorizationFragment.setInstanceState(intent.getExtras());
        return webViewAuthorizationFragment;
    }

    public void onBackPressed() {
        if (this.mFragment.onBackPressed()) {
            return;
        }
        super/*androidx.activity.ComponentActivity*/.onBackPressed();
    }

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        AuthorizationFragment authorizationFragmentFromStartIntent = getAuthorizationFragmentFromStartIntent(getIntent());
        this.mFragment = authorizationFragmentFromStartIntent;
        setFragment(authorizationFragmentFromStartIntent);
    }
}