Android Studio (as well as IntelliJ) provides the functionality of some smart keys, which can be found in
Settings> Editor> General> Smart keys> Select surround sound when entering a quote or parenthesis

If enabled, and the selected text is highlighted and the quotation mark is entered, the previously selected text is surrounded by quotation marks (single or double quotation marks work like any parentheses).
source share