use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.
the class EventSetData method setDataSync.
public Object setDataSync(Context context, ArrayList<String> paramsList) {
StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
String key = paramsList.get(0);
String value = paramsList.get(1);
boolean result = storageManager.setData(context, key, value);
return result ? JsPoster.getSuccess() : JsPoster.getFailed("存储失败");
}
use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.
the class EventDeleteData method deleteData.
public void deleteData(Context context, ArrayList<String> paramsList, JSCallback jscallback) {
String key = paramsList.get(0);
StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
boolean result = storageManager.deleteData(context, key);
if (result) {
JsPoster.postSuccess(null, jscallback);
} else {
JsPoster.postFailed("删除" + key + "失败", jscallback);
}
}
Aggregations