BroadcastReceiver in UserBackupManagerService can crash system_server
Make sure mBroadcastReceiver is initialized after its dependencies, i.e. mTransportManager. Bug: 130408863 Test: 1) atest RunBackupFrameworksServicesRoboTests 2) atest CtsBackupTestCases 3) atest CtsBackupHostTestCases 4) atest GtsBackupTestCases 5) atest GtsBackupHostTestCases Manual test: 1) Before fix: Add Thread.sleep() before mTransportManager is initialized in constructor and tirgger PACKAGE_CHANGED event. Verify broadcast receiver callback is triggered and systen_process crashes. 2) After fix: Add Thread.sleep() before mTransportManager is initialized in constructor and tirgger PACKAGE_CHANGED event. Verify broadcast receiver callback is not triggered. Change-Id: If1628628176a08a2d33d020ce270de92b606d6df
Loading
Please register or sign in to comment