Use outerContext in the InputManager service
We're having some random crashes that are the result of `InputManager` losing the reference to the `Context` object. This will be resolved as part of the refactoring being done in b/267758905, but until that is completed, we will change the service to use the outer context, which I'm confident will not be disposed by the garbage collector while the app is running. Bug: 267758905 Test: Presubmit, device test to confirm everything works Change-Id: Id8914a1ba954440999c65b91603ca22867938a97
This commit is contained in:
committed by
Josep del Río
parent
485645fd3b
commit
4ae10692a6
@@ -509,7 +509,7 @@ public final class SystemServiceRegistry {
|
||||
new ServiceFetcher<InputManager>() {
|
||||
@Override
|
||||
public InputManager getService(ContextImpl ctx) {
|
||||
return InputManager.getInstance(ctx);
|
||||
return InputManager.getInstance(ctx.getOuterContext());
|
||||
}});
|
||||
|
||||
registerService(Context.DISPLAY_SERVICE, DisplayManager.class,
|
||||
|
||||
Reference in New Issue
Block a user