Refactored onServiceConnected in MainActivity