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

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


package com.iLOOK.player.d;

import android.text.TextUtils;
import android.util.Log;
import cn.trinea.android.common.util.HttpUtils;
import com.iLOOK.player.MainActivity;
import com.iLOOK.player.util.f;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
public class c {
    private static ArrayList<String> a = new ArrayList<>();
    private static String[] c = {"2x2", "telekanal_2x2_moskva", null, "amedia_1", "a_media_ru_1", null, "amedia_2", "a_media_ru_2", null, "бойцовский_клуб", "boytsovskiy_klub", null, "домашний", "domashniy_telekanal_ru", null, "крым1", "1_krim_tv_ua", null, "наука_20", "nauka20_ru", null, "перец", "peretz_tv", null, "психология_21", "psikhologiya_21", null, "пятница", "pyat_nitsa_ru", null, "русский_бестселлер", "russkiy_bestseller_ru", null, "русский_детектив", "russkiy_detektiv_ru", null, "русский_роман", "russkiy_roman", null, "сарафан_тв", "sarafan_telekanal", null, "союз", "soyuz_ru", null, "спорт", "sport_ru", null, "спорт1", "sport1_ru", null, "страна", "strana_tv", null, "тв3", "tv3_ru", null, "тв_центр_международный", "tv_centr_ru_international", null, "тдк", "tdk_ru", null, "техно_24", "techno_24_ru", null, "тнт", "tnt_ru", null, "тнт_comedy", "tnt_ru_comedy", null, "tv1000", "viasat_tv1000", "", " +", "_plus", "", "нтв+", "ntv_plus", "", "нтв", "ntv_ru", "", "первый", "perviy", "", "техно", "techno", "", "юмор", "humor", ""};
    private f b = new f();

    public c() {
        b();
        a.b();
    }

    public static ArrayList<String> a() {
        b();
        return a;
    }

    private String b(String str) {
        String str2;
        boolean z = false;
        if (str == null) {
            return null;
        }
        String lowerCase = str.toLowerCase();
        String replaceAll = lowerCase.replaceAll("[\\s\\-]+", "_").replaceAll("[^\\w\\d+_]+", "");
        int i = 0;
        while (true) {
            if (i >= c.length) {
                str2 = lowerCase;
                break;
            } else if (c[i + 2] == null) {
                if (c[i].equals(replaceAll)) {
                    z = true;
                    str2 = c[i + 1];
                    break;
                }
                i += 3;
            } else if (replaceAll.contains(c[i])) {
                replaceAll = replaceAll.replace(c[i], c[i + 1]);
                str2 = lowerCase;
                break;
            } else {
                i += 3;
            }
        }
        String a2 = !z ? this.b.a(replaceAll) : str2;
        if (a2 == null) {
            return null;
        }
        int binarySearch = Collections.binarySearch(a, a2);
        if (binarySearch >= 0) {
            return a.get(binarySearch);
        }
        int i2 = -(binarySearch + 1);
        if (i2 >= a.size() || a.get(i2).indexOf(a2) != 0) {
            return null;
        }
        return a.get(i2);
    }

    private static boolean b() {
        BufferedReader bufferedReader;
        if (a.size() > 0) {
            return true;
        }
        BufferedReader bufferedReader2 = null;
        try {
            try {
                bufferedReader = new BufferedReader(new InputStreamReader(MainActivity.a.getAssets().open("logos.txt")));
                while (true) {
                    try {
                        String readLine = bufferedReader.readLine();
                        if (readLine == null) {
                            break;
                        }
                        a.add(readLine);
                    } catch (IOException e) {
                        e = e;
                        Log.e("LogosResolver", "Error reading logos.txt assets file: " + e.getMessage());
                        if (bufferedReader != null) {
                            try {
                                bufferedReader.close();
                            } catch (IOException e2) {
                                Log.e("LogosResolver", "Error closing logos.txt assets file: " + e2.getMessage());
                            }
                        }
                        if (a.size() > 0) {
                        }
                    }
                }
                if (bufferedReader != null) {
                    try {
                        bufferedReader.close();
                    } catch (IOException e3) {
                        Log.e("LogosResolver", "Error closing logos.txt assets file: " + e3.getMessage());
                    }
                }
            } catch (Throwable th) {
                th = th;
                if (0 != 0) {
                    try {
                        bufferedReader2.close();
                    } catch (IOException e4) {
                        Log.e("LogosResolver", "Error closing logos.txt assets file: " + e4.getMessage());
                    }
                }
                throw th;
            }
        } catch (IOException e5) {
            e = e5;
            bufferedReader = null;
        } catch (Throwable th2) {
            th = th2;
            if (0 != 0) {
            }
            throw th;
        }
        if (a.size() > 0) {
            return false;
        }
        Collections.sort(a);
        return true;
    }

    public String a(String str) {
        if (str == null || str.length() == 0) {
            return null;
        }
        char charAt = str.charAt(0);
        return Character.isDigit(charAt) ? "http://multiaccessories.net/logo/num/" + str + ".png" : "http://multiaccessories.net/logo/" + charAt + charAt + HttpUtils.PATHS_SEPARATOR + str + ".png";
    }

    public void a(com.iLOOK.player.h.a aVar, boolean z) {
        if (aVar == null || aVar.r == null) {
            return;
        }
        String b = a.b(aVar.r);
        if (TextUtils.isEmpty(b)) {
            aVar.w = b(aVar.r);
            return;
        }
        aVar.w = b;
        if (z && aVar.n && aVar.x == null) {
            aVar.x = b(aVar.r);
        }
    }
}