Merge "Improve input device wake heuristics. Bug: 5205674"