iLOOK v1.4.0版本的 MD5 值为:510186eccd64772a217d6b415c411c73

以下内容为反编译后的 g.java 源代码,内容仅作参考


package com.iLOOK.player;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.Properties;
import tv.danmaku.ijk.media.player.R;
public class g {
    private boolean a = false;
    private String b = null;
    private String c = null;

    public static void a() {
        new g().b();
    }

    private void b() {
        this.b = null;
        this.c = null;
        if (com.iLOOK.player.util.g.a(MainActivity.a.getFilesDir().getAbsolutePath() + File.separator + "ppaLastVer.info", "http://iLOOK.com/files/ppaLastVer.info", 4000, 4000)) {
            Properties properties = new Properties();
            try {
                properties.load(MainActivity.a.openFileInput("ppaLastVer.info"));
                int parseInt = Integer.parseInt(properties.getProperty("VersionCode"));
                if (parseInt > 350) {
                    long currentTimeMillis = System.currentTimeMillis();
                    if (currentTimeMillis - new SimpleDateFormat("yyyyMMddHHmmss", Locale.US).parse(properties.getProperty("VersionDate")).getTime() >= 259200000) {
                        int i = MainActivity.c.getInt("pref_key_new_version_code_notified", 0);
                        long j = MainActivity.c.getLong("pref_key_new_version_last_notified", 0L);
                        if (parseInt != i || currentTimeMillis - j >= 604800000) {
                            this.b = properties.getProperty("VersionName", "");
                            this.c = properties.getProperty("VersionURL");
                            SharedPreferences.Editor edit = MainActivity.c.edit();
                            edit.putInt("pref_key_new_version_code_notified", parseInt);
                            edit.putLong("pref_key_new_version_last_notified", currentTimeMillis);
                            edit.apply();
                            c();
                        }
                    }
                }
            } catch (IOException e) {
                Log.w("UpdateChecker", "File 'ppaLastVer.info not found'", e);
            } catch (Exception e2) {
                Log.w("UpdateChecker", "Exception", e2);
            }
        }
    }

    private void c() {
        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
            @Override
            public void run() {
                AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.b);
                builder.setTitle(MainActivity.a.getString(R.string.text_update));
                builder.setMessage(MainActivity.a.getString(R.string.text_update_to_newer_version) + "\nPerfect Player " + g.this.b);
                builder.setPositiveButton(MainActivity.a.getString(R.string.text_update), new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        if (g.this.c != null) {
                            MainActivity.b.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(g.this.c)));
                        }
                        if (g.this.a) {
                            MainActivity.b.finish();
                        } else {
                            dialogInterface.cancel();
                        }
                    }
                });
                builder.setNegativeButton(17039360, new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        if (g.this.a) {
                            MainActivity.b.finish();
                        } else {
                            dialogInterface.cancel();
                        }
                    }
                });
                if (g.this.a) {
                    builder.setCancelable(false);
                }
                builder.create().show();
            }
        }, 30000L);
    }
}