Do not bind TextClassifierService if the packge doesn't install.
Currently, TCMS will try to bind TCS even the package doesn't install for certain user. If there are a lot of API calls come, we may call bindService() many times, this may cause system stability problem. We received the system reboot problem before. We already have preload TextClassifierService in ExtServices on primary user but it's possible the TextClassifierService doesn't install on the profile user or users unintall package. It's possible the package may not be installed on non-primary user. Users also can disable TextClassifierService from ui interface easily, it's possible occur on both primary and non-primary users, system should also not bind TextClassifierService in this case. In this change, system will avoid trying to call bindService() if the TCS deosn't install or disabled to minimize binder calls. Bug: 188825683 Bug: 170014504 Test: atest CtsTextClassifierTestCases Test: manual. Create work profile, turn on/off it and reboot to check the status. Disable app from Settings and check the status. Change-Id: Ifa2bccc0d2435712461067d650b52cb02a903c59
Loading
Please register or sign in to comment