Quellcode durchsuchen

修正ipu-share中的两个严重

wuyong3 vor 6 Jahren
Ursprung
Commit
9d1e1b5da0

+ 1 - 0
ipu-share/.gitignore

@ -1,2 +1,3 @@
1 1
/bin/
2 2
/gen/
3
/.settings/

+ 2 - 1
ipu-share/src/com/ai/ipu/share/MainActivity.java

@ -20,6 +20,7 @@ import android.net.Uri;
20 20
import android.os.Bundle;
21 21
import android.os.Environment;
22 22
import android.text.TextUtils;
23
import android.util.Log;
23 24
import android.view.View;
24 25
import android.view.View.OnClickListener;
25 26
import android.widget.Button;
@ -119,7 +120,7 @@ public class MainActivity extends Activity implements OnClickListener{
119 120
			// String path = "/storage/emulated/legacy/share/" + fileName;
120 121
			// FileUtil.writeFile(inputStream, path);
121 122
		} catch (Exception e) {
122
			e.printStackTrace();
123
			Log.e(getClass().getSimpleName(), e.getMessage(), e);
123 124
		}
124 125
	}
125 126

+ 3 - 2
ipu-share/src/com/ai/ipu/share/util/ShareUtil.java

@ -16,6 +16,7 @@ import android.content.Intent;
16 16
import android.content.pm.PackageManager;
17 17
import android.content.pm.PackageManager.NameNotFoundException;
18 18
import android.net.Uri;
19
import android.util.Log;
19 20
20 21
public class ShareUtil {
21 22
	
@ -45,7 +46,7 @@ public class ShareUtil {
45 46
					PackageManager.GET_ACTIVITIES);
46 47
			return true;
47 48
		} catch (NameNotFoundException e) {
48
			e.printStackTrace();
49
			Log.e(getClass().getSimpleName(), e.getMessage(), e);
49 50
			HintUtil.tip((Activity) context, "请先安装应用app");
50 51
			return false;
51 52
		}
@ -242,7 +243,7 @@ public class ShareUtil {
242 243
			try {
243 244
				AssetsUtil.copyAssetsDir("share", shareDir);
244 245
			} catch (Exception e) {
245
				e.printStackTrace();
246
				Log.e(ShareUtil.class.getSimpleName(), e.getMessage(), e);
246 247
			}
247 248
		}
248 249
	}