TermsChangedActivity.java 2.89 KB
package com.bitstrips.imoji.ui.activities;

import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import android.widget.Toast;
import com.bitstrips.imoji.InjectorApplication;
import com.bitstrips.imoji.api.BitmojiApi;
import com.bitstrips.imoji.manager.TOUManager;
import com.bitstrips.imoji.ui.BitmojiBaseActivity;
import javax.inject.Inject;
import retrofit.Callback;
import retrofit.RetrofitError;

public class TermsChangedActivity
  extends BitmojiBaseActivity
{
  public static final String EXTRAS_CURRENT_TOU_VERSION = "EXTRAS_CURRENT_TOU_VERSION";
  TextView n;
  TextView o;
  TextView p;
  @Inject
  BitmojiApi q;
  @Inject
  TOUManager r;
  
  public void onBackPressed()
  {
    Toast.makeText(this, getString(2131231048), 1).show();
  }
  
  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903072);
    ((InjectorApplication)getApplication()).inject(this);
    this.n = ((TextView)findViewById(2131689641));
    this.o = ((TextView)findViewById(2131689642));
    this.p = ((TextView)findViewById(2131689643));
    paramBundle = String.format(getString(2131231047), new Object[] { getString(2131231072), getString(2131231306) });
    this.n.setText(Html.fromHtml(paramBundle));
    this.n.setMovementMethod(LinkMovementMethod.getInstance());
    this.p.setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        TermsChangedActivity.this.showAlertDialog(TermsChangedActivity.this.getString(2131230994), TermsChangedActivity.this.getString(2131231054), new Runnable()new Runnable
        {
          public final void run()
          {
            TermsChangedActivity.this.logout();
            TermsChangedActivity.this.o.setEnabled(false);
          }
        }, new Runnable()
        {
          public final void run() {}
        });
      }
    });
    this.o.setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        int i = TermsChangedActivity.this.getIntent().getExtras().getInt("EXTRAS_CURRENT_TOU_VERSION");
        TermsChangedActivity.this.q.acceptTerms("", i, new Callback()
        {
          public final void failure(RetrofitError paramAnonymous2RetrofitError)
          {
            TermsChangedActivity.this.showAlertDialog(TermsChangedActivity.this.getString(2131231046), TermsChangedActivity.this.getString(2131231045), new Runnable()
            {
              public final void run() {}
            }, null);
          }
        });
      }
    });
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ui/activities/TermsChangedActivity.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */