// Path: mobile/src/main/java/io/ashdavies/eternity/android/StringResolver.java
// public class StringResolver {
// 
//   private final Resources resources;
// 
//   @Inject
//   public StringResolver(Resources resources) {
//     this.resources = resources;
//   }
// 
//   public String get(@StringRes int resId, Object... args) {
//     return resources.getString(resId, args);
//   }
// }
// 
// Path: mobile/src/main/java/io/ashdavies/eternity/google/GoogleApiProcessor.java
// public abstract class GoogleApiProcessor implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
// 
//   private final ReplayProcessor<Event> processor;
// 
//   protected GoogleApiProcessor() {
//     this(ReplayProcessor.create());
//   }
// 
//   private GoogleApiProcessor(ReplayProcessor<GoogleApiProcessor.Event> processor) {
//     this.processor = processor;
//   }
// 
//   public void onConnected(@Nullable Bundle bundle) {
//     processor.onNext(GoogleApiProcessor.Event.CONNECTED);
//   }
// 
//   @Override
//   public void onConnectionSuspended(int cause) {
//     processor.onNext(GoogleApiProcessor.Event.SUSPENDED);
//   }
// 
//   @Override
//   public void onConnectionFailed(@NonNull ConnectionResult result) {
//     processor.onError(new ConnectionFailedException(result));
//   }
// 
//   public Flowable<Event> onConnectionEvent() {
//     return processor
//         .doOnSubscribe(subscription -> connect())
//         .doOnCancel(this::disconnect);
//   }
// 
//   protected abstract void connect();
// 
//   protected abstract void disconnect();
// 
//   public enum Event {
//     CONNECTED,
//     SUSPENDED
//   }
// }


import android.app.Application;
import android.content.Intent;
import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.common.api.GoogleApiClient;
import io.ashdavies.eternity.R;
import io.ashdavies.eternity.android.StringResolver;
import io.ashdavies.eternity.google.GoogleApiProcessor;
import javax.inject.Inject;
package io.ashdavies.eternity.signin;


class GoogleSignInApi extends GoogleApiProcessor {

  private final GoogleApiClient client;

  @Inject
// Path: mobile/src/main/java/io/ashdavies/eternity/android/StringResolver.java
// public class StringResolver {
// 
//   private final Resources resources;
// 
//   @Inject
//   public StringResolver(Resources resources) {
//     this.resources = resources;
//   }
// 
//   public String get(@StringRes int resId, Object... args) {
//     return resources.getString(resId, args);
//   }
// }
// 
// Path: mobile/src/main/java/io/ashdavies/eternity/google/GoogleApiProcessor.java
// public abstract class GoogleApiProcessor implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
// 
//   private final ReplayProcessor<Event> processor;
// 
//   protected GoogleApiProcessor() {
//     this(ReplayProcessor.create());
//   }
// 
//   private GoogleApiProcessor(ReplayProcessor<GoogleApiProcessor.Event> processor) {
//     this.processor = processor;
//   }
// 
//   public void onConnected(@Nullable Bundle bundle) {
//     processor.onNext(GoogleApiProcessor.Event.CONNECTED);
//   }
// 
//   @Override
//   public void onConnectionSuspended(int cause) {
//     processor.onNext(GoogleApiProcessor.Event.SUSPENDED);
//   }
// 
//   @Override
//   public void onConnectionFailed(@NonNull ConnectionResult result) {
//     processor.onError(new ConnectionFailedException(result));
//   }
// 
//   public Flowable<Event> onConnectionEvent() {
//     return processor
//         .doOnSubscribe(subscription -> connect())
//         .doOnCancel(this::disconnect);
//   }
// 
//   protected abstract void connect();
// 
//   protected abstract void disconnect();
// 
//   public enum Event {
//     CONNECTED,
//     SUSPENDED
//   }
// }


// Path: mobile/src/main/java/io/ashdavies/eternity/signin/GoogleSignInApi.java
import android.app.Application;
import android.content.Intent;
import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.common.api.GoogleApiClient;
import io.ashdavies.eternity.R;
import io.ashdavies.eternity.android.StringResolver;
import io.ashdavies.eternity.google.GoogleApiProcessor;
import javax.inject.Inject;

package io.ashdavies.eternity.signin;


class GoogleSignInApi extends GoogleApiProcessor {

  private final GoogleApiClient client;

  @Inject
  GoogleSignInApi(Application application, StringResolver resolver) {