Fix the Translator references are gone when receiving response.
There are some issues TranslationService already sent the response but the View onResponse doesn't be called. The reference seems to be gone. If we don't fix the problem, we will missing the ui translation even the service already give us the response. To fix the problem, we change it to strong reference. The change is low risk, the only risk is if TranslationService doesn not release the reference to the callback properly causing a memory leak for apps but this can recovered by app update. Bug: 194973014 Test: atest CtsTranslationTestCases Test: The translation for chat apps work fine. The memory is decreased after receiving the responses for a while. Change-Id: Ib3956b2250c54a29acf9f7d51f51e8191fe8aba2
Loading
Please register or sign in to comment