Fix abort when DeleteWeakGlobalRef in ~FrontendClientCallbackImpl()
This week global ref was newed once bug deleted twice. It triggered an abort on userdebug build when checkJni is enabled. Bug: 195591944 Fix: 195591944 Test: atest android.media.tv.tuner.cts Change-Id: I0b46628a0fc192708201c3c8b536b7ad1a4ea8f1
This commit is contained in:
committed by
Hongguang Chen
parent
e8e2b078f4
commit
4b473fa352
@@ -1245,7 +1245,8 @@ jobject JTuner::openFrontendByHandle(int feHandle) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sp<FrontendClientCallbackImpl> feClientCb = new FrontendClientCallbackImpl(mObject);
|
||||
sp<FrontendClientCallbackImpl> feClientCb =
|
||||
new FrontendClientCallbackImpl(env->NewWeakGlobalRef(mObject));
|
||||
mFeClient->setCallback(feClientCb);
|
||||
// TODO: add more fields to frontend
|
||||
return env->NewObject(
|
||||
|
||||
Reference in New Issue
Block a user