version:3.9
fix:修复解锁后无限重置的bug update:更换图标,增加解锁后显示所有app
This commit is contained in:
29
src/com/aoleyun/os/uiuiutils/GsonUtils.java
Normal file
29
src/com/aoleyun/os/uiuiutils/GsonUtils.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.aoleyun.os.uiuiutils;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
public class GsonUtils {
|
||||
public static JsonObject getJsonObject(String jsonString) {
|
||||
JsonObject jsonObject = JsonParser.parseString(jsonString).getAsJsonObject();
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
// TODO: 2022/3/31 暂时没有实现
|
||||
public static <E> E getJsonFromType(String jsonString) {
|
||||
Gson gson = new Gson();
|
||||
Type Type = new TypeToken<E>() {
|
||||
}.getType();
|
||||
E e = gson.fromJson(jsonString, Type);
|
||||
return e;
|
||||
}
|
||||
|
||||
public static String toJsonString(Object o) {
|
||||
return new Gson().toJson(o);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user