If source file is read only, Android Studio was displaying a dialog and asking if I want to clear read-only status of file so that it will be ready for editing. By mistake I once checked the box that says "Do not show this dialog again" and clicked OK. Since then Android Studio simply clears off read-only status of file and allows to edit without asking for confirmation.
Anyone knows how to bring back that conformation dialog?
Press ctrl-shift-A
on windows, or ⇧⌘A
on mac and type "Clear Read-only Status". It will show you where you can make the change in settings.