Stick Squad 3 v1.2.5.9版本的 MD5 值为:375cf7f77a7075270cd68d1397368279

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


package y.z.a;

import air.StickSquad3Android.R;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Looper;
import android.provider.Settings;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.AbsListView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RatingBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.google.android.gms.common.GooglePlayServicesUtil;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Timer;
import java.util.concurrent.atomic.AtomicInteger;

public class G extends Activity {
    private static String g;
    private static String h;
    private static float i;
    Timer e;
    private p k;
    private static final AtomicInteger f = new AtomicInteger(1);
    private static final String j = String.format("http://solola.undo.it/ads?appid=%s&placement=%s&platform=android", "monstertruck", "App Wall");
    static int a = R.drawable.a;
    static int b = R.drawable.b;

    static int f501c = R.drawable.f2c;
    static int d = R.drawable.d;

    public static View a(ViewGroup viewGroup) {
        ImageView imageView = new ImageView(viewGroup.getContext());
        ImageView imageView2 = new ImageView(viewGroup.getContext());
        ImageView imageView3 = new ImageView(viewGroup.getContext());
        imageView3.setId(1);
        imageView2.setImageResource(a);
        imageView3.setImageResource(d);
        imageView.setId(2);
        int i2 = (int) (5.0f * i);
        int i3 = (int) (10.0f * i);
        imageView.setPadding(i2, i2, i2, i2);
        RelativeLayout relativeLayout = new RelativeLayout(viewGroup.getContext());
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams((int) (96.0f * i), (int) (96.0f * i));
        relativeLayout.setBackgroundResource(f501c);
        layoutParams.addRule(9);
        layoutParams.setMargins(i3, i3, i3, i3);
        TextView textView = new TextView(viewGroup.getContext());
        textView.setId(1);
        textView.setTextSize(20.0f);
        textView.setTextColor(Color.parseColor("#A7A7A7"));
        LinearLayout linearLayout = new LinearLayout(viewGroup.getContext());
        linearLayout.setOrientation(1);
        RatingBar ratingBar = new RatingBar(viewGroup.getContext(), null, android.R.attr.ratingBarStyleSmall);
        ratingBar.setIsIndicator(true);
        ratingBar.setNumStars(5);
        ratingBar.setStepSize(1.0f);
        ratingBar.setId(3);
        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-2, -2);
        linearLayout.addView(textView, layoutParams2);
        linearLayout.addView(ratingBar, layoutParams2);
        RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(-1, -1);
        layoutParams3.addRule(1, 2);
        layoutParams3.addRule(15);
        layoutParams3.setMargins(i2, 0, i2, 0);
        layoutParams3.addRule(0, 1);
        RelativeLayout.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams((int) (64.0f * i), (int) (64.0f * i));
        layoutParams4.addRule(11);
        RelativeLayout.LayoutParams layoutParams5 = new RelativeLayout.LayoutParams((int) (32.0f * i), (int) (32.0f * i));
        layoutParams5.addRule(11);
        layoutParams5.addRule(15);
        layoutParams5.setMargins(0, 0, i3 * 2, 0);
        imageView.setPadding(i2, i2, i2, i2);
        imageView.setAdjustViewBounds(true);
        imageView3.setAdjustViewBounds(true);
        relativeLayout.addView(imageView, layoutParams);
        relativeLayout.addView(linearLayout, layoutParams3);
        relativeLayout.addView(imageView2, layoutParams4);
        relativeLayout.addView(imageView3, layoutParams5);
        FrameLayout frameLayout = new FrameLayout(viewGroup.getContext());
        FrameLayout.LayoutParams layoutParams6 = new FrameLayout.LayoutParams(-1, -1);
        layoutParams6.gravity = 1;
        frameLayout.addView(relativeLayout, layoutParams6);
        return frameLayout;
    }

    public static String a(InputStream inputStream, String str) {
        StringBuilder sb = new StringBuilder();
        InputStreamReader inputStreamReader = new InputStreamReader(inputStream, str);
        char[] cArr = new char[4096];
        while (true) {
            int read = inputStreamReader.read(cArr);
            if (read == -1) {
                return sb.toString();
            }
            sb.append(cArr, 0, read);
        }
    }

    public static j a(Context context) {
        if (Looper.myLooper() == Looper.getMainLooper()) {
            throw new IllegalStateException("Cannot be called from the main thread");
        }
        try {
            context.getPackageManager().getPackageInfo(GooglePlayServicesUtil.GOOGLE_PLAY_STORE_PACKAGE, 0);
            k kVar = new k(null);
            Intent intent = new Intent("com.google.android.gms.ads.identifier.service.START");
            intent.setPackage(GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_PACKAGE);
            try {
                if (!context.bindService(intent, kVar, 1)) {
                    throw new IOException("Google Play connection failed");
                }
                try {
                    l lVar = new l(kVar.a());
                    return new j(lVar.a(), lVar.a(true));
                } catch (Exception e) {
                    throw e;
                }
            } finally {
                context.unbindService(kVar);
            }
        } catch (Exception e2) {
            throw e2;
        }
    }

    public void a(o oVar) {
        if (this.e != null) {
            this.e.cancel();
        }
        this.e = new Timer();
        this.e.schedule(new n(this, oVar), 10000L);
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        try {
            getWindow().getDecorView().setBackgroundColor(Color.parseColor("#CCCCCC"));
            if (bundle == null) {
                WebView webView = new WebView(this);
                addContentView(webView, new ViewGroup.LayoutParams(0, 0));
                new Thread(new b(this)).start();
                List<PackageInfo> installedPackages = getPackageManager().getInstalledPackages(0);
                ArrayList arrayList = new ArrayList();
                Iterator<PackageInfo> it = installedPackages.iterator();
                while (it.hasNext()) {
                    arrayList.add(it.next().packageName);
                }
                h = Settings.Secure.getString(getContentResolver(), "android_id");
                i = getResources().getDisplayMetrics().density;
                int i2 = (int) (10.0f * i);
                ListView listView = new ListView(this);
                listView.setCacheColorHint(0);
                listView.setDivider(null);
                listView.setOnItemClickListener(new c(this, webView));
                setContentView(listView, new ViewGroup.LayoutParams(-1, -1));
                View view = new View(this);
                view.setLayoutParams(new AbsListView.LayoutParams(-1, (int) (i * 50.0f)));
                listView.addHeaderView(view);
                RelativeLayout relativeLayout = new RelativeLayout(this);
                TextView textView = new TextView(this);
                ImageView imageView = new ImageView(this);
                imageView.setImageResource(b);
                imageView.setOnClickListener(new e(this));
                textView.setText("Best free apps for you!");
                textView.setTextColor(-1);
                textView.setTextSize(2, 22.0f);
                textView.setTypeface(null, 1);
                RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
                textView.setGravity(19);
                textView.setPadding(i2, 0, i2, 0);
                layoutParams.addRule(9);
                layoutParams.addRule(15);
                relativeLayout.addView(textView, layoutParams);
                RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams((int) (i * 24.0f), (int) (i * 24.0f));
                layoutParams2.addRule(11);
                layoutParams2.addRule(15);
                layoutParams2.setMargins(i2, 0, i2, 0);
                relativeLayout.addView(imageView, layoutParams2);
                relativeLayout.setBackgroundColor(Color.parseColor("#B0007BEF"));
                addContentView(relativeLayout, new ViewGroup.LayoutParams(-1, (int) (i * 50.0f)));
                new Thread(new f(this, arrayList, listView)).start();
            }
        } catch (Exception e) {
            finish();
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        new Thread(new i(this)).start();
    }
}