private void r()
 {
   int i1 = 0;
   Object localObject = getIntent().getData();
   try
   {
     if (((Uri)localObject).toString().startsWith("smb://"))
     {
       m.setVideoURI((Uri)localObject);
       new URL(((Uri)localObject).toString()).openStream().close();
       return;
     }
     m.requestFocus();
     localObject = J;
     int i2 = t;
     if (g) {
       i1 = 1;
     }
     localObject = ((Handler)localObject).obtainMessage(2, i2, i1);
     g = false;
     J.sendMessageDelayed((Message)localObject, 500L);
     return;
   }
   catch (Exception localException) {}
 }
 private void o()
 {
   if (!a()) {
     ChromeCastPlayerNotificationHelper.a().j();
   }
   label107:
   do
   {
     return;
     if (!e)
     {
       if (f)
       {
         if (ac.a() >= 8)
         {
           new ao(m).a("resume");
           if (ac.a() >= 14) {
             m.seekTo(t);
           }
           if (com.estrongs.android.pop.view.a.a.startsWith("Spreadtrum"))
           {
             if (!j) {
               break label107;
             }
             u();
           }
         }
         for (;;)
         {
           f = false;
           t = 0;
           return;
           c = true;
           continue;
           u();
         }
       }
       if (g)
       {
         t = 0;
         g = false;
         return;
       }
       r();
       return;
     }
   } while (!e);
   r();
   t = 0;
   e = false;
 }
 private void m()
 {
   t = m.getCurrentPosition();
   if (J.hasMessages(7)) {
     J.removeMessages(7);
   }
   if (J.hasMessages(9)) {
     J.removeMessages(9);
   }
   if (b.getVisibility() == 0) {
     b.setVisibility(8);
   }
   new Thread(new jw(this)).start();
 }
 private void v()
 {
   try
   {
     m.a();
     if (F)
     {
       k.b();
       F = false;
     }
     return;
   }
   finally
   {
     localObject = finally;
     throw ((Throwable)localObject);
   }
 }
 private void u()
 {
   try
   {
     m.start();
     if (!J.hasMessages(9))
     {
       Message localMessage = J.obtainMessage(9);
       J.sendMessageDelayed(localMessage, 1000L);
     }
     if (!F)
     {
       k.a();
       F = true;
     }
     return;
   }
   finally {}
 }
 public void onSaveInstanceState(Bundle paramBundle)
 {
   t = m.getCurrentPosition();
   paramBundle.putInt("playback_position", t);
 }
 public void onCreate(Bundle paramBundle)
 {
   super.onCreate(paramBundle);
   setDefaultKeyMode(2);
   getWindow().setFlags(2000, 1024);
   setContentView(2130903380);
   p = new kl(this, this);
   m = ((ESVideoView)findViewById(2131625376));
   o = ((FrameLayout)findViewById(2131625377));
   o.setOnClickListener(new km(this));
   D = ((TextView)findViewById(2131625378));
   D.setText(getString(2131232491) + getString(2131231155));
   m.setMediaController(p);
   try
   {
     p.setEnabled(false);
     p.requestFocus();
     m.setOnCompletionListener(new kn(this));
     m.setOnErrorListener(new ko(this));
     m.setOnPreparedListener(new jh(this));
     m.setSeekListener(new ji(this));
     u = getIntent().getData();
     if ((ac.a() < 8) && (e())) {
       finish();
     }
     for (;;)
     {
       return;
       t = 0;
       g = false;
       if (com.estrongs.android.pop.view.a.a.startsWith("Spreadtrum")) {}
       try
       {
         registerReceiver(K, new IntentFilter("android.intent.action.SCREEN_OFF"));
         registerReceiver(L, new IntentFilter("android.intent.action.USER_PRESENT"));
         registerReceiver(M, new IntentFilter("android.intent.action.ACTION_SHUTDOWN"));
         b = findViewById(2131624351);
         w = c.a(this);
         if (!getIntent().getBooleanExtra("islocalopen", false)) {}
         try
         {
           w.d("act3");
           w.a("act3", "video_player");
           x = findViewById(2131625379);
           y = ((TextView)x.findViewById(2131625380));
           paramBundle = getIntent().getData();
           v = a(paramBundle);
           if (v != null) {
             y.setText(ap.d(v));
           }
           View localView = x;
           if (p.isShown())
           {
             i1 = 0;
             localView.setVisibility(i1);
             d = x.findViewById(2131625031);
             d.setOnClickListener(new jj(this));
             z = findViewById(2131624418);
             z.setOnClickListener(new jk(this));
             findViewById(2131625030).setOnClickListener(new jl(this));
             m.setVideoURI(paramBundle);
             if (n) {
               continue;
             }
             if (!getIntent().getBooleanExtra("Chromecast", false)) {
               break label648;
             }
             h();
             if (getIntent().getStringExtra("ChromecastUrl") != null) {
               a(true);
             }
             if (!a()) {
               continue;
             }
             if (!p.isShown()) {
               f();
             }
             new jm(this).start();
             return;
           }
         }
         catch (Exception paramBundle)
         {
           for (;;)
           {
             paramBundle.printStackTrace();
             continue;
             int i1 = 4;
             continue;
             label648:
             p();
             r();
           }
         }
       }
       catch (Exception paramBundle)
       {
         for (;;) {}
       }
     }
   }
   catch (Exception paramBundle)
   {
     for (;;) {}
   }
 }