ImojiWebViewActivity.java 2.85 KB
package com.bitstrips.imoji.ui;

import android.content.Intent;
import android.net.MailTo;
import android.net.Uri;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import java.util.Locale;

public class ImojiWebViewActivity
  extends BitmojiBaseActivity
{
  WebView n;
  
  public void onCreate(final Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903131);
    paramBundle = getIntent();
    setSupportActionBar((Toolbar)findViewById(2131689623));
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    setTitle(paramBundle.getStringExtra("android.intent.extra.TITLE"));
    if (paramBundle.getData() == null) {
      throw new NullPointerException("Data URI must be provided");
    }
    this.n = ((WebView)findViewById(2131689696));
    this.n.setWebViewClient(new WebViewClient()
    {
      public final boolean shouldOverrideUrlLoading(WebView paramAnonymousWebView, String paramAnonymousString)
      {
        if (MailTo.isMailTo(paramAnonymousString))
        {
          paramAnonymousWebView = MailTo.parse(paramAnonymousString);
          paramAnonymousString = new Intent("android.intent.action.SENDTO", Uri.fromParts("mailto", paramAnonymousWebView.getTo(), null));
          paramAnonymousString.putExtra("android.intent.extra.SUBJECT", paramAnonymousWebView.getSubject());
          paramAnonymousString.putExtra("android.intent.extra.TEXT", String.format(Locale.US, "Device: %s %s %s\nOS: %d\nImoji Android v%s\n\n%s:\n", new Object[] { Build.MANUFACTURER, Build.MODEL, Build.PRODUCT, Integer.valueOf(Build.VERSION.SDK_INT), "10.29.98", ImojiWebViewActivity.this.getString(2131230879) }));
          ImojiWebViewActivity.this.startActivity(paramAnonymousString);
          return true;
        }
        return super.shouldOverrideUrlLoading(paramAnonymousWebView, paramAnonymousString);
      }
    });
    this.n.getSettings().setJavaScriptEnabled(true);
    new Handler().postDelayed(new Runnable()
    {
      public final void run()
      {
        ImojiWebViewActivity.this.n.loadUrl(paramBundle.getData().toString());
      }
    }, 0L);
  }
  
  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    switch (paramMenuItem.getItemId())
    {
    default: 
      return super.onOptionsItemSelected(paramMenuItem);
    }
    finish();
    return true;
  }
  
  protected void onPause()
  {
    super.onPause();
  }
  
  public void onResume()
  {
    super.onResume();
  }
}


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