导航菜单

页面标题

页面副标题

Hyouka private v5.8.9 - BaseFragmentActivity.java 源代码

正在查看: Hyouka private v5.8.9 应用的 BaseFragmentActivity.java JAVA 源代码文件

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


package com.beint.project.screens;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import com.beint.project.MainActivity;
import com.beint.project.MainApplication;
import com.beint.project.core.services.impl.ZangiConfigurationService;
import com.beint.project.core.utils.Constants;
import com.beint.project.core.utils.Log;
import com.beint.project.screens.P2PConnection.DataTransferFragment;
import com.beint.project.screens.P2PConnection.OnTransferFragment;
import com.beint.project.screens.contacts.MultiSelectListFragment;
import com.beint.project.screens.contacts.ScreenTabContacts;
import com.beint.project.screens.settings.free.minutes.RateGetFragment;
import com.beint.project.screens.settings.free.minutes.ScreenMyFreeMinutes;
import com.beint.project.screens.settings.more.settings.AboutCreditFragment;
import com.beint.project.screens.settings.more.settings.AppearanceFragment;
import com.beint.project.screens.settings.more.settings.BlockListFragment;
import com.beint.project.screens.settings.more.settings.ChatSettingsFragment;
import com.beint.project.screens.settings.more.settings.HowToUseAppFragment;
import com.beint.project.screens.settings.more.settings.LowDataUsageFragment;
import com.beint.project.screens.settings.more.settings.NotificationSettingsFragment;
import com.beint.project.screens.settings.more.settings.PrivacySettingsFragment;
import com.beint.project.screens.settings.more.settings.ScreenMyAccount;
import com.beint.project.screens.settings.more.settings.ServicesFragment;
import com.beint.project.screens.settings.more.settings.SettingsFragment;
import com.beint.project.screens.settings.more.settings.VerifayPhoneNumberFR;
import com.beint.project.screens.settings.more.settings.VirtualNetworkFragment;
import com.beint.project.screens.settings.roaming.ScreenAddRoaming;
import com.beint.project.screens.settings.roaming.ScreenEditRoaming;
import com.beint.project.screens.settings.roaming.ScreenMyRoamings;
import com.beint.project.screens.sms.AppModeNotifierActivity;
import com.beint.project.screens.sms.ForwardMessageAndBalanceTransferFragment;
import com.beint.project.screens.sms.GroupMsgStatusInfoScreen;
import com.beint.project.screens.sms.ZReactionsMembersListScreen;
import com.beint.project.screens.utils.ScreenCountryList;

public class BaseFragmentActivity extends AppModeNotifierActivity {
    public static final int COUNTRY_LIST_REQUEST_CODE = 1915;
    private static String TAG = "com.beint.project.screens.BaseFragmentActivity";
    public static BaseFragmentActivity sInstance;
    private Fragment mFragment;
    private String mFragmentName;
    private Menu mMenu;
    public Toolbar toolbar;

    private void ActionBarByFragment(Fragment fragment) {
        int i;
        if (getSupportActionBar() == null) {
            return;
        }
        if (!(fragment instanceof ScreenTabContacts)) {
            if (fragment instanceof VirtualNetworkFragment) {
                i = 2131887655;
            } else if (fragment instanceof ScreenMyAccount) {
                i = 2131887553;
            } else if (fragment instanceof ServicesFragment) {
                i = 2131887385;
            } else if (fragment instanceof VerifayPhoneNumberFR) {
                i = 2131887636;
            } else if (fragment instanceof SettingsFragment) {
                i = 2131886126;
            } else if (fragment instanceof MultiSelectListFragment) {
                i = 2131887333;
            } else if (fragment instanceof ScreenMyRoamings) {
                i = 2131886989;
            } else if (fragment instanceof ScreenAddRoaming) {
                i = 2131886138;
            } else if (fragment instanceof ScreenCountryList) {
                i = 2131887042;
            } else if (fragment instanceof ScreenEditRoaming) {
                i = 2131887571;
            } else if (fragment instanceof ChatSettingsFragment) {
                i = 2131886298;
            } else if (fragment instanceof PrivacySettingsFragment) {
                i = 2131887217;
            } else if (fragment instanceof NotificationSettingsFragment) {
                i = 2131887069;
            } else if (fragment instanceof LowDataUsageFragment) {
                i = 2131886813;
            } else if (fragment instanceof HowToUseAppFragment) {
                i = 2131886692;
            } else if (fragment instanceof AboutCreditFragment) {
                i = 2131887552;
            } else if (fragment instanceof ScreenMyFreeMinutes) {
                i = 2131887568;
            } else if (fragment instanceof BlockListFragment) {
                i = 2131886223;
            } else if (fragment instanceof RateGetFragment) {
                i = 2131887235;
            } else if (fragment instanceof ForwardMessageAndBalanceTransferFragment) {
                i = getIntent().getIntExtra(Constants.FORWARD_MESSAGE_TITLE, 2131886587);
            } else if (fragment instanceof GroupMsgStatusInfoScreen) {
                i = 2131886908;
            } else if (fragment instanceof ZReactionsMembersListScreen) {
                i = 2131887254;
            } else if ((fragment instanceof DataTransferFragment) || (fragment instanceof OnTransferFragment)) {
                i = 2131886424;
            } else if (fragment instanceof AppearanceFragment) {
                i = 2131886183;
            }
            getSupportActionBar().w(i);
        }
        this.toolbar.setTitleTextAppearance(this, 2131952411);
        i = 2131887550;
        getSupportActionBar().w(i);
    }

