Loading
Improve handling of accessing dying provider.
Case 1: The provider process has been killed and marked killedByAm, but the death recipient does not be called immediately. Case 2: Just before updating oom adj, low memory killer has killed the provider process. When a process is dying, it may be temporary Z state or R state with pending signal. If we restart the process immediately, the dying process may be D state temporarily and still holds file lock of database file. Then the new process will meet problem in sqlite. By adding the provider into launching list, when the death recipient is called, the provider process t will be restarted and use the same ContentProviderRecord to notify the caller. And also because the restart is depends on binder died event which is triggered from exit_files of kernel, it has higher confidence that the previous process is completely cleared. Change-Id: Ie69ce6c99f29f47358d0fd977ab77cae31409ca8