Skip to content

Commit

Permalink
remove utilcode
Browse files Browse the repository at this point in the history
  • Loading branch information
haife committed Dec 27, 2021
1 parent 51feaff commit 560ccb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.blankj.utilcode.util.ScreenUtils;
import com.haife.mcas.mvp.IPresenter;

import java.lang.reflect.Field;
Expand Down Expand Up @@ -61,7 +60,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
fixOrientation();
}
//固定屏幕方向
ScreenUtils.setPortrait(this);

mContext = this;
mDelegate.onCreate(savedInstanceState);

Expand Down
9 changes: 4 additions & 5 deletions mcas/src/main/java/com/haife/mcas/mvp/BaseModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.OnLifecycleEvent;

import com.blankj.utilcode.util.StringUtils;
import com.haife.mcas.integration.IRepositoryManager;

import java.lang.reflect.Field;
Expand Down Expand Up @@ -40,7 +39,7 @@ public BaseModel(IRepositoryManager repositoryManager) {
* @param key
* @return
*/
public static HashMap<String,Object> encryptObjectToMap(@Nullable Object obj, String key) {
public static HashMap<String, Object> encryptObjectToMap(@Nullable Object obj, String key) {
if (obj != null) {
try {
HashMap<String, Object> map = new HashMap<>();
Expand All @@ -50,7 +49,7 @@ public static HashMap<String,Object> encryptObjectToMap(@Nullable Object obj, St
map.put(field.getName(), field.get(obj));
}
map.put("64", getMacData(map, key));
return map;
return map;
} catch (Exception ignored) {

}
Expand Down Expand Up @@ -93,13 +92,13 @@ public static String getMacData(HashMap<String, Object> map, String key) throws
Map<String, Object> resultMap = sortMapByKey(map);
String sign = "";
for (Map.Entry<String, Object> entry : resultMap.entrySet()) {
if (StringUtils.isEmpty(sign)) {
if (sign != null && !sign.isEmpty()) {
sign = String.valueOf(entry.getValue());
} else {
sign += entry.getValue();
}
}
if (!StringUtils.isEmpty(sign)) {
if (sign != null && !sign.isEmpty()) {
sign += key;
}
return sign;
Expand Down

0 comments on commit 560ccb1

Please sign in to comment.