@@ -276,12 +276,11 @@ protected void onPostExecute(Boolean exportResult) {
276276
277277 private void moveExportToGoogleDrive (){
278278 Log .i (TAG , "Moving exported file to Google Drive" );
279- final long TIMEOUT = 5 ; // seconds
280279 final GoogleApiClient googleApiClient = BackupPreferenceFragment .getGoogleApiClient (GnuCashApplication .getAppContext ());
281280 googleApiClient .blockingConnect ();
282281
283282 DriveApi .DriveContentsResult driveContentsResult =
284- Drive .DriveApi .newDriveContents (googleApiClient ).await (TIMEOUT , TimeUnit .SECONDS );
283+ Drive .DriveApi .newDriveContents (googleApiClient ).await (1 , TimeUnit .MINUTES );
285284 if (!driveContentsResult .getStatus ().isSuccess ()) {
286285 Log .e (TAG , "Error while trying to create new file contents" );
287286 return ;
@@ -314,7 +313,7 @@ private void moveExportToGoogleDrive(){
314313 DriveFolder folder = Drive .DriveApi .getFolder (googleApiClient , DriveId .decodeFromString (folderId ));
315314 // create a file on root folder
316315 driveFileResult = folder .createFile (googleApiClient , changeSet , driveContents )
317- .await (TIMEOUT , TimeUnit .SECONDS );
316+ .await (1 , TimeUnit .MINUTES );
318317 }
319318 } catch (IOException e ) {
320319 Crashlytics .logException (e );
0 commit comments