Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oom in LauncherActivity.java #1041

Open
billdizl opened this issue Jan 18, 2023 · 1 comment
Open

oom in LauncherActivity.java #1041

billdizl opened this issue Jan 18, 2023 · 1 comment

Comments

@billdizl
Copy link

billdizl commented Jan 18, 2023

Describe the bug

package com.eneff.branch.example.android

import io.branch.indexing.BranchUniversalObject
import io.branch.referral.Branch
import io.branch.referral.BranchError
import io.branch.referral.util.LinkProperties

import android.util.Log;
import org.json.JSONObject;

override fun onStart() {
    super.onStart()
    Branch.sessionBuilder(this).withCallback { branchUniversalObject, linkProperties, error ->
        if (error != null) {
            Log.e("BranchSDK_Tester", "branch init failed. Caused by -" + error.message)
        } else {
            Log.e("BranchSDK_Tester", "branch init complete!")
            if (branchUniversalObject != null) {
                Log.e("BranchSDK_Tester", "title " + branchUniversalObject.title)
                Log.e("BranchSDK_Tester", "CanonicalIdentifier " + branchUniversalObject.canonicalIdentifier)
                Log.e("BranchSDK_Tester", "metadata " + branchUniversalObject.contentMetadata.convertToJson())
            }
            if (linkProperties != null) {
                Log.e("BranchSDK_Tester", "Channel " + linkProperties.channel)
                Log.e("BranchSDK_Tester", "control params " + linkProperties.controlParams)
            }
        }
    }.withData(this.intent.data).init()
}

override fun onNewIntent(intent: Intent?) {
    super.onNewIntent(intent)
    Branch.sessionBuilder(this).withCallback { referringParams, error ->
        if (error != null) {
            Log.e("BranchSDK_Tester", error.message)
        } else if (referringParams != null) {
            Log.e("BranchSDK_Tester", referringParams.toString())
        }
    }.reInit()
}

}

this code can oom, because i can't remove Callback
image

Steps to reproduce

nothing

Expected behavior

don't have oom in this sdk

SDK Version

5.2.7

Make and Model

realme x50

OS

12

Additional Information/Context

no

@billdizl
Copy link
Author

in my project SplashActivity==LauncherActivity.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant