package com.brsdk.android.demo;

import android.content.Intent;
import android.view.View;

import com.brsdk.android.core.BRSdkApi;

public class OtherActivity extends MainActivity {

    private boolean isInitialized = true;

    @Override
    protected void onInitialize() {
        if (isInitialized) {
            isInitialized = false;
        } else {
            super.onInitialize();
        }
    }

    @Override
    public void onBackPressed() {
        finish();
    }


    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        // TODO 生命周期：结果回调
        BRSdkApi.getInstance().onActivityResult(requestCode, resultCode, data);
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        // TODO 生命周期：权限回调
        BRSdkApi.getInstance().onRequestPermissionsResult(requestCode, permissions, grantResults);
    }
}
