| | |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.uni.HDLUniMPSDKManager; |
| | | import com.hdl.photovoltaic.utils.NetworkUtils; |
| | | import com.hdl.photovoltaic.utils.PermissionUtils; |
| | | import com.hdl.photovoltaic.utils.WifiUtils; |
| | | import com.hdl.sdk.link.common.exception.HDLLinkException; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | |
| | | WifiUtils wifiUtils = WifiUtils.getInstance(); |
| | | //wifi模块 |
| | | switch (type) { |
| | | //获取位置权限 |
| | | case HDLUniMP.UNI_EVENT_REPLY_AUTHORIZATION_GET: { |
| | | boolean isLocalAuthor = PermissionUtils.checkPermission(HDLApp.getInstance(), Manifest.permission.ACCESS_FINE_LOCATION); |
| | | if (callback != null) { |
| | | uniSuccessCallback(mode_type, isLocalAuthor, callback); |
| | | } |
| | | } |
| | | break; |
| | | //获取手机wifi列表 |
| | | case HDLUniMP.UNI_EVENT_REPLY_PHONE_WIFI_LIST: { |
| | | if (callback != null) { |
| | |
| | | } else if (HDLUniMP.UNI_EVENT_REPLY_OTHER_MODEL.equals(topic)) { |
| | | //其它模块 |
| | | switch (type) { |
| | | |
| | | //获取温度单位 |
| | | case HDLUniMP.UNI_EVENT_REPLY_OTHER_UNIT: { |
| | | uniSuccessCallback(mode_type, UserConfigManage.getInstance().getTemperature_unit(), callback); |