Преглед на файлове

去掉插件定义中调用callback的isEscape参数

zhanglong7 преди 6 години
родител
ревизия
cd630b11e8

+ 1 - 1
ipu-plugin-basic/src/main/java/com/ai/ipu/mobile/plugin/MobileFile.java

@ -113,7 +113,7 @@ public class MobileFile extends Plugin{
113 113
		try {
114 114
			String absolutePath = util.getDirection(relativePath, isSdcard == null ? true : isSdcard);
115 115
			String value = FileUtil.readFile(absolutePath);
116
			callback(value,isEncode == null ? true : isEncode);
116
			callback(value);
117 117
		} catch (Exception e) {
118 118
			throw new IpuMobileException(e);
119 119
		}

+ 1 - 1
ipu-plugin-basic/src/main/java/com/ai/ipu/mobile/plugin/MobileLocalLogic.java

@ -37,7 +37,7 @@ public class MobileLocalLogic extends Plugin {
37 37
			protected void execute() throws Exception {
38 38
				// TODO Auto-generated method stub
39 39
				Object result = dataRequest(dataAction, isNull(data) ? null : new DataMap(data));
40
				MobileLocalLogic.this.callback(result.toString(), true);
40
				MobileLocalLogic.this.callback(result.toString());
41 41
			}
42 42
		}.start();
43 43
	}

+ 7 - 7
ipu-plugin-basic/src/main/java/com/ai/ipu/mobile/plugin/MobileNetWork.java

@ -86,7 +86,7 @@ public class MobileNetWork extends Plugin {
86 86
						resultData.put(FuncConstant.SENDER, sender);
87 87
						resultData.put(FuncConstant.TIME, time);
88 88
						String result = resultData.toString();
89
						callback(result, true);
89
						callback(result);
90 90
						hasSetSmsListener = false;
91 91
						return true;
92 92
					} else {
@ -110,7 +110,7 @@ public class MobileNetWork extends Plugin {
110 110
		} catch (Exception e) {
111 111
			result = "{\"X_RESULTCODE\":\"-1\",\"X_RESULTINFO\":\"" + e.getMessage() + "\"}";
112 112
		}
113
		callback(result, true);
113
		callback(result);
114 114
	}
115 115
116 116
	public String httpRequest(String requestUrl, String encode) throws Exception {
@ -145,7 +145,7 @@ public class MobileNetWork extends Plugin {
145 145
		} catch (Exception e) {
146 146
			result = e.getMessage();
147 147
		}
148
		callback(result, true);
148
		callback(result);
149 149
	}
150 150
151 151
	public String httpGet(String requestUrl, String encode) throws Exception {
@ -172,7 +172,7 @@ public class MobileNetWork extends Plugin {
172 172
		} 
173 173
		String result = isNull(headers) ? dataRequest(dataAction, isNull(data) ? null : new DataMap(data)) :
174 174
			 dataRequest(dataAction, isNull(data) ? null : new DataMap(data),new DataMap(headers));
175
		callback(result, true);
175
		callback(result);
176 176
	}
177 177
	
178 178
	public void dataRequestWithHost(JSONArray param) throws Exception {
@ -187,7 +187,7 @@ public class MobileNetWork extends Plugin {
187 187
		}
188 188
        String result = isNull(headers) ? dataRequestWithHost(requestUrl, dataAction, isNull(data) ? null : new DataMap(data)) :
189 189
        	dataRequestWithHost(requestUrl, dataAction, isNull(data) ? null : new DataMap(data), new DataMap(headers));
190
        callback(result, true);
190
        callback(result);
191 191
    }
192 192
	
193 193
	/**
@ -443,7 +443,7 @@ public class MobileNetWork extends Plugin {
443 443
				// TODO Auto-generated method stub
444 444
				super.onPostExecute(result);
445 445
				if (result != null) {
446
					MobileNetWork.this.callback(result, true);// 正常回调
446
					MobileNetWork.this.callback(result);// 正常回调
447 447
				}
448 448
			}
449 449
		}.execute(postData);
@ -488,7 +488,7 @@ public class MobileNetWork extends Plugin {
488 488
				// TODO Auto-generated method stub
489 489
				super.onPostExecute(savePath);
490 490
				if (savePath != null) {
491
					MobileNetWork.this.callback(savePath, true);// 正常回调
491
					MobileNetWork.this.callback(savePath);// 正常回调
492 492
				}
493 493
			}
494 494
		}.execute();

+ 5 - 5
ipu-plugin-basic/src/main/java/com/ai/ipu/mobile/plugin/MobileUI.java

@ -310,7 +310,7 @@ public class MobileUI extends Plugin {
310 310
		String pageAction = param.getString(0);
311 311
		String data = param.getString(1);
312 312
		String html = getTemplate(pageAction, isNull(data) ? null : new DataMap(data));
313
		callback(html, true);
313
		callback(html);
314 314
	}
315 315

316 316
	/**
@ -347,7 +347,7 @@ public class MobileUI extends Plugin {
347 347
		String html = getPage(pageAction, isNull(data) ? null : new DataMap(data));
348 348
		// modify by wyj,当数据接口调用失败时,不再执行回调函数
349 349
		if(!DATA_REQUEST_ERROR.equals(html)) {
350
			callback(html, true);
350
			callback(html);
351 351
		}
352 352
	}
353 353

@ -1037,7 +1037,7 @@ public class MobileUI extends Plugin {
1037 1037
					.getStringExtra(CustomDialogActivity.KEY_RESULT);
1038 1038
			if (resultData != null) {
1039 1039
				// 特殊字符转义
1040
				callback(resultData, true);
1040
				callback(resultData);
1041 1041
			}
1042 1042
		} else if (requestCode == REQUEST_CODE_CUSTOM_WINDOW) {
1043 1043
			if (intent == null)
@ -1046,7 +1046,7 @@ public class MobileUI extends Plugin {
1046 1046
					.getStringExtra(CustomWindowActivity.KEY_RESULT);
1047 1047
			if (resultData != null) {
1048 1048
				// 特殊字符转义
1049
				callback(resultData, true);
1049
				callback(resultData);
1050 1050
			}
1051 1051
		} else if (requestCode == REQUEST_CODE_SLIDING_MENU) {
1052 1052
			if (intent == null)
@ -1055,7 +1055,7 @@ public class MobileUI extends Plugin {
1055 1055
					.getStringExtra(SlidingMenuActivity.KEY_RESULT);
1056 1056
			if (resultData != null) {
1057 1057
				// 特殊字符转义
1058
				callback(resultData, true);
1058
				callback(resultData);
1059 1059
			}
1060 1060
		} else if (requestCode == REQUEST_CODE_CONTACTS_VIEW) {
1061 1061
			if (intent == null) {