    protected void initFragment() {
        try {
            Class cls = (Class) getIntent().getSerializableExtra("com.beint.project.FragmentName");
            TAG = cls.getCanonicalName();
            ZangiConfigurationService zangiConfigurationService = ZangiConfigurationService.INSTANCE;
            if (zangiConfigurationService.getBoolean("continue", false) && zangiConfigurationService.getBoolean(Constants.IS_LANGUAGE_CHANGE, false)) {
                zangiConfigurationService.putBoolean(Constants.IS_LANGUAGE_CHANGE, false, true);
                startActivity(new Intent(MainApplication.Companion.getMainContext(), (Class<?>) MainActivity.class));
            } else {
                Log.i("BaseFragmentActivity", TAG + "================");
                this.mFragment = Fragment.instantiate(this, cls.getName());
                this.mFragmentName = cls.getSimpleName();
                ActionBarByFragment(this.mFragment);
                getSupportFragmentManager().n().r(2131362950, this.mFragment, TAG).i();
            }
        } catch (Exception e) {
            Log.w(TAG, e.getMessage());
        }
        sInstance = this;
    }

    @Override
    public void initScreenOrientationForTabletIfNeeded(int i) {
        if (m4.i.c(this)) {
            setRequestedOrientation(i);
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        initScreenOrientationForTabletIfNeeded(13);
        setContentView(2131558444);
        View findViewById = findViewById(2131363849);
        if (findViewById != null) {
            findViewById.setVisibility(8);
        }
        Toolbar findViewById2 = findViewById(2131363848);
        this.toolbar = findViewById2;
        setSupportActionBar(findViewById2);
        getSupportActionBar().v(false);
        getSupportActionBar().q(true);
        getSupportActionBar().r(true);
        initFragment();
    }

    public boolean onCreateOptionsMenu(Menu menu) {
        if (this.mFragment == null) {
            return true;
        }
        this.mMenu = menu;
        return true;
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        sInstance = null;
    }

    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() == 16908332) {
            String simpleName = SendContactInfoFragment.class.getCanonicalName() == null ? "" : MultiSelectListFragment.class.getSimpleName();
            String str = this.mFragmentName;
            if (str == null || (!str.equals("EnterPassCodeFragment") && !this.mFragmentName.equals("LockPasswordFragment") && !this.mFragmentName.equals("ConversationConfigurationFragment"))) {
                if (TextUtils.isEmpty(this.mFragmentName) || !this.mFragmentName.equals(simpleName)) {
                    finish();
                } else {
                    onBackPressed();
                }
            }
        }
        return super/*android.app.Activity*/.onOptionsItemSelected(menuItem);
    }

    @Override
    protected void onPause() {
        super.onPause();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    public boolean processKeyDown(int i, KeyEvent keyEvent) {
        return super.processKeyDown(i, keyEvent);
    }

    public void restartWhenChangeColorMode() {
        finish();
        Intent intent = new Intent((Context) this, getClass());
        intent.putExtra("com.beint.project.FragmentName", AppearanceFragment.class);
        startActivity(intent);
    }
}