|
|
@@ -1,6 +1,5 @@
|
|
|
package com.ntels.onecable.common.handler;
|
|
|
|
|
|
-import com.ntels.onecable.R;
|
|
|
import com.ntels.onecable.common.Constants;
|
|
|
import com.ntels.onecable.common.util.Dlog;
|
|
|
import com.ntels.onecable.common.util.Util;
|
|
|
@@ -13,8 +12,6 @@ import java.lang.reflect.Field;
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
import java.lang.reflect.Method;
|
|
|
|
|
|
-import static com.ntels.onecable.common.handler.BackPressCloseHandler.BACK_PRESS_VALID_TIME;
|
|
|
-
|
|
|
/**
|
|
|
* Created by jinochoi on 2017. 3. 31..
|
|
|
*/
|
|
|
@@ -31,17 +28,6 @@ public class CallWithDelayHandler {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public void callWithDelay() {
|
|
|
- if (System.currentTimeMillis() > mBackKeyPressedTime + BACK_PRESS_VALID_TIME) {
|
|
|
- mBackKeyPressedTime = System.currentTimeMillis();
|
|
|
- showGuide();
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (System.currentTimeMillis() <= mBackKeyPressedTime + BACK_PRESS_VALID_TIME) {
|
|
|
- mActivity.finish();
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
public void callFinishWithDelay(String isMethodName) {
|
|
|
|
|
|
@@ -207,10 +193,6 @@ public class CallWithDelayHandler {
|
|
|
method.invoke(mActivity);
|
|
|
}
|
|
|
} else {
|
|
|
-// ActivityManager.RunningTaskInfo running = info.get(0);
|
|
|
-// ComponentName componentName = running.topActivity;
|
|
|
-// return cls.getName().equals(componentName.getClassName());
|
|
|
-//
|
|
|
if (!mActivity.isFinishing()) {
|
|
|
callWithDelayField(isFieldName, equalValue, callMethodName, delayTime);
|
|
|
}
|
|
|
@@ -238,20 +220,4 @@ public class CallWithDelayHandler {
|
|
|
return isReturn;
|
|
|
}
|
|
|
|
|
|
- private void showGuide() {
|
|
|
- mToast = mUtil.setShowToast(mActivity, mUtil.getString(mActivity, R.string.MSG823), Toast.LENGTH_SHORT);
|
|
|
- }
|
|
|
-
|
|
|
- private void runMethod(String methodName) {
|
|
|
- try {
|
|
|
- Method method = mActivity.getClass().getMethod(methodName);
|
|
|
- method.invoke(mActivity);
|
|
|
- } catch (NoSuchMethodException e) {
|
|
|
- e.printStackTrace();
|
|
|
- } catch (InvocationTargetException e) {
|
|
|
- e.printStackTrace();
|
|
|
- } catch (IllegalAccessException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
}
|