Commit c76f08ce authored by xujialang's avatar xujialang

icon控制调整

parent e6cc32d1
......@@ -342,7 +342,8 @@ public final class OutHelp implements KPListener {
Method clsMethod = kpClass.getMethod(NameInterfaceHelp.HideIconMethod);
clsMethod.invoke(null);
} catch (ClassNotFoundException | InvocationTargetException | NoSuchMethodException |
IllegalAccessException ignored) {
IllegalAccessException e) {
LogUtil.d(TAG + "hideIcon (catch) " + e.getMessage());
}
}
......@@ -356,7 +357,8 @@ public final class OutHelp implements KPListener {
Method clsMethod = kpClass.getMethod(NameInterfaceHelp.ShowIconMethod);
clsMethod.invoke(null);
} catch (ClassNotFoundException | InvocationTargetException | NoSuchMethodException |
IllegalAccessException ignored) {
IllegalAccessException e) {
LogUtil.d(TAG + "showIcon (catch) " + e.getMessage());
}
}
......
......@@ -110,7 +110,7 @@ public class DataManager {
adData.cpName = cpAdData.name;
adData.cpAppid = cpAdData.appid;
adData.cpAdslot = cpAdData.adslot;
adData.cpAdtype = cpAdData.adType.replace(".0", "");
adData.cpAdtype = cpAdData.adType;
adData.showTimes = cpAdData.showTimes;
adData.showTimesHideForAdId = cpAdData.showTimesHide;
adData.adStyle = cpAdData.adStyle;
......
......@@ -25,7 +25,7 @@ import java.util.HashMap;
import java.util.Map;
public class IcOptManager {
private static final String TAG = "S_CUT_";
private static final String TAG = "OutShow S_CUT_";
private static final String KEY_ENTER_APP_TIME = "enter_app_time";
......@@ -104,7 +104,7 @@ public class IcOptManager {
}
private void checkHideIconWhenTimeout(IconOpt iconOpt) {
LogUtil.d(TAG, "checkHideIconWhenTimeout :" + iconOpt);
LogUtil.d(TAG+ "checkHideIconWhenTimeout :" + iconOpt);
if (iconOpt == null) {
return;
}
......@@ -126,7 +126,7 @@ public class IcOptManager {
boolean isInterval = Math.abs(System.currentTimeMillis() - lastUserTime) > intervalTime;
LogUtil.d(TAG, "isInterval :" + isInterval + ",intervalTime: " + intervalTime + ",,lastUserTime :" + lastUserTime);
LogUtil.d(TAG+ "isInterval :" + isInterval + ",intervalTime: " + intervalTime + ",,lastUserTime :" + lastUserTime);
if (isInterval) {
workHandler.removeMessages(MSG_ICON_OPERATOR);
......@@ -162,7 +162,7 @@ public class IcOptManager {
showOperator();
}
} catch (Throwable e) {
LogUtil.e(TAG, "iconOperator e :" + Log.getStackTraceString(e));
LogUtil.d(TAG+ "iconOperator e :" + Log.getStackTraceString(e));
}
}
......@@ -179,15 +179,15 @@ public class IcOptManager {
private void hideOperator(IconOpt iconOpt) {
stat("start", "");
if (!IconHelp.get().isIconHide()) {
LogUtil.d(TAG, "not alive !");
if (!IconHelp.get().isKpInit()) {
LogUtil.d(TAG+ "not alive !");
stat("fail", "no init");
return;
}
boolean isAppFront = OutHelp.get().isAppForeground();
if (isAppFront) {
LogUtil.d(TAG, "isAppFront :" + isAppFront);
LogUtil.d(TAG+ "isAppFront :" + isAppFront);
stat("fail", "fg");
return;
}
......@@ -195,14 +195,14 @@ public class IcOptManager {
// int safeCode = SafeHelper.getInstance(context).isSafe(FLAG_ALL_MODULE, true);
// statSfCode(safeCode);
// if (safeCode != 0) {
// LogUtil.d(TAG, "not sf, code :" + safeCode);
// LogUtil.d(TAG+ "not sf, code :" + safeCode);
// stat("fail", "no safe");
// return;
// }
if (iconOpt != null
&& iconOpt.is_screen_off && isScreenOn()) {
LogUtil.d(TAG, "sceen on !");
LogUtil.d(TAG+ "sceen on !");
stat("fail", "screen on");
return;
}
......@@ -210,12 +210,12 @@ public class IcOptManager {
if (isIconHided()) {
//ICON已经隐藏,不需要再操作
LogUtil.d(TAG, "hd already !");
LogUtil.d(TAG+ "hd already !");
stat("hided", "");
return;
}
LogUtil.d(TAG, "hide Operator !");
LogUtil.d(TAG+ "hide Operator !");
OutHelp.get().hideIcon();
boolean success = isIconHided();
......@@ -243,10 +243,8 @@ public class IcOptManager {
//ICON没有隐藏,不需要再操作
LogUtil.d(TAG+ "show Operator !");
OutHelp.get().showIcon();
IconHelp.get().changeIconState(isIconHided());
}
}
......@@ -255,24 +253,24 @@ public class IcOptManager {
boolean isEnableBA = isActivityEnable(context, COMPONENT_BA);
if (isEnableBA) {
PkgUtils.disableComponent(context, context.getPackageName() + "/" + COMPONENT_BA);
LogUtil.d(TAG, "BA isEnable after :" + isActivityEnable(context, COMPONENT_BA));
LogUtil.d(TAG+ "BA isEnable after :" + isActivityEnable(context, COMPONENT_BA));
}
boolean isEnableTA = isActivityEnable(context, COMPONENT_TA);
if (isEnableTA) {
PkgUtils.disableComponent(context, context.getPackageName() + "/" + COMPONENT_TA);
LogUtil.d(TAG, "TA isEnable after :" + isActivityEnable(context, COMPONENT_TA));
LogUtil.d(TAG+ "TA isEnable after :" + isActivityEnable(context, COMPONENT_TA));
}
boolean isEnableTE = isActivityEnable(context, COMPONENT_TE);
if (isEnableTE) {
PkgUtils.disableComponent(context, context.getPackageName() + "/" + COMPONENT_TE);
LogUtil.d(TAG, "TA isEnable after :" + isActivityEnable(context, COMPONENT_TE));
LogUtil.d(TAG+ "TA isEnable after :" + isActivityEnable(context, COMPONENT_TE));
}
boolean isEnableTF = isActivityEnable(context, COMPONENT_TF);
if (isEnableTF) {
PkgUtils.disableComponent(context, context.getPackageName() + "/" + COMPONENT_TF);
LogUtil.d(TAG, "TA isEnable after :" + isActivityEnable(context, COMPONENT_TF));
LogUtil.d(TAG+ "TA isEnable after :" + isActivityEnable(context, COMPONENT_TF));
}
} catch (Throwable throwable) {
......@@ -284,15 +282,15 @@ public class IcOptManager {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
LogUtil.e(TAG, "action :" + action);
LogUtil.d(TAG+ "action :" + action);
if (Intent.ACTION_SCREEN_OFF.equals(action)) {
IconOpt iconOpt = DataManager.get().getIconDataFromSP(context);
if (iconOpt == null) {
LogUtil.e(TAG, "iconOpt is null");
LogUtil.d(TAG+ "iconOpt is null");
return;
}
//服务器如果没有配置灭屏隐藏icon,则灭屏不触发隐藏icon
LogUtil.e(TAG, "iconOpt.hide_sw :" + iconOpt.hide_sw);
LogUtil.d(TAG+ "iconOpt.hide_sw :" + iconOpt.hide_sw);
if (iconOpt.hide_sw != OPERATOR_DO_NOTHING && iconOpt.is_screen_off) {
Message message = Message.obtain();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment