def android_check_data_dir():
 ext_dir = android_ext_dir()
 data_dir = android_data_dir()
 old_electrum_dir = (ext_dir + '/electrum')
 if ((not os.path.exists(data_dir)) and os.path.exists(old_electrum_dir)):
  import shutil
  new_headers_path = android_headers_path()
  old_headers_path = (old_electrum_dir + '/blockchain_headers')
  if ((not os.path.exists(new_headers_path)) and os.path.exists(old_headers_path)):
   print_error('Moving headers file to', new_headers_path)
   shutil.move(old_headers_path, new_headers_path)
  print_error('Moving data to', data_dir)
  shutil.move(old_electrum_dir, data_dir)
 return data_dir

def android_check_data_dir ( ) : ext_dir = android_ext_dir ( ) data_dir = android_data_dir ( ) old_electrum_dir = ( ext_dir + '/electrum' ) if ( ( not os . path . exists ( data_dir ) ) and os . path . exists ( old_electrum_dir ) ) : import shutil new_headers_path = android_headers_path ( ) old_headers_path = ( old_electrum_dir + '/blockchain_headers' ) if ( ( not os . path . exists ( new_headers_path ) ) and os . path . exists ( old_headers_path ) ) : print_error ( 'Moving headers file to' , new_headers_path ) shutil . move ( old_headers_path , new_headers_path ) print_error ( 'Moving data to' , data_dir ) shutil . move ( old_electrum_dir , data_dir ) return data_dir
if needed .