| | |
| | | import com.hdl.photovoltaic.ui.bean.DeviceRemoteInfo; |
| | | import com.hdl.photovoltaic.ui.bean.HouseIdBean; |
| | | import com.hdl.photovoltaic.ui.bean.OidBean; |
| | | import com.hdl.photovoltaic.ui.newC.PowerStationsListActivity; |
| | | import com.hdl.photovoltaic.ui.newC.PowerStationsMoveActivity; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.uni.HDLUniMPSDKManager; |
| | | import com.hdl.photovoltaic.utils.AppManagerUtils; |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | //通知电站列表更新 |
| | | HdlCommonLogic.getInstance().postEventBus(ConstantManage.REFRESH_HOME_LIST, ConstantManage.REFRESH_HOME_LIST); |
| | | if (AppManagerUtils.getAppManager().existsTopActivity(PowerStationsListActivity.class, PowerStationsMoveActivity.class)) { |
| | | //存在栈里再通知更新 |
| | | HdlCommonLogic.getInstance().postEventBus(ConstantManage.REFRESH_HOME_LIST, ConstantManage.REFRESH_HOME_LIST); |
| | | } |
| | | HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); |
| | | } |
| | | |
| | |
| | | |
| | | private void initView() { |
| | | |
| | | viewBinding.toolbarTopRl.topTitleTv.setText(R.string.message_alarm_info); |
| | | viewBinding.toolbarTopRl.topTitleTv.setText(R.string.event_details); |
| | | viewBinding.toolbarTopRl.topBackLl.setVisibility(View.VISIBLE); |
| | | |
| | | |
| | | viewBinding.messageInfoEventTitleIn.leftTitleTv.setText(R.string.event_title); |
| | | viewBinding.messageInfoEventContentIn.leftTitleTv.setText(R.string.event_content); |
| | | viewBinding.messageInfoRemarkIn.leftTitleTv.setText(R.string.remark); |
| | | viewBinding.messageInfoAlarmDeviceIn.leftTitleTv.setText(R.string.messagealarm_details_device); |
| | | viewBinding.messageInfoAlarmDeviceIn.leftTitleTv.setText(R.string.event_device); |
| | | viewBinding.messageInfoPowerStationLocationIn.leftTitleTv.setText(R.string.message_alarm_detailspower_station_location); |
| | | viewBinding.messageInfoAlarmTimeIn.leftTitleTv.setText(R.string.message_alarm_details_time); |
| | | viewBinding.messageInfoAlarmTimeIn.leftTitleTv.setText(R.string.event_time); |
| | | viewBinding.messageInfoAlarmTreatmentOptionsIn.leftTitleTv.setText(R.string.treatment_options); |
| | | |
| | | viewBinding.messageInfoHomeNameTv.setText(mMessageBean.getHomeName()); |
| | |
| | | import com.hdl.photovoltaic.ui.device.ScanActivity; |
| | | import com.hdl.photovoltaic.ui.newC.adapter.HouseListAdapter; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.utils.AppManagerUtils; |
| | | import com.hdl.photovoltaic.utils.PermissionUtils; |
| | | import com.hdl.photovoltaic.widget.ConfirmationCancelDialog; |
| | | import com.hdl.photovoltaic.widget.DelayedConfirmationCancelDialog; |
| | |
| | | viewBinding.addPowerStationTv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | |
| | | // 未授权 如果应用程序没有所需的权限,则显示解释说明 |
| | | PermissionExplanationDialog.getInstance().showPortConflictPdDialog(_mActivity, getString(R.string.camera_storage_instructions), getString(R.string.camera_storage_purpose)); |
| | | PermissionUtils.requestPermissionsResultCallback(_mActivity, Manifest.permission.CAMERA, new PermissionUtils.PermissionState() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Activity是否在顶部 |
| | | */ |
| | | public boolean existsTopActivity(Class<?>... args) { |
| | | try { |
| | | if (activityStack == null || activityStack.size() == 0) { |
| | | return false; |
| | | } |
| | | final int index = activityStack.size() - 1; |
| | | for (Class<?> cls : args) { |
| | | if (activityStack.get(index).getClass().equals(cls)) { |
| | | return true; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 指定一个类名,从指定类名开始移除后面所有Activity |
| | | * |
| | | * @param className Activity-类名(activity.getClass().getName()) |
| | |
| | | } |
| | | |
| | | |
| | | public boolean existsActivity(Context activity,String className){ |
| | | public boolean existsActivity(Context activity, String className) { |
| | | boolean isLoginActivity = false; |
| | | // 获取当前Activity的列表 |
| | | ActivityManager activityManager = (ActivityManager) activity.getSystemService(Context.ACTIVITY_SERVICE); |
| | |
| | | break; |
| | | } |
| | | } |
| | | return isLoginActivity; |
| | | return isLoginActivity; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 结束所有Activity |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | <string name="no_permission_delete_home">No permission to delete, please contact the administrator for operation</string> |
| | | <string name="simple_debugging">Simple debugging</string> |
| | | <string name="general_debugging">General debugging</string> |
| | | <string name="event_details">Event details</string> |
| | | <string name="event_title">Event title</string> |
| | | <string name="event_content">Event content</string> |
| | | <string name="event_device">Event device</string> |
| | | <string name="event_time">Event time</string> |
| | | <string name="remark">remark</string> |
| | | <string name="treatment_options">Treatment options</string> |
| | | <string name="debug_status_rollback">Should the commissioning status of the %s power station be rolled back to commissioning?</string> |
| | |
| | | <string name="no_permission_delete_home">无权限删除,请联系管理员进行操作</string> |
| | | <string name="simple_debugging">简易调试</string> |
| | | <string name="general_debugging">常规调试</string> |
| | | <string name="event_details">事件详情</string> |
| | | <string name="event_title">事件标题</string> |
| | | <string name="event_content">事件内容</string> |
| | | <string name="event_device">事件设备</string> |
| | | <string name="event_time">事件时间</string> |
| | | <string name="remark">备注</string> |
| | | <string name="treatment_options">处理方案</string>是否将电站的调试状态回退到调试中 |
| | | <string name="debug_status_rollback">是否将%s电站的调试状态回退到调试中?</string> |
| | |
| | | <string name="no_permission_delete_home">No permission to delete, please contact the administrator for operation</string> |
| | | <string name="simple_debugging">Simple debugging</string> |
| | | <string name="general_debugging">General debugging</string> |
| | | <string name="event_details">Event details</string> |
| | | <string name="event_title">Event title</string> |
| | | <string name="event_content">Event content</string> |
| | | <string name="event_device">Event device</string> |
| | | <string name="event_time">Event time</string> |
| | | <string name="remark">remark</string> |
| | | <string name="treatment_options">Treatment options</string> |
| | | <string name="debug_status_rollback">Should the commissioning status of the %s power station be rolled back to commissioning?</string> |