|
...
|
...
|
@@ -55,7 +55,6 @@ import com.gimi.common.cinema.model.LocalMovieMessage; |
|
55
|
55
|
import com.gimi.common.cinema.utils.AuthUtils;
|
|
56
|
56
|
import com.gimi.common.cinema.utils.LeeImageLoader;
|
|
57
|
57
|
import com.gimi.common.cinema.utils.M1905Utils;
|
|
58
|
|
-import com.gimi.common.cinema.utils.SambaFileCharge;
|
|
59
|
58
|
import com.gimi.common.cinema.utils.ScreenUtils;
|
|
60
|
59
|
import com.gimi.common.cinema.utils.SystemUtils;
|
|
61
|
60
|
import com.qnbar.smc.model.Light;
|
|
...
|
...
|
@@ -99,8 +98,6 @@ import java.util.Locale; |
|
99
|
98
|
public class MainActivity extends BaseActivity implements IMainView, EventListener<String> {
|
|
100
|
99
|
|
|
101
|
100
|
private static final String TAG = "MainActivity";
|
|
102
|
|
- private static final long NO_KEY_EVENT_MSEC = 30 * 1000;
|
|
103
|
|
-
|
|
104
|
101
|
private Context context;
|
|
105
|
102
|
|
|
106
|
103
|
private ImageView controlQrCodeIv;
|
|
...
|
...
|
@@ -354,10 +351,6 @@ public class MainActivity extends BaseActivity implements IMainView, EventListen |
|
354
|
351
|
}
|
|
355
|
352
|
}
|
|
356
|
353
|
needStartScreenSaver = true;
|
|
357
|
|
- if (handler != null) {
|
|
358
|
|
- handler.removeCallbacks(startAdsRunnable);
|
|
359
|
|
- handler.postDelayed(startAdsRunnable, 30 * 1000);
|
|
360
|
|
- }
|
|
361
|
354
|
if (HAS_SYSTEM_FEATURE_BLUETOOTH_LE) {
|
|
362
|
355
|
IntentFilter intentFilter = new IntentFilter();
|
|
363
|
356
|
intentFilter.addAction(BLEBroadcastReceiver.ACTION_BLE_ERROR);
|
|
...
|
...
|
@@ -402,11 +395,6 @@ public class MainActivity extends BaseActivity implements IMainView, EventListen |
|
402
|
395
|
|
|
403
|
396
|
@Override
|
|
404
|
397
|
public boolean onGenericMotionEvent(MotionEvent event) {
|
|
405
|
|
- lastKeyDownTime = System.currentTimeMillis();
|
|
406
|
|
- if (handler != null) {
|
|
407
|
|
- handler.removeCallbacks(startAdsRunnable);
|
|
408
|
|
- handler.postDelayed(startAdsRunnable, NO_KEY_EVENT_MSEC);
|
|
409
|
|
- }
|
|
410
|
398
|
return super.onGenericMotionEvent(event);
|
|
411
|
399
|
}
|
|
412
|
400
|
|
|
...
|
...
|
@@ -614,35 +602,6 @@ public class MainActivity extends BaseActivity implements IMainView, EventListen |
|
614
|
602
|
presenter.jumpToSearch();
|
|
615
|
603
|
}
|
|
616
|
604
|
|
|
617
|
|
- private Runnable startAdsRunnable = new Runnable() {
|
|
618
|
|
- @Override
|
|
619
|
|
- public void run() {
|
|
620
|
|
- if (!Constant.gimiAuth) {
|
|
621
|
|
- return;
|
|
622
|
|
- }
|
|
623
|
|
- if (true) {
|
|
624
|
|
- return;
|
|
625
|
|
- }
|
|
626
|
|
- if (AuthUtils.isFinish(context)) {
|
|
627
|
|
- return;
|
|
628
|
|
- }
|
|
629
|
|
- handler.postDelayed(this, NO_KEY_EVENT_MSEC);
|
|
630
|
|
- if ((System.currentTimeMillis() - lastKeyDownTime) > NO_KEY_EVENT_MSEC) {
|
|
631
|
|
- if (needStartScreenSaver) {
|
|
632
|
|
- if (SambaFileCharge.fileExist(videoAds) && Constant.messageRun) {
|
|
633
|
|
- needStartScreenSaver = false;
|
|
634
|
|
- Intent intent = new Intent(context, SimpleAdsPlayer2.class);
|
|
635
|
|
- intent.putExtra("ads_path", videoAds);
|
|
636
|
|
- startActivity(intent);
|
|
637
|
|
- presenter.getVideoAdsPath(context);
|
|
638
|
|
- } else {
|
|
639
|
|
- presenter.getVideoAdsPath(context);
|
|
640
|
|
- }
|
|
641
|
|
- }
|
|
642
|
|
- }
|
|
643
|
|
- }
|
|
644
|
|
- };
|
|
645
|
|
-
|
|
646
|
605
|
@Override
|
|
647
|
606
|
protected void onDestroy() {
|
|
648
|
607
|
super.onDestroy();
|
...
|
...
|
|