// Path: mobile/src/main/java/io/ashdavies/eternity/google/GoogleSignInException.java
// public class GoogleSignInException extends Throwable {
// 
//   private final GoogleSignInResult result;
// 
//   public GoogleSignInException(GoogleSignInResult result) {
//     super(result.getStatus().getStatusMessage());
//     this.result = result;
//   }
// 
//   public GoogleSignInResult getResult() {
//     return result;
//   }
// }


import android.content.Intent;
import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInResult;
import io.ashdavies.eternity.google.GoogleSignInException;
import io.reactivex.Single;
import io.reactivex.SingleEmitter;
import io.reactivex.SingleOnSubscribe;
package io.ashdavies.eternity.signin;


class GoogleSignInResultSingle implements SingleOnSubscribe<GoogleSignInAccount> {

  private final GoogleSignInResult result;

  private GoogleSignInResultSingle(GoogleSignInResult result) {
    this.result = result;
  }

// Path: mobile/src/main/java/io/ashdavies/eternity/google/GoogleSignInException.java
// public class GoogleSignInException extends Throwable {
// 
//   private final GoogleSignInResult result;
// 
//   public GoogleSignInException(GoogleSignInResult result) {
//     super(result.getStatus().getStatusMessage());
//     this.result = result;
//   }
// 
//   public GoogleSignInResult getResult() {
//     return result;
//   }
// }


// Path: mobile/src/main/java/io/ashdavies/eternity/signin/GoogleSignInResultSingle.java
import android.content.Intent;
import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInResult;
import io.ashdavies.eternity.google.GoogleSignInException;
import io.reactivex.Single;
import io.reactivex.SingleEmitter;
import io.reactivex.SingleOnSubscribe;

package io.ashdavies.eternity.signin;


class GoogleSignInResultSingle implements SingleOnSubscribe<GoogleSignInAccount> {

  private final GoogleSignInResult result;

  private GoogleSignInResultSingle(GoogleSignInResult result) {
    this.result = result;
  }

  static Single<GoogleSignInAccount> from(Intent data) {