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