package com.letv.android.client.push;

import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
import com.letv.ads.ex.utils.PlayConstantUtils.SPConstant;
import com.letv.android.client.push.LetvWindowDialog.LetvWindowDialogListener;
import com.letv.android.client.utils.MainLaunchUtils;
import com.letv.android.client.utils.UIs;
import com.letv.core.bean.AlbumInfo.Channel;
import com.letv.core.bean.PushData;
import com.letv.core.constant.LetvConstant.DialogMsgConstantId;
import com.letv.core.db.PreferencesManager;
import com.letv.core.utils.LogInfo;
import com.letv.core.utils.StatisticsUtils;
import com.letv.core.utils.StringUtils;
import com.letv.core.utils.TipUtils;
import com.letv.core.utils.UIsUtils;
import com.letv.hackdex.VerifyLoad;
import com.letv.hotfixlib.HotFix;
import com.letv.mobile.lebox.jump.PageJumpUtil;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class DialogService extends Service {
    public static final String FORCE_ALERT_MESSAGE = "message";
    public static final String FORCE_ALERT_TITLE = "title";
    public static final String FORCE_ALERT_TYPE = "dialog_type";
    public static int MOVE_LENGTH = 15;
    public static final int NOTIFICATION_ID = 109001;
    private static final Class<?>[] mSetForegroundSignature = new Class[]{Boolean.TYPE};
    private static final Class<?>[] mStartForegroundSignature = new Class[]{Integer.TYPE, Notification.class};
    private static final Class<?>[] mStopForegroundSignature = new Class[]{Boolean.TYPE};
    private float StartX;
    private float StartY;
    private boolean isAdded;
    private Bundle mBundle;
    private DialogType mDialogType;
    private Handler mHandler;
    int mHeight;
    private LetvWindowDialogListener mListener;
    private NotificationManager mNM;
    private Method mSetForeground;
    private Object[] mSetForegroundArgs;
    private Method mStartForeground;
    private Object[] mStartForegroundArgs;
    private Method mStopForeground;
    private Object[] mStopForegroundArgs;
    private float mTouchStartX;
    private float mTouchStartY;
    private int state;
    private Le