import com.enqualcomm.support.service.AntiMonitorService;
import com.enqualcomm.support.service.AudioService;
import com.enqualcomm.support.service.Deliver;
+import com.enqualcomm.support.service.SilentManager;
import com.ic.protocols.protocolAPIHelper;
import com.ic.protocols.protocol_s123;
import com.ic.view.battery.BatteryLowLevTipsView;
mRuntime.setHaveBatteryChange(false);
mRuntime.setBatteryLow(false);
} else if (batLevel < 25 && batLevel > 15) {
- ChargeTipsView.getInstance().dismiss();
+ //ChargeTipsView.getInstance().dismiss();
+ Intent intent = new Intent();
+ intent.putExtra("openOrClose", "close");
+ mRuntime.getContextProxy().sendBroadcast("com.ic.action.TOAST_CHARGE_TIPS", intent);
mRuntime.setBattery(String.format("%03d", batLevel));
mRuntime.setBattery(batLevel);
mRuntime.setHaveBatteryChange(true);
mRuntime.setBatteryLow(false);
} else if (batLevel <= 15 && batLevel > 10) {
- ChargeTipsView.getInstance().showDialog();
+ //提示充电界面
+ //ChargeTipsView.getInstance().showDialog();
+ //以上由Launcher去完成,因为需要跳转到拨号,不可以为顶级弹窗,否则就盖住了
+ boolean idle = SilentManager.getInstance().isIdle(mRuntime.getContextProxy().context);
+ Intent intent = new Intent();
+ //如果是上课禁用状态,则不可以紧急拨号
+ intent.putExtra("idle", idle);
+ intent.putExtra("openOrClose", "open");
+ mRuntime.getContextProxy().sendBroadcast("com.ic.action.TOAST_CHARGE_TIPS", intent);
+ //以上在Launcher接收,然后弹出
BatteryLowLevTipsView.getInstance().dismiss();
ICLogger.d("on lower power please get charge...");
if (Config.LOG_TOFILE) ICLogger.logToFile("Battery", "BatteryLow less than 15%!");