intelli_plug : cherry-picked from nexus5
many things changed...